Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025506Openbravo ERP03. Procurement managementpublic2014-01-17 15:312018-04-03 11:15
ngarcia 
psanjuan 
urgentmajoralways
newopen 
5
 
 
Core
No
0025506: It should be possible to adjust the total gross amount of a purchase invoice
It should be possible to adjust the total gross amount of a purchase invoice. Sometimes, due to rounding issues, the total gross amount does not match the total gross amount of the invoice provided by the supplier
Edit the priceRelation and priceEdition formats in the Format.xml in order to accept 3 decimals
As system admin:
   Change the EUR price precision to 3
As group admin role:
   Create a purchase invoice for F&B España, Región Norte
   Add a line of 1 unit with 15.595 price and a tax of 21%
   Check that the Line Net Amount is 15.60 and the Tax Amount is 3.28

As the supplier calculates the tax amount before rounding the line net amount, the tax amount should be 3.27
Proposed solution explained in this wiki page currently under review and pending sign-off:
http://wiki.openbravo.com/wiki/Projects/GrossAmountPurchaseInvoice [^]
No tags attached.
related to feature request 0021950 new jonalegriaesarte Openbravo ERP It would be nice that lines of some journal entries appear grouped 
related to design defect 0032265 closed aferraz Openbravo ERP [SER QA 1434] Taxes at document level are not properly calculated in some cases 
related to design defect 0025077 new Triage Omni OMS Openbravo ERP It is not possible to add a tax adjustment to an invoice with a taxable amount of zero 
related to defect 0034091 scheduled markmm82 Localization Pack: Spain Multidimensional Tax Report should hide the Tax Base Amount of the manual tax adjustments in invoices 
Issue History
2014-01-17 15:31ngarciaNew Issue
2014-01-17 15:31ngarciaAssigned To => psanjuan
2014-01-17 15:31ngarciaModules => Core
2014-01-17 15:31ngarciaTriggers an Emergency Pack => No
2014-01-17 15:32ngarciaRelationship addedrelated to 0025077
2014-01-17 15:36ngarciaIssue Monitored: networkb
2014-01-20 08:06mmarquezIssue Monitored: mmarquez
2014-02-07 18:52dmitry_mezentsevNote Added: 0064022
2014-03-18 12:08extraIssue Monitored: extra
2014-03-18 12:09psanjuanRelationship addedrelated to 0021950
2014-03-28 12:07apalaciosIssue Monitored: apalacios
2014-03-28 12:56extraNote Added: 0065575
2015-06-09 12:00psanjuanProposed Solution updated
2015-08-18 09:04psanjuanNote Added: 0079401
2015-08-18 09:13psanjuanNote Edited: 0079401bug_revision_view_page.php?bugnote_id=0079401#r9213
2015-08-18 09:30psanjuanNote Edited: 0079401bug_revision_view_page.php?bugnote_id=0079401#r9214
2015-10-05 12:51heccamIssue Monitored: heccam
2015-11-09 17:23VictorVillarIssue Monitored: maarten1962
2015-11-10 09:19psanjuanProposed Solution updated
2015-11-10 09:20psanjuanProposed Solution updated
2015-11-10 09:20psanjuanProposed Solution updated
2016-08-19 09:45psanjuanRelationship addedrelated to 0033624
2016-08-19 09:47psanjuanRelationship replacedblocks 0033624
2016-09-26 16:02ngarciaRelationship addedrelated to 0034091
2016-10-14 13:24psanjuanRelationship deletedblocks 0033624
2017-05-09 12:11aferrazRelationship addedrelated to 0032265
2018-04-03 11:15maarten1962Issue End Monitor: maarten1962

Notes
(0064022)
dmitry_mezentsev   
2014-02-07 18:52   
Naiara, Patricia,

The FR is about header level changes but the particular situation difference is coming from line level and in fact as of me it does not sound to be rounding issue but a calculation one.

Line tax should be calculated based on the line net. And if line net is 15.60 (because that is the amount to be posted) tax can only be 3.28. And if line net is 15.595 then tax is 3.27. It would be interesting to see what is written in the incoming invoice as a net. Because if it is 15.595 maybe the solution is to change the configuration to have 3 digits in amounts?

With several lines header tax difference can appear (because Openbravo can be configured to calculate taxes based on document level, for example, but incoming invoice, based on lines) and it is a topic. But this case for me is a different one. Not sure that we need to mix those.
(0065575)
extra   
2014-03-28 12:56   
Hi all,
in my opinion the issue here is not if it's a rounding or calculation issue.
Over here in Italy we have a rule which we must comply with.

Let's take the same example above.
When we enter the purchase invoice into Openbravo, the tax amount is 3.28. And that's OK.
However on the paper supplier invoice we receive from the supplier, the tax amount is 3.27. We don't know why, maybe it's a rounding issue of the ERP of the supplier, but it's not our concern.

The rule here in Italy requires that the tax amount declared by the supplier must be the same tax amount declared by the customer, and I think it's more or less the same all over the world.
So, in this case, we need to amend the tax amount to 3.27 and also the total gross amount is affected.

This can now be done via the tax tab, but the correction requires to create a second line of vat which is posted separately from the rest of the vat, however we need just to post 3.27 as purchase vat.
(0079401)
psanjuan   
2015-08-18 09:04   
(edited on: 2015-08-18 09:30)
Another example to also check is price lists including taxes.
Create a purchase price list including taxes in euros as described below:

Product A - unit/list price = 5.89
Product B - unit/list price = 3.30
Product C - unit/list price = 5.49
Product D - unit/list price = 5.89
Product E - unit/list price = 2.90
Product F - unit/list price = 1.00
Product G - unit/list price = 0.15
Product H - unit/list price = 1.50

Create now a tax rate having a 19% tax rate.

Enter a purchase invoice with below purchase lines, all of them related to 19% tax rate.

Product A - Inv Quantity = 3 - Net Unit Price = 4.95 - Line Net Amount = 14.85
Product B - Inv Quantity = 3 - Net Unit Price = 2.77 - Line Net Amount = 8.31
Product C - Inv Quantity = 2 - Net Unit Price = 4.61 - Line Net Amount = 9.22
Product D - Inv Quantity = 1 - Net Unit Price = 4.95 - Line Net Amount = 4.95
Product B - Inv Quantity = 2 - Net Unit Price = 2.77 - Line Net Amount = 5.54
Product B - Inv Quantity = 1 - Net Unit Price = 2.77 - Line Net Amount = 2.77
Product E - Inv Quantity = 1 - Net Unit Price = 2.44 - Line Net Amount = 2.44
Product F - Inv Quantity = 4 - Net Unit Price = 2.77 - Line Net Amount = 8.31
Product G - Inv Quantity = -72 - Net Unit Price = 0.13 - Line Net Amount = -9.36
Product H - Inv Quantity = -6 - Net Unit Price = 1.26 - Line Net Amount = -7.56

Once complete, total figures calculated by Openbravo are:

Total Gross Amount = 41.44
Total Net Amount = 34.52
Total Tax Amount = 6.92

However, supplier invoice reflects below totals:

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

Therefore, it should be possible to adjust Openbravo calculated "Taxable Amount" to 34.82 (34.52 + 0.3 adjustment), without recalculating Total Tax amount to 6.92 + 0.06 = 6.98, as total gross amount will then change to 41.50 and that is not correct.

And it should be possible to adjust Openbravo "Total Tax Amount" to 6.62 (6.92 - 0.3 adjustment), without recalculating Taxable Amount to 34.52 - 1.58 = 32.94, as total gross amount will then change to 41.14 and that is not correct.