Related Information Examples & Tutorials

Set Commission Rates And Tax Using @Edit - Transaction

Several hidden fields on the Transaction form enable you to access tax and commission rate fields directly within the report writer. You can set commission and tax percentages and their breakdown settings on many transactions at once using a transaction loop and the @ EDIT report writer command. You can also filter the list of transactions using criteria to determine the transactions to include.

Commission Rate Field Codes For Transaction

The report codes for the fields on the Commission Rates form are:

@tr.cr
@tr.cr1
@tr.cr2
@tr.cr3

The report code for the commission breakdown check boxes is:

@tr.cro

The code @tr.cro is actually a combination of bit values for all the check boxes on the Commission Rates form. It is easy to figure out the value and then use it in a writeback report. How to do this is described later in this document.

Top of page.

Tax Rate Field Codes For Transaction

The report codes for the fields on the Tax form are:

@tr.tr
@tr.tr1
@tr.tr2
@tr.tr3

The report code for the tax breakdown check boxes is:

@tr.tro

The code @tr.tro is actually a combination of bit values for all the check boxes on the Tax form. It is easy to figure out the value and then use it in a writeback report. How to do this is described later in this document.

Top of page.

Accessing The Bit Values For Check Boxes

Before you run your report on a series of transactions, you need to obtain the bit values for @tr.cro and @tr.tro. Once you know what the values are, you can just do a writeback and set them for other transactions. To do this, go to one transaction and set up the Commission Rates and Tax exactly as you want them to be, switching on check boxes with a check mark as needed. Then, go off the Transaction form to commit the settings. Then print to screen, @tr.cro and @tr.tro. This will give you two numbers, e.g. 2113665. These are actually a combination of switch values. In your transaction loop, you can write these values and this will set the same switches for each of your transactions.

Top of page.

Set Rates And Check Boxes For Transactions

To set rates and switch ON commission rates and tax settings for each transaction, create a writeback report as follows.

//You can run this on all your transactions or use criteria to filter
@tr no total
@SETtr.cro = 2113665 // This is the actual value you obtained above.
@SETtr.cr = 10.00
@SETtr.cr1 = 20.00
@SETtr.cr2 = 30.00
@SETtr.cr3 = 40.00
@SETtr.tro = 49281 // This is the actual value you obtained above.
@SETtr.tr = 6.00
@SETtr.tr1 = 3.00
@SETtr.tr2 = 2.00
@EDITtr.tr3 = 1.00
@tr

tip.gif Whenever you have several fields to edit, you use @SET for every entry except the last one. That collects all the settings and then writes once to the database with the @EDIT line to commit all the settings at once.

After this report runs, you will see that each transaction has the same Commission and Tax settings and switches. The rates will match the rates you entered in your report for each one of the rate fields. The check boxes that are switched ON will match the transaction you used to set this up.

Top of page.

Summary

This process is much faster than setting rates manually. You can use criteria to filter the list of transactions to include. Although the fields written to with this process are only visible through the Commission and Tax tabs on the Transaction form, their values may be retrieved with the report writer and changed with the @SET and @EDIT commands.

Top of page.

See Also

- Report Topics Index

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org