You can determine tax default parameters and calculate taxes online or in batch by calling two common routines—the tax determination function and the tax calculation function. When you determine tax defaults and calculate taxes online, the calling application must use rowsets. When you determine tax defaults and calculate taxes in batch, the calling application must use temporary tables.
This chapter discusses how to:
Call the Tax Determination process.
Call the Tax Calculation process.
The Tax Determination process is a common routine that determines tax applicability, tax calculation codes, and component codes. Calling applications can call this function in batch mode, or online from the header or transaction line level. Calling this function online from the header level enables the transaction to track at the header level tax determination information that might not vary by transaction line, such as the vendor tax transaction type.
When the calling application passes tax determination information (such as vendor tax transaction type), the tax determination function does not overwrite the value initially passed.
This section provides an overview of the Tax Determination process, and discusses:
Preparations necessary before calling the Tax Determination process.
Reapplying default tax parameters.
Validating transaction lines.
Tax Determination input parameters.
Tax Determination output parameters.
When an application calls the tax determination function, the process compares the ship from and ship to country, and performs the following for each row the calling application passes:
If the ship from and ship to country are not the same, the system marks the row as not applicable for sales tax.
If the tax transaction type is defined as Interunit Transfer, no sales tax and no customs duty are applicable.
If the ship from and ship to country are the same:
Checks the Business Unit Tax Applicability table to determine whether the business unit is excise duty applicable, sales tax applicable, or customs duty applicable.
If the business unit is not applicable for either type of tax, the function marks the appropriate tax applicable flags as No and exits.
If the business unit is tax applicable, the process checks the trading partner tax applicability table to determine if the trading partner is excise duty applicable, sales tax applicable, or customs duty applicable.
If tax is applicable, the process retrieves the default tax transaction type and the trading partner’s tax category. If the tax is not applicable to the trading partner for either type of tax, the function marks the appropriate tax applicable flags as No and exits.
If both the business unit and the trading partner are tax applicable, and if an item or product ID were provided by the calling application, the process checks the item or product tax applicability table to determine if the item or product is excise duty applicable, sales tax applicable, or customs duty applicable.
If tax applicable, the process retrieves the item tax category. If the item or product is not applicable for either type of tax, the function marks the appropriate tax applicable flags as No and exits.
If the business unit, trading partner, and item or product (if applicable) are all excise duty applicable:
Checks the Tax Determination table to determine the tax calculation code applicable for excise duty.
Accesses the Tax Rate Code table and inserts a row into the Tax Detail child rowset for every tax detail row associated with the tax calculation code.
If the business unit, trading partner, and item or product (if applicable) are all sales tax applicable:
Determines the rate derivation and reporting sales tax authorities.
Check the Tax Determination table to determine the tax calculation code applicable for sales tax.
Access the Tax Rate Code table and inserts a row into the Tax Detail child rowset for every tax detail row associated with the tax calculation code.
If the business unit, trading partner, and item or product (if applicable) are all customs duty applicable:
Check the Tax Determination table to determine the tax calculation code applicable for customs duty.
Access the Tax Rate Code table and inserts a row into the Tax Detail child rowset for every tax detail row associated with the tax calculation code.
Prior to calling the tax determination function, the calling application must determine which business unit value the tax determination will use, and determine the ship from country, ship from state, ship to country, and ship to state.
Determining the Business Unit for Tax Determination
Refer to the following table to determine the correct business unit to use for tax determination.
Application |
Use Business Unit |
PeopleSoft Inventory |
Ship From Inventory |
PeopleSoft Order Management |
|
PeopleSoft Billing |
Bill Header: Billing business unit (used only for online manual bill entry) |
|
Bill Line:
|
PeopleSoft Receivables |
Group Control: Use the Receivables business unit (used for online pending item entry only). |
|
Pending Item:
|
PeopleSoft Purchasing |
|
PeopleSoft Payables |
Header: Payable business unit (for online manual entry only). |
|
Transaction Lines:
|
Determining the Ship From Country and State
Refer to the following table to determine the correct ship from country and state to use:
Application |
Use Ship From Country, State |
PeopleSoft Inventory and Order Management |
|
PeopleSoft Billing |
|
PeopleSoft Receivables |
|
PeopleSoft Purchasing and Payables |
Use the country and state from the ordering vendor location. |
Determining the Ship To Country and State
Refer to the following table to determine the correct ship to country and state:
Application |
Use Ship From Country, State |
PeopleSoft Inventory, Order Management, Billing, and Receivables |
|
PeopleSoft Purchasing and Payables |
Access the ship to location.
|
If you make changes to the trading partner information, item or product ID, tax transaction type, or to any of the tax calculation codes, you are required to call the tax determination function again to reapply defaults based on the new values.
Preparing Fields for Updated Tax Parameters
The calling application must blank out the fields related to modified information prior to calling the tax determination function.
Change To |
Calling Application Responsibilities |
Trading Partner |
Note. Taxability rules may differ for trading partners. Consequently, the Tax Determination process may blank out fields related to the item (when the new trading partner is not taxable), or populate fields related to the item (when the new trading partner is taxable), even if the item did not change. |
Ship To Location (for procure to pay) or Ship From Location (for order to cash) |
Note. The last step is applicable only when items are specified on the transaction line. Item tax applicability may be specified by Inventory business unit, or at the item master level. If you change the ship to or ship from location, the Tax Determination process might use a different business unit to determine taxability—a different Inventory business unit, an Inventory business unit where a product-specific business unit was previously used, or a product-specific business unit where an Inventory business unit was previously used. Consequently, the Tax Determination process must recheck the tax applicability of the item, even if the item had not changed. Note. Taxability rules may differ for business units. Consequently, the tax determination function may blank out fields related to the trading partner or item (when the new business unit is not taxable), or populate fields related to the trading partner or item (when the new business unit is taxable), even if the trading partner or item did not change. |
Item or Product Kit |
|
Tax Transaction Type |
|
Tax Calculation (Rate) Code |
|
The Tax Determination routines accept as input one or more rows of transaction line data using rowsets for online processing, and temporary tables for batch processing. Each row should be populated with the following values, if available:
Field |
Notes (if applicable) |
Tax Defaulting Rowset/Table |
Name of the Tax Defaulting rowset (online) or temporary table (batch) |
Tax Default Option (online processing only) |
The calling application must populate this option with one of the following values: H (header): The tax determination function returns only the additional values on each row in the parent rowset. It returns no rows in the child rowset. D (detail line): The tax determination function returns additional values on each row in the parent rowset and additional rows in the child rowset. |
Tax Calc Date (tax calculation date) |
Used for effective date processing. |
Business Unit |
Refers to the transaction business unit. |
Excise Duty Document Number Series |
Applicable to excise invoices only. |
Tax Calc Transaction ID |
For example, the invoice number for shipment. |
Receiving Business Unit |
Applicable to the vendor excise invoice only. |
Receiver ID |
Applicable for receiving materials |
Tax Calc Transaction Line Number |
|
Tax Calc Schedule Line Number |
If applicable. |
Business Unit Type |
Specifies the type of business unit associated with the Excise Duty, customs duty, or Sales Tax Business Unit field. Valid values are: IN: inventory. PO: purchasing. OM: order management. BI: billing. AR: accounts receivable. AP: accounts payable. |
Excise Duty/Sales Tax Business Unit |
The business unit the system uses to determine tax applicability. |
Trading Partner Type: |
Valid values are: V: vendor. C: customer. |
Trading Partner Setid |
|
Trading Partner ID |
|
Location or Address Seq Num |
For customer, the address sequence number. For vendor, the location. |
Item or Product Kit Flag |
Valid values are: I: item P: kit N: not applicable |
Item or Product Kit ID |
|
Benefit ID |
For customs duty only. |
Ship From Country |
|
Ship From State |
|
Ship To Country |
|
Ship To State |
|
Note. The following values can be copied from a prior transaction; they can be header defaults applied to the line and populated from a prior function call; or, you can manually overwrite them (specific to tax transaction type and tax rate codes). The Tax Determination process will not overwrite these values if provided by the calling application. The Tax Determination process returns these values if they are not populated by the calling function.
Field |
Notes (if applicable) |
Tax Transaction Type |
Valid values are: DEB: direct export with bond. DEWB: direct export without bond. DIMP: direct import. DOM: domestic. IUT: InterUnit transfer. LEB: local export with bond. LEWB: local export without bond. LIMP: local import. |
Trading Partner Tax Category - Sales Tax |
|
Trading Partner Tax Category - Excise duty |
|
Trading Partner Tax Category - Customs duty |
|
Item/Product Kit Tax Category - Sales Tax |
|
Item/Product Kit Tax Category - Excise duty |
|
Item/Product Kit Tax Category - Custom duty |
|
Tax Calculation Code - Sales Tax |
|
Tax Calculation Code - Excise duty |
|
Tax Calculation Code - Customs duty |
|
The Tax Determination process returns the following values, using rowsets for online processing, and temporary tables for batch processing:
Field |
Notes (if applicable) |
Business Unit Sales Tax, Customs Duty, and Excise Duty Applicability (online processing only) |
Applicable only when the Tax Default Option is defined as header. |
Trading Partner Sales Tax, Customs Duty, and Excise Duty Applicability (online processing only) |
Applicable only when the Tax Default Option is defined as header. |
Organization SetID |
|
Organization Code |
|
Organization Tax Location Code |
|
Tax Transaction Type |
If the calling application passes a value to the function in this field, the process does not overwrite the value. Valid values are: DEB: direct export with bond. DEWB: direct export without bond. DIMP: direct import. DOM: domestic. IUT: InterUnit transfer. LEB: local export with bond. LEWB: local export without bond. LIMP: local import. |
Trading Partner Tax Category - Sales Tax |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Trading Partner Tax Category - Excise Duty |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Trading Partner Tax Category - Customs Duty |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Item/Product Kit Tax Category - Sales Tax |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Item/Product Kit Tax Category - Excise duty |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Item/Product Kit Tax Category - Customs duty |
If the calling application passes a value to the function in this field, the process does not overwrite the value. |
Item/Product Kit Tax Item Type |
Valid values are: C: capital goods. R: raw materials. F: finished goods. |
Item/Product Excise Duty Chapter ID |
|
Excise duty Applicability Flag |
Indicates whether the row is excise duty applicable. |
Excise duty Calculation Code |
|
Sales Tax Applicability Flag |
Indicates whether the row is sales tax applicable. |
Sales Tax Calculation Code |
|
Customs Duty Applicability Flag |
Indicates whether the row is customs duty applicable. |
Customs Duty Calculation Code |
|
Rate Derivation Sales Tax Authority |
Pass blank if row is not sales tax applicable. |
Reporting Sales Tax Authority |
Pass blank if row is not sales tax applicable. |
Use Assessable Value flag |
The system calculates excise duty based on the assessable value. When no sales value is applied to a shipment, excise duty may still be applicable based on the value of the items. Assessable value is based on customer category, item category, or item ID. |
Assessable Value |
The assessable value in the currency associated with the tax location. |
Excise Unit of Measure |
|
Conversion Rate |
Conversion rate between standard unit of measure and excise unit of measure. |
Sales Tax Form Code |
Pass blank if row is not sales tax applicable. |
Service Tax Flag |
|
Tax Location Reporting Currency |
|
For each transaction line row that is sales tax or excise duty applicable, the Tax Determination process returns one or more tax detail lines containing:
Field |
Notes (if applicable) |
Tax Type |
Valid values are: E: excise. S: sales tax. C: customs. |
Tax Rate Sequence |
|
Tax Component Code |
|
Tax Dependency Code |
|
Calculation Scheme |
Valid values are: P: percentage. Q: quantity. A: ad hoc amount. |
Tax Rate Percent |
|
Tax Rate Amount |
|
Tax Rate Currency Code |
|
Tax Rate Unit of Measure |
|
Tax Location Currency Code |
Applies to tax rate amount. |
Recovery Percent |
The percentage of the excise tax or sales tax that is recoverable. The nonrecoverable portion can be added to the value of the inventory item using the landed costs feature of PeopleSoft. |
Tax calculation Code |
|
Miscellaneous Charge Code |
|
The Tax Calculation process is a common routine that performs sales tax, customs duty, and excise duty tax 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:
Obtains from the exchange rate table the exchange rate between the base currency and the tax location reporting currency.
If required (if the transaction unit of measure is not equal to the excise unit of measure), obtains from Item Units of Measure table the factor for converting the transaction unit of measure to the excise unit of measure.
Converts transaction line amounts from transaction currency to base currency.
Converts transaction line base currency amounts to tax location reporting currency
For each row in the child tax detail table, performs the following tax calculations using the tax location reporting currency amounts:
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.
If the calculation scheme is defined as quantity:
Converts the quantity into the excise unit of measure.
Calculates the tax by multiplying the tax rate amount (in transaction currency) from the tax rate code by the quantity in the excise unit of measure.
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 and other tax component amounts (including excise tax if sales tax is being calculated) that must be included.
Calculates the tax amount by applying the tax rate percent against the taxable basis.
Converts the resulting tax and tax basis amounts from transaction currency back to base currency.
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. |
Excise Duty Document Number Series |
For the excise invoice only. |
Tax Calc Transaction ID |
The calling applications can use, for example, the invoice ID. |
Receiving Business Unit |
For the excise invoice only. |
Receiver ID |
For the vendor excise invoice only. |
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 PeopleSoft Purchasing and Payables). |
Misc Charge Amount in Transaction Currency |
In transaction unit of measure (applicable only to PeopleSoft 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. |
Excise Duty Applicability Flag |
|
Sales Tax Applicability Flag |
|
Per Unit Assessable Value in Tax Reporting Currency |
Used only when calculating excise tax. |
Excise Unit of Measure |
|
Conversion Rate Between Standard Unit of Measure and Excise Unit of Measure |
|
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 Type |
Excise duty or Sales Tax. |
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 |
In excise unit of measure. |
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 or the excise unit or measure was blank. |
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. |