title | description | author | ms.author | ms.topic | ms.date | ms.reviewer | audience | ms.search.region | ms.search.validFrom | ms.search.form | ms.dyn365.ops.version |
---|---|---|---|---|---|---|---|---|---|---|---|
Extend tax engine configurations |
Learn about extending tax engine configurations, including prerequisites and a table that provides full names for various tax terms. |
Kai-Cloud |
kailiang |
article |
05/24/2024 |
twheeloc |
IT Pro |
India |
2017-12-31 |
ERSolutionTable, ERDataModelDesigner, ERModelMappingTable |
7.3 |
[!include banner]
The Tax engine (also referred to as GTE) lets you configure tax rules that determine tax applicability, calculation, posting, and settlement, based on legal and business requirements. This article walks you through the Tax engine configuration extension process using the following example scenarios that apply to India.
- Extend the Tax engine configuration for Union Territory Goods and Services Tax (UTGST).
- Use a reference model to apply a tax rate of Basic Customs Duty (BCD) for import order of goods from different countries/regions.
- Extend the Tax engine configuration for slab price.
Note
The Tax engine functionality is only available for legal entities with a primary address in India.
The following tax terms are mentioned in this article.
Tax term | Full name |
---|---|
GST | Goods and services Tax |
UTGST | Union Territory Goods and Services Tax |
CGST | Central Goods and Services Tax |
IGST | Integrated Goods and Services Tax |
BCD | Basic Customs Duty |
Before you can complete the example scenarios, complete the following tasks, Tax engine import configuration.
- Go to Organization administration > Workspaces > Electronic reporting.
- Select Configuration providers.
- Create a new configuration provider and close the page.
- Select ... > Set active on the configuration provider that you created.
For union territories that don't have a legislature, the GST Council introduced UTGST, which is comparable to SGST. UTGST applies to the following union territories of India:
- Chandigarh
- Lakshadweep
- Daman and Diu
- Dadra and Nagar Haveli
- Andaman and Nicobar Islands
SGST can also be applied in union territories such as New Delhi and Puducherry, which have their own legislatures and can be considered "states" per the GST process.
For UTGST, the following combinations of taxes can be applied for any transaction:
- Supply of goods and services within a state (intrastate): CGST + SGST
- Supply of goods and services within union territories (intra-UT): CGST + UTGST
- Supply of goods and services across states or union territories (interstate/inter-UT): IGST
The order of utilization for the Input Tax Credit of UTGST is the same as it is for the Input Tax Credit of SGST. Therefore, Input Tax Credit of SGST or UTGST is first set off against SGST or UTGST, respectively. The Output Tax liabilities and any balance can be set off against IGST Output Tax liabilities.
To support this scenario, you must complete the following tasks:
- Create extension configurations
- Extend the taxable document so that it includes the IntraStateInUnionTerritory flag
- Complete data mapping for the extended taxable document
- Change the data model of Tax (India GST Contoso)
- Change the applicability of State GST (SGST)
- Configure the UTGST task component
- Modify the formulas of lines to include UTGST
- Complete the tax document configuration
- Import the extended configuration and deploy it to a specific company
The following steps are needed to create extension configurations:
- Create a new taxable document that is derived from Taxable Document (India)
- Create a new tax document that is derived from Tax (India GST)
- In the Localization configurations workspace (Organization administration > Workspaces > Electronic reporting), select Tax configurations.
- In the tree, find the Taxable Document (India) configuration, and then select Create configuration.
- Select the Derive from Taxable document model option, and then enter a name and description for the derived taxable document. For this example, enter the name Taxable Document (India Contoso).
- Select Create configuration.
- In the tree, select the Tax (India GST) configuration, and then select Create configuration.
- Select the Derive from Tax configuration option, and then enter a name and description for the derived tax document. For this example, enter the name Tax (India GST Contoso).
- Select Create configuration.
Complete the following steps to add the IntraStateInUnionTerritory flag to Taxable Document (India Contoso).
-
In the tree, find the Taxable Document (India Contoso) configuration that you created in Create extension configurations, and then select Designer.
-
In the tree, go to Taxable document > Header > Lines, and then select New to create a new node.
-
Enter a name for the node, and select the item type:
- Name: IntraStateInUnionTerritory
- Item type: Enum
-
Select Add.
-
On the Node FastTab, select Switch item reference.
-
Select NoYes in the tree, and then select OK.
-
Save the configuration, and close the designer.
-
With Taxable Document (India Contoso) still selected in the tree, select Change status > Complete in the Versions list.
-
Enter a description such as UTGST, and then select OK.
-
If there are any errors, open the designer, select Validate, and fix the errors.
-
After the status is updated to Complete, the configuration is ready for deployment.
There are data mappings for each taxable document, such as a purchase order or sales order, and reference mode in the taxable document. The purpose of data mapping is to get the value from taxable transactions and pass it into GTE for tax applicability or tax calculation. For convenience, there is a special data source called Taxable document source, which encapsulates most common tax relevant fields like assessable value, HSN, or SAC. So, there are two methods for retrieving and mapping the value of the additional field to your extended taxable document.
- Method 1: Enable the additional field for the existing taxable document source.
- Method 2: Use Electronic reporting (ER) data mapping.
Before you use this method, be sure to read about Tax engine integration so you understand the underlying concepts. The Tax engine must determine whether a state is a union territory. Therefore, in this method, you will modify the data provider so that it provides this information to the Tax engine.
-
Find the system name of the Union Territory of State master.
- Go to Organization administration > Global address book > Addresses > Address setup.
- Select and hold (or right-click) the Union territory column, and then select Form information > Form Name: LogisticsAddressSetup. For this example, notice that the system name for the column is LogisticsAddressState.UnionTerritory_IN.
-
Add a tax engine model field for intrastate transactions in a union territory.
Create a new project of model Application Suite, and add the new class, TaxableDocRowDPExtLineSubscriberSample. Implement the following logic to determine if a transaction is an intrastate transaction in a union territory and pass the flag to GTE.
public class TaxableDocRowDPExtLineSubscriberSample { public static const str IsIntraStateInUnionTerritory = 'IntraStateInUnionTerritory'; [SubscribesTo(classStr(TaxableDocRowDataProviderExtensionLine), delegateStr(TaxableDocRowDataProviderExtensionLine, initExtensionFieldsForLine))] public static void initExtensionFieldsForLine(TaxableDocumentValidFields _validFields) { _validFields.add(IsIntraStateInUnionTerritory, Types::Enum, enumNum(NoYes)); } [SubscribesTo(classStr(TaxableDocRowDataProviderExtensionLine), delegateStr(TaxableDocRowDataProviderExtensionLine, fillInExtensionFieldsForLine))] public static void fillInExtensionFieldsForLine(TaxableDocumentLineObject _lineObj) { _lineObj.setFieldValue(IsIntraStateInUnionTerritory, TaxableDocRowDPExtLineSubscriberSample::IsIntraStateWithUnionTerritory(_lineObj), enumNum(NoYes)); } private static NoYes IsIntraStateWithUnionTerritory(TaxableDocumentLineObject _lineObj) { boolean isIntraStateWithUnionTerritory = NoYes::No; LogisticsPostalAddress partyAddress; LogisticsPostalAddress taxAddress; LogisticsAddressState partyState; SalesPurchJournalLine documentLineMap; TaxModelTaxable_IN taxModelTaxable; documentLineMap = SalesPurchJournalLine::findRecId(_lineObj.getTransactionLineTableId(), _lineObj.getTransactionLineRecordId()); taxModelTaxable = TaxModelDocLineFactory_IN::newTaxModelDocLine(documentLineMap); partyAddress = taxModelTaxable.getPartyLogisticsPostalAddress(); taxAddress = taxModelTaxable.getTaxLogisticsPostalAddressTable(); if (partyAddress && taxAddress && partyAddress.CountryRegionId == taxAddress.CountryRegionId && partyAddress.State != '' && taxAddress.State != '' && partyAddress.State == taxAddress.State) { partyState = LogisticsAddressState::find(partyAddress.CountryRegionId, partyAddress.State); isIntraStateWithUnionTerritory = partyState.UnionTerritory_IN; } return isIntraStateWithUnionTerritory; } }
-
Complete the data binding in the Designer.
-
Navigate to the Taxable Document (India Contoso) configuration, and then select Designer.
-
Select Map model to datasource
-
You will find there are lots of data mapping for each taxable document and reference model, like purchase order or sales order. You need to do your data mapping per your business requirement. For example:
- Select a sales order document line.
- Select Designer.
-
After completing steps 1-5, you should be able to find the field IntraStateInUnionTerritory in the data source under Sales order > Header > Lines. You can bind this field to the IntraStateInUnionTerritory:Enumeration value in the taxable document.
-
Save the configuration, and close the designer.
-
In the Configurations workspace, select Change status > Complete.
-
Enter a description such as UTGST, and then select OK.
-
If there are any errors, open the designer, select Validate, and fix the errors.
-
Before you use this method, be sure that you are familiar with ER and the table relation, class, and method for purchase orders.
-
Open the model mapping designer for a purchase order, add table records PurchLine as a root data source.
-
Add Data model\Enumeration YesNo Global and Dynamics 365 for Operations\Enumeration NoYes.
-
In the Data Source tree, add a calculated field $PurchLine under purchase order > lines to build the connection between the existing taxable document purchase order and the table records PurchLine. Select Edit formula.
-
Input the formula that describes the relationship between PurchLine and purchase order:
FIRST(FILTER(PurchLine, PurchLine.RecId='purchase order'.Header.Lines.RecId))
-
Select Save and close the page.
-
Add the calculated field $IsIntraStateInUnionTerritory in $PurchLine, and use the following formula.
AND('purchase order'.'$PurchLine'.'initTaxModelDocLine_IN()'.getPartyLogisticsPostalAddress.'>Relations'.State.StateId = 'purchase order'.'$PurchLine'.'initTaxModelDocLine_IN()'.getTaxLogisticsPostalAddress.'>Relations'.State.StateId, 'purchase order'.'$PurchLine'.'initTaxModelDocLine_IN()'.getPartyLogisticsPostalAddress.'>Relations'.State.UnionTerritory_IN = NoYesAx.Yes, 'purchase order'.'$PurchLine'.'initTaxModelDocLine_IN()'.getTaxLogisticsPostalAddress.'>Relations'.State.UnionTerritory_IN = NoYesAx.Yes)
-
In the Model mapping designer, complete the mapping:
-
In the Data Sources tree, select $IntraStateInUnionTerritory.
-
In the Data Model, select IntraStateInUnionTerritory.
-
Select Edit.
-
Input the following formula to convert the Boolean value to the enumeration value, which is used by the extended taxable document field IntraStateInUnionTerritory.
CASE('purchase order'.'$PurchLine'.'$IsIntraStateInUnionTerritory', true, NoYesModel.Yes, false, NoYesModel.No)
-
Select Save and close the page.
-
-
Save the configuration, and close the designer.
-
In the Configurations workspace, select Change status > Complete.
-
Enter a description such as UTGST, and then select OK.
-
If there are any errors, open the designer, select Validate, and fix the errors.
-
Go to the Tax (India GST Contoso) configuration and then select Designer.
-
Select Tax document, and then select Taxable Document (India Contoso) as the data model, and select 1 as the data model version.
-
Select Save to save the configuration.
- Go to the Tax (India GST Contoso) configuration, select the version that has a status of Draft, and then select Designer.
- Go to Tax document > Header > Lines > GST > SGST, and then select the Lookups tab.
- Select Columns.
- Select IntraStateInUnionTerritory from the Available columns list, and then select the right arrow button to move the column to the Selected columns list.
- Select OK.
- For the IntraStateInUnionTerritory column, select No.
- Select Save to save the configuration.
-
Go to the Tax (India GST Contoso) configuration, select the version that has a status of Draft, and then select Designer.
-
Add the UTGST tax component.
- Go to Tax document > Header > Lines > GST. Select Add, and then select Tax component.
- Enter a name and description for the UTGST tax component, and then select OK.
-
Configure tax measures for the UTGST tax component.
-
Expand the tax document tree, and select the UTGST tax component to create a measure for.
-
Select Add, and then select Tax measure.
-
All the logic, such as properties, lookups, formulas, postings, and accounting, except applicability of UTGST, is the same as it is for SGST. Therefore, select all the tax measures that SGST uses in the Name list and then select OK.
-
-
Configure rate/percentage lookups.
-
Expand the UTGST tax component node.
-
Select the measure of the Rate/Percentage type.
-
Select Lookups > Columns to see a list of the attributes that are relevant to the tax rate/percentage value.
-
Select the same attributes that SGST uses.
[!NOTE] Don't select Add. Values that you enter here have no effect on the actual rate table. That table should be configured at Tax > Tax configuration > Tax setup.
-
Save the tax document.
-
-
Configure properties.
-
Configure tax applicability lookups.
- Go to Tax document > Header > Lines > GST > UTGST. Select the Lookup tab.
- Select Columns.
- Select Import Order and IntraStateInUnionTerritory as lookup columns.
- Select Configuration as the source type.
- Select Add. Select No for the Import Order column and select Yes for the IntraStateInUnionTerritory column.
- Save the tax document.
-
Configure formulas. Formulas can be configured at either the group node level (line, tax component, or tax type) or the measure node level. However, we recommend that you always configure tax calculation formulas at the group node level. Tax amount distribution formulas can be configured at either the group node level or the measure node level.
- Go to Tax document > Header > Lines > GST > UTGST. Select the Formula tab.
- Select Add Tax formula.
- On the Details FastTab, select Calculation as the category, and then edit the formula and condition.
- Repeat steps 2 through 3 until the UTGST tax component has all the same formulas as SGST.
- Save the tax document.
-
Configure a posting profile. Only nodes of the Tax Component type support a posting profile definition.
- Go to Tax document > Header > Lines > GST > UTGST. Select the Postings tab.
- Select Add Posting Profile to create a new posting profile definition.
- On the Details FastTab, enter the accounting treatment for the tax measures that you defined in the previous task, and provide the names of the debit and credit accounting subledgers.
- Select Edit to enter a condition for the posting profile.
- Optional: Enter a description for the posting profile.
- Repeat steps 2 through 5 until the UTGST tax component has all the same posting profiles as SGST.
- Save the tax document.
-
Configure accounting lookups. Only nodes of the Tax Type and Tax Component types support an accounting lookup definition.
-
Go to Tax document > Header > Lines > GST > UTGST. Select the Accounting tab.
-
Select Columns to see a list of the attributes that can be used to determine the main accounts that will be used for accounting taxes.
-
Select the same attributes that SGST uses.
[!NOTE] Don't select Add. Values that you enter have no effect on the actual tax main accounts decision table. That table should be configured at Tax > Tax configuration > Tax setup.
-
Save the tax document.
-
-
Configure credit pools. Only nodes of the Tax Component type support a credit pool definition.
-
Go to Tax document > Header > Lines > GST > UTGST. Select the Credit Pool tab.
-
Select Columns to see a list of the attributes that are relevant to the tax settlement of this component. Typically, the selected column is the appropriate tax registration number, like GST Registration Number.
-
Select the same attributes that SGST uses.
[!NOTE] Don't select Add. Values that you enter here have no effect on the actual rate table. That table should be configured at Tax > Tax configuration > Tax setup.
-
Save the tax document.
-
-
Go to Tax document > Header > Lines. Select the Formulas tab.
-
Change any formulas that contain the Base Amount, Line tax amount, and Tax amount included in price measures, so that the formulas reflect UTGST. For example, change the Tax amount inclusive formula as shown here.
-
Save the tax document.
-
Close the designer.
- In the Localization configurations workspace (Organization administration > Workspaces > Electronic reporting), select Tax configurations.
- In the Configurations workspace, select Change status, and then select Complete.
- Enter a description such as UTGST, and then select OK.
- If there are any errors, open the designer, select Validate, and fix the errors.
- After the status is updated to Complete, the configuration is ready for deployment.
-
Go to Tax > Setup > Tax configuration > Tax setup.
-
Create a new record and define tax setup.
-
Select Configurations.
-
Select the Tax configuration tab.
-
In the Available configurations section, select New to create a tax configuration.
[!NOTE] The configuration that is added to tax gets listed on the Available configuration tab
-
Select the required configuration, such as Tax (India GST). Select Save.
-
Select Synchronize.
-
Select Activate.
-
Select Close.
-
Select the Companies FastTab.
-
Select New and then select INMF in the Companies field.
-
Select Save.
-
Select Activate to activate the configuration for the company.
-
Select Setup to set up data for the new version.
Per the Microsoft-provided configuration, the tax rate for the BCD is determined by Preferential Party/Import Order/Import Custom Tariff Code/Export Order/Export Custom Tariff Code. We will use this scenario to explain how to use a reference model to support applying a different tax rate for the BCD on the import order of goods from different countries/regions.
To support this scenario, you must complete the following tasks:
- Create extension configurations
- Add a reference model for country/region of origin
- Complete data mapping for the reference model
- Link the reference model to field in taxable document
- Change the lookup of the BCD tax rate
- Complete the tax document configuration
- Import the configuration and deploy it to a specific company
-
In the Localization configurations workspace (Organization administration > Workspaces > Electronic reporting), select Tax configurations.
-
Find and select the Taxable Document (India Contoso) configuration, and then select Designer.
-
Select ... > Reference model to change the view so that you can view all the available reference models.
-
Select New to add a new reference model.
- Name – Country/region of origin
- Node type – Model root
-
Select Add.
-
Highlight Country of Origin, select New to add new reference model.
- Name – Countries/regions of origin
- Node type – Child of an active node
- Item type – Record list
-
Select Add.
-
Highlight Countries of Origin, select New to add new reference model.
- Name – Country/region of origin
- Node type – Child of an active node
- Item type – String
-
Select Add.
-
Highlight Country of Origin, select Natural key.
-
Select Country of Origin\Countries of Origin\Country of Origin as the Natural key.
-
If there are any errors, open the designer, select Validate, and fix the errors.
After you update the status to be Complete, the configuration is ready for deployment.
-
In the Localization configurations workspace (Organization administration > Workspaces > Electronic reporting), select Tax configurations.
-
Find and select the Taxable Document (India Contoso) configuration, and then select Designer.
-
Select Map model to datasource.
-
Select Country of Origin and then select Add.
-
With Country of Origin selected in the list, select Designer to open the designer of the model mapping.
-
Add table records LogisticsAddressCountryRegion as a root.
- Select Table records in the Data source type tree.
- Select Add root.
- Enter the name LogisticsAddressCountryRegion in the Name field.
- Select a table.
- Select OK.
-
Bind the table.
- In the Data sources tree, select the LogisticsAddressCountryRegion table record that you created in step 5.
- In the Date model tree, select Countries of Origin: Record list.
- Select Bind.
-
Bind the field.
- In the Data sources tree, select Country/region(CountryRegionID): String.
- In the Date model tree, select Country of Origin: String.
- Select Bind.
-
Select Save.
- Select ... > Taxable document to change the view to Taxable document.
- Navigate to Taxable document > Header > Lines > GST > Country/Region of Origin.
- On the Node FastTab, select Select reference model.
- Choose Country of Origin for the reference model.
- Select OK.
- Save the configuration and close the designer.
- In the Configurations workspace, select Change status, and then select Complete.
- Enter a description such as Add reference model for Country/region of Origin, and then select OK.
- If there are any errors, open the designer, select Validate, and fix the errors.
After the status is updated to Complete, the configuration is ready for deployment.
- Go to the Tax (India GST Contoso) configuration, and then select Designer.
- Change the data model of Tax (India GST Contoso) to the updated version of the extended taxable document. To do this, complete the steps in Scenario 1, Task 3: Complete data mapping for the extended taxable document.
- Go to Tax document > Header > Lines > Custom Duty > BCD > Rate. Select the Lookup tab.
- Select Columns.
- Select Country/Region of Origin as the lookup column, and then select the right arrow button.
- Select Save.
-
Go to Extension configuration, and then select Rebase.
-
In the Rebase dialog box, in the Target version field, change the target version to latest Microsoft version.
If there is a conflict, you will receive a warning message.
-
To resolve the conflict, select Designer to open the rebased extension configuration.
-
Select one of the following three ways to resolve the conflict:
- Apply previous base value: Apply the original value from the base configuration the first time you create the configuration.
- Apply base value: Apply the current value from the target base configuration.
- Retain own value: Apply the value from extension configuration.
-
After you resolve the conflict, the Resolved check box is marked.
To add the slab price function in India, extend the Tax engine configuration. For more information, see Extend Tax engine configurations for slab price.
[!INCLUDEfooter-include]