 ###### Toolbox Main Page Upload file What links here Recent changes Help

###### Participate Communicate Report a bug Contribute Talk to us now!

# Projects/GrossAmountPurchaseInvoice

## Introduction

The main goal of this project is to allow booking purchase invoice received from the suppliers in Openbravo exactly as they look like, that is with the same net, tax and gross amounts.

Due to rounding differences mainly, sometimes it is not possible to book in Openbravo supplier's invoices with exactly the same figures.

The goal of this project is to allow the end-user to adjust the total net amount of an invoice, that is the "Taxable Amount", once booked in Openbravo if needed.

## Tax amounts differences

Sometimes the "Tax Amount" of the supplier's invoice does not match the Tax Amount calculated in Openbravo.

These differences are rounding differences caused by the use of "Document Base" tax calculation while the supplier uses "Line Base" tax calculation, or the other way around, as well as by the use of a "Price precision" up to 2 decimals. See scenario 1 and 2 below.

This scenario can be actually managed in Openbravo by adding a new line in the "Tax" tab for the Tax Rate being used, that adds/subtract the tax amount rounding difference.

Scenario 1 - Tax Calculation.

Overall taxes can be calculated in two ways:

• document based amount by rate
• line based amount by rate

Tax calculation can be configured in the tax rate, field "Document Tax Amount Calculation".

Let us take an scenario where tax calculation is setup line based in Openbravo, while a purchase invoice received from a supplier whose ERP software calculates taxes document based, needs to be booked in Openbravo.

As an example:

Supplier invoice - Tax amount calculated Document based = 17.88

Total Net Amount = 94.08 (76.43+17.65)
Total Tax Amount = 17.88 (19%)
Total Gross Amount = 111.96

Openbravo invoice - Tax amount calculated Lines based = 17.87

Line 1
Net Amount = 76.43
Tax Amount = 14.52 (19%)

Line 2
Net Amount = 17.65
Tax Amount = 3.35 (19%)

Total Net Amount = 94.08
Total Tax Amount = 17.87
Total Gross Amount = 111.95

There is a difference caused by rounding of 0.01€, it should be possible to adjust Openbravo "Total Tax Amount" to 17.88, without recalculating Total Net Amount.

This scenario can be actually managed in Openbravo by adding a new line in the "Tax" tab for the Tax Rate being used, see image below:

As a consequence of this:

• Total Gross Amount changes to 111.96
• Total Tax Amount changes to 17.88
• Total Net Amount remains as 94.08

Posting of the invoice looks like shown in the image below:

Scenario 2 - "Price precision" up to 2 decimals

Openbravo allows to define up to 2 decimals price precision, therefore prices such as 15.595 can be booked in supplier invoices.

At the same time it is not possible to define the standard precision, that is the one used overall for amounts, up to 2 decimals because currencies such as € does not allow to do that.

It could happen that a supplier invoice line shows a unit price of 15,595 while line net amount is rounded to 15,60 And that is correct.

Then, 21% VAT is applied to 15,60 that is a 3,28 tax amount, that implies a total invoice amount = 18,88 booked in Openbravo.

However, supplier invoice is calculated differently, by applying a 21% VAT to 15,595 (15,595 * 0,21 = 3,274), which implies a total invoice amount = 15.60+3.27 = 18.87

Once more there is a rounding issue of -0.01

This scenario can be actually managed in Openbravo by adding a new line in the "Tax" tab for the Tax Rate being used, see image below:

As a consequence of this:

• Total Gross Amount changes to 18.87
• Total Tax Amount changes to 3.27
• Total Net Amount remains as 15.60

Posting of the invoice looks like shown in the image below:

## Taxable amounts differences

Having said that, sometimes the total net amount or "Taxable Amount" of the supplier's invoice does not match total net amount calculated in Openbravo. Normally, this imply that, same way the "Tax Amount" of the supplier's invoice does not match "Tax Amount" calculated by Openbravo.

These differences can be caused by rounding issues while using "Price Including Taxes" feature, even in the case of using a price precision up to 2 decimals.

This scenario can not be managed in Openbravo, as it is not currently possible to adjust the total net amount (taxable amount) of a purchase invoice.

For instance, a supplier invoice reflects below totals:

Total Net Amount = 34.82
Total Tax Amount = 6.62
Total Gross Amount = 41.44

Once complete and booked in Openbravo, the same supplier invoice reflects below information:

Total Net Amount = 34.83
Total Tax Amount = 6.61
Total Gross Amount = 41.44

See images below:

There is a difference of +0.01 in the total net amount compare with the supplier invoice.

And there is a difference of -0.01 in the total tax amount compare with the supplier invoice.

To match supplier's invoice amounts we should be able to adjust both total net amount (taxable amount) for an amount of -0.01, as well as the total tax amount for an amount of +0.01.

As you can see in the image below, if we try to adjust the invoice by adding new lines in the "Tax" tab to reflect those differences, final amounts are not correct:
Total Net Amount = 34.83
Total Gross Amount = 41.45

Same way, accounting is not correct.

The amount booked in the vendor liabilities account, same as the amount booked in the tax payable account are not the correct ones.

## Proposed solution

As shown in section "Taxable Amount differences", there are some scenarios which can not currently be managed in Openbravo properly.

Therefore, Openbravo needs to be enhanced to allow making adjustments to calculated total taxable amount per tax rate as well as total tax amount, while keeping the same total gross amount.

Proposed solution implies that:

1. A new flag named "Taxable Amount Adjustment" needs to be created in "Tax" tab of "Purchase Invoice" window. This new flag is not selected by default.

2. If "Taxable Amount Adjustment" flag is selected, then current callout do not execute, therefore it is possible to enter whatever tax amount and taxable amount needed, as shown in the image below:

3. Once saved, header amounts are updated accordingly.
In the example above:

• Total Gross Amount = 41.44 (this one does not change)
• Total Net Amount = 34.82 (this one is updated as 34.83-0.01, which is the amount reflected in the supplier's invoice).

4. Besides that Total Tax Amount is now 6.62 (6.61+0.01), which is the amount reflected in the supplier's invoice.

5. And once invoice is posted to the ledger, taxable adjustment amount same as tax adjust amount are added/substracted to/from the corresponding ledger accounts balance.

 Account Debit Credit Product Expense (34.83-0.01+16.64)=51.46(Line Net Amount - Taxable Amount Adjustment) Tax Credit 6.61+0.01=6.62 (Tax Amount + Tax Amount Adjustment) Discount Product Expense 16.64 Vendor Liability 41.44

## Related functional areas&modules to consider

Below listed functional areas and modules related to purchase invoice management as well as taxes configuration, management and reporting, need to be reviewed while designing and implementing this feature so no desire impact occurs.

• Multidimensional Tax Report
• Tax Forms
• Purchase Invoice Accounting
• Purchase Invoice Payments and prepayments
• Purchase Invoice Discounts
• Purchase Invoice Unpost
• Purchase Invoice Reactivate
• Purchase Invoice Void