Line level VAT amount computation Logic Clarification

Hi Team,

We have come across the below scenario and seek your clarification on the appropriate logic to be implemented in computing lene level VAT amount.

Taxable amount inclusive of VAT : 0.8

Line Level:

Unit Price (BT-146) : 0.695652174
Quantity (BT-129) : 1
Invoice Line Net Amount (BT-131) : 0.7 (rounded to 2 decimal places)
VAT amount (KSA-11) : 0.11 (rounded to 2 decimal places)
Line amount inclusive VAT (KSA-12): 0.81

The VAT amount (KSA-11) in this case is computed as BT-131 *0.15 and rounded to 2 decimal places and hence resulting in a line total as 0.81 which is 0.01 more than the actual value.

Request your clarification if the VAT amount (KSA-11) needs to be computed as following to avoid the 0.01 difference and match with the actual value.

KSA-11 = round( (BT-146 * BT-129) * 0.15 ,2)

This results in VAT amount as 0.10 and line total as 0.70+0.10 = 0.80 matching with the actual value.

1 Like

@Ankit_Tiwari Could you please clarify the computation logic to be used.

@Sayi_Sankar rounding logic is explained in paragraph 10 of XML Implementation Standards.

Rounding a numerical value means replacing it by another value that is approximately equal but has a shorter, simpler, or more explicit representation. Rounding shall be performed by using “half-up” rounding. Half-up means that half-way values are always rounded up.

As explained in paragraph 10, you are expected to follow half up rounding i.e., 0.005 and above should be rounded-up at second decimal place as 0.01. In your example, the unit price (BT-146) can be provided as it is with all decimal places 0.695652174 (there are no decimal place restrictions on unit price and quantity fields). Result of multiplication of Unit Price and Quantity should be rounded to 2 decimals i.e., 0.70. When 15% VAT is applied the tax amount will be 0.105 which again has to be rounded to 2 decimals as 0.11. Therefore, amount including VAT will ideally be 0.81 (0.70+0.11). However, if your source system records this at 0.80 then you can input 0.80 in Line Amount inclusive of VAT (KSA-12). System will not give you any warning or error for this.

We recommend you to keep the values as per source ERP system, mathematical rounding differences within + / - 1 halala per line item will not result in warnings or errors.