The "useSubItemVatCalculation" property controls how amounts are calculated when subItems are used.
"useSubItemVatCalculation": true
"useSubItemVatCalculation": true means that the sums of "netValue", "grossValue" and "taxValue" for each individual subItem are compared with the values of the parent item.
Discounts and surcharges
With this method, all discounts and surcharges set at the item level must be applied to the subItems accordingly.
If discounts are applied to all or individual subItems (but not to the parent item), only the following conditions apply:
- the sum of the "netValue"s of the subItems must equal the value of the item’s "netValue",
- the sum of the "grossValue"s of the subItems must equal the value of the item’s "grossValue",
- the sum of the "taxValue"s of the subItems must equal the value of the item’s "taxValue" (resp "taxValue2").
You can find a relevant example of this in the article "Using SubItems in positions".
Tax rate details
As tax is calculated at the subItem level, the following values must be set correctly on the respective subItems, in accordance with the tax rate applicable to each individual subItem:
- "vatIdentification"
- "vatPercent" (resp. "vatPercent2")
The following values must be set for the properties on the item itself:
- "vatIdentification": 0 and
- "vatPercent": 0 and "vatPercent2": 0
Item types
If "useSubItemVatCalculation" is set to true, the "ItemType" property set on the item is also ignored, and the type of each corresponding subItem is used (for example, when writing to the French tax archive).
"useSubItemVatCalculation": false
By default, the "useSubItemVatCalculation" property is set to true and applies implicitly. This means that if the property is not included in the payload, "useSubItemVatCalculation": true applies. "useSubItemVatCalculation": false must be set explicitly.
If "useSubItemVatCalculation" is set to 'false', the values of the subItems are completely ignored. All values specified for the subItems are irrelevant for the calculation; only the values of the item itself are decisive for total calculations at document level.
Disabling the calculation at sub-item level by setting "useSubItemVatCalculation": false should only be used if no detailed data can be generated for the subItems.
Comments
0 comments
Please sign in to leave a comment.