The supplier invoices in Business ByDesign contain **aggregated tax amounts at the document level**. This perhaps could result in rounding differences between the tax amount calculated at the document level and item level total tax amount. The reason behind this difference is that unlike the document level, **item level tax amounts** are calculated **as per each line item** and rounded off to relevant decimal places. This method has been chosen because it is used by accounting.

Ideally, in an accounting software, each line item is posted to general ledger separately and hence, tax amounts need to be rounded off at line item level. On the other hand, since tax authorities accept both methods of calculating tax amounts, suppliers choose to calculate and pay tax applicable to the total net price i.e. the document level tax amount. This might result in some difference between the document and the item level tax amounts. The system ensures that the total tax paid on an invoice at the end should be same as the tax amount of the actual invoice prepared by the supplier. If this difference is not distributed at the item level, it can cause discrepancies between the taxes that are being paid to the relevant tax authorities and the taxes that were declared and therefore, a supplier might end up paying less or more taxes to the tax authorities.

In order to maintain this sanity with respect to accounting, the system is designed using a certain set of rules that try to equalize the document and the item level taxes. These rules are called the **rules of tax difference distribution**.

**Rules**

The total tax amount at the document level of the invoices is calculated aggregately i.e. by adding up individual item level tax amounts (calculated depending upon the tax rate, tax type, and tax rate type) and then rounding off that sum to relevant decimal places (as per that currency).

The total tax amount at the item level is calculated by first rounding off the tax amount of each item to relevant decimal places (as per that currency) and then, adding them up.

The difference occurring between the document level tax amount and item level total tax amount i.e. the **distribution amount** requires a distribution among taxes calculated at the item level, so that, the total tax amount at the document level and the item level results in the same value.

The prerequisite of this distribution is a **minimum amount determination**. The formulae for minimum amount determination is **10^(- (display decimal for that currency))**

The then called difference distribution follows the **“Rule of three”**, which includes the following rules:

**1) Rule of Proportional Distribution:**

This rule is the first one to be executed. It basically runs through all the items of the document and performs the following steps: –

a) Calculates the proportion amount for each item using the formulae **(distribution amount/total rounded off tax amount at item level) X (rounded off item tax amount)**.

b) The then calculated proportion amount is rounded off to the decimal places relevant to that currency.

c) The rounded off proportion amount is then subtracted/added from that particular item’s tax amount, for which the calculation has been performed.

The above steps are performed for all the items on the document and in case there is any left-over distribution amount, it is carried to the next rule.

**2) Rule of Minimum Amount Distribution:**

This rule loops through all the items in the document and subtracts/adds the minimum amount (determined in the prerequisite) from each item’s tax amount. The left-over distribution amount (if any) is carried to the next rule.

**3) Rule of Remainder Distribution:**

The remaining distribution amount after the execution of the first two rules is distributed by this rule. This rule subtracts/adds the remaining distribution amount from the tax amount of the item that has the maximum tax amount.

**Example**

Let’s refer to the below figure depicting items in a supplier invoice, along with their net price and tax amounts. The currency of the document is **EUR**. Hence, the display decimal is **2** and all rounding offs will be done to two decimal places. **Minimum amount=10^(-02)=0.01**.

**Fig: Items in a Supplier Invoice**

**Document-level tax amount calculation: –** The tax amount at the document level will an aggregate of the individual item tax amounts (as calculated in the above figure in column Actual Tax Amount) i.e. **28.8306** or **28.83** (rounding off to two decimal places).

**Item tax amount calculation: – **Item level tax amounts will first be rounded off to two decimal places and then added up, as in the figure below (Refer to column rounded off actual tax amounts).

**Fig: Item level calculation of Tax Amounts**

Hence, the item level tax amount becomes **28.88**, and the so caused difference between the document and item level tax amount is **28.88-23.83=0.05**.

Now, this difference of **0.05** calls for a distribution among existing tax amounts calculated as per each line item.

If we loop into each and every item using the first rule i.e. the rule of proportion, it calculates the proportion for the first item with tax amount **8.4** as **(0.05/28.88) X 8.4=0.0145429363**. The rounded off proportion value will be **0.01**, which will then be subtracted from the first item. The tax amount for the first item now becomes **8.4-0.01=8.39.** On further looping through other items, whose tax amount is **1.28**, the proportion for those items become **(0.05/28.88) X 1.28=0.00221606648** (basically, **0** on rounding off to two decimal places). Now, the tax amounts at item level become as in the below figure (Refer column TAX Amount in SIV). The total amount at item level now becomes **28.87**.

**Fig: Distribution after applying the First Rule (Rule of Proportional Distribution)**

The left-over distribution amount is now **28.87-28.83=0.04**. The rule of minimum amount distribution now comes into the picture. This rule will now go on subtracting **0.01** from four items and the left-over distribution amount will be **0**. Now, the tax amounts of items in the document will be as shown in the figure below (refer column TAX amount in SIV).

**Fig: Distribution after applying the Second Rule (Rule of Minimum Amount Distribution)**

The total tax amount at item level is now **28.83**, which is same as the document. Hence, no further distribution is required and the document is consistent now.