Calling the Tax Calculation Process

The Tax Calculation process is a common routine that performs GST and customs duty calculations and returns tax and tax basis amounts. This function accepts as input one or more rows of transaction line data, plus one or more child rows of tax detail for each transaction line, using rowsets for online processing, and temporary tables for batch processing.

This section provides an overview of the Tax Calculation process, and information about:

  • Tax calculation input parameters.

  • Tax calculation output parameters.

The tax calculation function performs the following for each line:

  1. Obtains from the exchange rate table the exchange rate between the base currency and the tax location reporting currency.

  2. Converts transaction line amounts from transaction currency to base currency.

  3. Converts transaction line base currency amounts to tax location reporting currency

  4. For each row in the child tax detail table, performs the following tax calculations using the tax location reporting currency amounts:

    1. If the calculation scheme is defined as an ad hoc amount, sets the tax amount to the tax rate amount from the tax calculation code.

      Converts the tax rate amount from tax calculation code currency to reporting currency, base currency, and then transaction currency.

    2. If the calculation scheme is defined as percentage:

      Calculates the taxable basis amount based on whether the assessable value must be used, whether freight and/or miscellaneous charges must be included plus any other tax component amounts that must be included.

      Calculates the tax amount by applying the tax rate percent against the taxable basis.

    3. Converts the resulting tax and tax basis amounts from transaction currency back to base currency.

    4. Converts the base currency tax and tax basis amounts to tax location currency.

When calling the Tax Calculation process, the calling application must provide the names of the rowsets or temporary tables that the process should use.

Parent Transaction Lines

The calling application must populate the following fields in the parent transaction line:

Field

Notes (if applicable)

Tax Calculation Rowset/Table

Name of the Tax Calculation rowset (online) or temporary table (batch).

Business Unit

Refers to the transaction business unit.

Tax Calc Transaction ID

The calling applications can use, for example, the invoice ID.

Tax Calc Transaction Line Number

 

Tax Calc Schedule Line Number

If applicable.

Tax Calc Date

Used for effective date processing.

Transaction Line Amount in Transaction Currency.

 

Transaction Line Amount

In transaction currency.

Standard UOM (unit of measure)

For items, this value is stored in MASTER_ITEM_TBL.UNIT_MEASURE_STD

For products this is the value stored in PROD_UOM.UNIT_OF_MEASURE

For ad hoc Items, this is the transaction unit of measure.

Quantity in Standard UOM (unit of measure)

 

Freight Amount in Transaction Currency

In transaction unit of measure (applicable only to Purchasing and Payables).

Misc Charge Amount in Transaction Currency

In transaction unit of measure (applicable only to Purchasing and Payables).

Rate Type

Same rate type used on the transaction for converting transaction currency into base.

Transaction Currency Code

 

Base Currency Code

 

Rate Mult

Used to convert transaction currency into base currency.

Rate Div

Used to convert transaction currency into base currency.

Tax Applicability Flag

 

Reporting Currency Code

 

Use Assessable Value Flag

 

Tax Detail Lines

For each transaction line, the calling application must populate one or more tax detail lines containing:

Field

Notes (if applicable)

Tax Rate Code Sequence Number

 

Tax Component Code

 

Tax Dependency Code

 

Calculation Scheme

Valid values are:

P: percentage.

Q: quantity.

A: ad hoc amount.

Tax Rate Percentage

Used only when the calculation scheme is defined as percentage.

Tax Rate Amount

Used when the calculation scheme is define as ad hoc or quantity.

Tax Rate Currency

 

Tax Rate Unit Of Measure

 

Tax Location Reporting Currency

 

Recovery Percent

 

Tax Calculation Code

 

The tax calculation function returns values for the transaction line parent table and values for child tax detail table.

Transaction Line Parent Table

The Tax Calculation process returns the following values for the transaction line parent table:

Field

Notes (if applicable)

Quantity

Rate Mult

Used to convert base currency into the tax location reporting currency.

Rate Div

Used to convert base currency into the tax location reporting currency.

Extended Assessable Value Amount

In transaction currency.

Extended Assessable Value Amount

In base currency.

Extended Assessable Value Amount

In tax location reporting currency.

Tax Calculation Transaction Line Status Code

Valid values are:

00: Success.

01: Error. Unable to find exchange rate between base currency and tax location currency.

02: Warning. Unable to use assessable value. For example, the assessable value was zero

Child Tax Detail Table

The Tax Calculation process returns the following values for the child tax detail table:

Field

Notes (if applicable)

Include Base Flag

 

Include Freight Flag

 

Include Misc Flag

 

Tax Amount

In transaction currency.

Tax Amount

In base currency.

Tax Amount

In tax location reporting currency.

Tax Basis Amount (taxable amount)

In transaction currency.

Tax Basis Amount (taxable amount)

In base currency.

Tax Basis Amount (taxable amount)

In tax location reporting currency.

Recoverable Tax Amount

In transaction currency.

Recoverable Tax Amount

In base currency.

Recoverable Tax Amount

In tax location reporting currency.

Non-recoverable Tax Amount

In transaction currency.

Non-recoverable Tax Amount

In base currency.

Non-recoverable Tax Amount

In tax location reporting currency.

Tax Rate Amount

In transaction currency.

Tax Rate Amount

In base currency.

Tax Rate Amount

In tax location reporting currency.

Tax Calculation Detail Line Status Code

Valid values are:

00: Success.

01: Error. Unable to find exchange rate between tax rate currency and tax location currency.

02: Error. Unable to find conversion rate between the standard unit of measure and the tax rate unit of measure.

03: Error. Unable to calculate tax when the calculation scheme is defined as quantity. For example, the EXS_QTY_STD field was zero or the EXS_UOM_STD field was blank.