Calculation Types
Determination offers three calculation types: forward (F), reverse-from-tax (R), and reverse-from-total (T).
For more information about the XML elements used in calculation directions, see Configuration.
Forward Calculations
In forward calculations, you specify the gross amount and Determination calculates the tax based on your transaction data. Determination determines the tax for the applicable authorities (for example, state, county, and city).
The forward calculation direction is indicated by the value of F in the XML input element <CALCULATION_DIRECTION>. This element can be set by your business source system, the integration software that connects to Determination, or a TransEditor.
Here are the effects of forward calculations in the audit database and the XML output.
Audit Database
The value of the gross amount is inserted into the GROSS_AMOUNT column of the audit database table TB_INVOICE_LINES. Additionally, the value of the GROSS_AMOUNT is inserted into the CALCULATED_GROSS_AMOUNT column of TB_INVOICE_LINES (see below for details about the calculated gross amount). In forward calculations, the calculated gross amount is always identical to the gross amount.
XML Output
The gross amount field is required in forward calculations and the value you provide to Determination is returned to your business source system.
Reverse-From-Tax Calculations
In reverse-from-tax calculations, you specify the tax amount (and optionally the gross amount). Determination computes the calculated gross amount and the distribution of the tax across the applicable authorities (for example, state, county, and city).
Due to the calculation algorithm for reverse-from-tax, transactions may result in calculated gross amounts that do not match the gross amounts from the input XML. The primary purpose of reverse-from-tax calculations is to provide the correct tax allocation across authorities--not accurate gross amounts.
The reverse-from-tax calculation direction is indicated by the value of R in the XML input element <CALCULATION_DIRECTION>. This element can be set by your business source system, the integration software that connects to Determination, or a TransEditor.
There are several reasons you may want to use reverse-from-tax calculations:
- You only know the tax for a transaction and want Determination to calculate the gross amount.
- You know both the gross amount and the tax amount, but you need Determination to split the tax amount among the various taxing authorities.
- You need to force a particular tax value into your business source system.
In reverse-from-tax transactions using tiered rates and no gross amount, the calculated gross amount may not approximate the gross amount. This occurs because in reverse-from-tax calculations, Determination must use a seeded gross amount, which may not reflect your original gross amount. To avoid this, supply a gross amount in these transactions.
Here are the effects of reverse-from-tax calculations in the audit database and the XML output.
Audit Database
If you provide a gross amount in a reverse-from-tax transaction, then Determination writes that amount into the GROSS_AMOUNT column of the table TB_INVOICE_LINES. If you do not provide a gross amount, then Determination does not write a value into GROSS_AMOUNT (the value remains NULL).
Since Determination computes the calculated gross amount for all reverse-from-tax transactions, it records this unrounded value in the CALCULATED_GROSS_AMOUNT field of audit table TB_INVOICE_LINES.
XML Output
By default in reverse-from-tax-transactions, the XML output from Determination contains the gross amount you provided in the XML input. If you do not provide a gross amount in the XML input, you do not receive a gross amount element in the XML output.
Whether or not you include the gross amount in the XML input, you can always return the unrounded calculated gross amount value in the gross amount XML output element. You do this by setting the Configuration parameter USE_CALC_GROSS_AMT_AS_GROSS_AMT_CALC_DIR_R to Y. By default this configuration parameter is not enabled.
Reverse-From-Total Calculations
In reverse-from-total calculations, neither the individual gross amount nor the tax amount is typically provided; instead, you provide the sum of the line gross and tax amounts (gross-plus-tax). Determination separates this single amount into both a gross amount and a tax amount.
Due to the calculation algorithm for reverse-from-total, transactions may result in calculated gross amounts that do not match the gross amounts from the input XML. The primary purpose of reverse-from-total calculations is to provide the correct tax allocation across authorities--not accurate gross amounts.
The reverse-from-total calculation direction is indicated by the value of T in the XML input element <CALCULATION_DIRECTION>. This element can be set by your business source system, the integration software that connects to Determination, or a TransEditor.
The effects of reverse-from-total calculations in the audit database and the XML output are described in the following sections.
Audit Database
In reverse-from-total transactions, you provide the combined gross-plus-tax. There is typically no separate gross amount. Determination computes the calculated gross amount and inserts this unrounded number into the audit database column CALCULATED_GROSS_AMOUNT of TB_INVOICE_LINES. The GROSS_AMOUNT column is populated with the gross amount you provided in the input XML. If there is no gross amount in the XML input, no value is inserted in the GROSS_AMOUNT column in the audit database.
XML Output
By default in reverse-from-total-transactions, the XML output from Determination contains the gross amount you provided in the XML input. If you do not provide a gross amount in the XML input, you do not receive a gross amount element in the XML output.
Whether or not you include the gross amount in the XML input, you can always return the unrounded calculated gross amount value in the gross amount XML output element. You do this by setting the Configuration parameter USE_CALC_GROSS_AMT_AS_GROSS_AMT_CALC_DIR_T to Y. By default this configuration parameter is not enabled.