Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0052768 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo Localizations] Localization Italy | major | always | 2023-06-16 12:20 | 2023-06-30 11:24 | |||
Reporter | wicherr | View Status | public | |||||
Assigned To | frank_gonzalez | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Regression introduced in release | ||||||||
Summary | 0052768: Italian Invoice XML : PrezzoTotale non calcolato secondo le specifiche tecniche | |||||||
Description | We have this kind of error on Norauto : PrezzoTotale non calcolato secondo le specifiche tecniche After analysis, the problem comes from the multiple roundings we do recording any tickets. | |||||||
Steps To Reproduce | There are multiple cases where we make roundings. The most common are : - Roundings on unit prices regarding the quantities - Roundings on prices without taxes real example from a real invoice in production [extract of the XML] : <CodiceArticolo> <CodiceTipo>EAN</CodiceTipo> <CodiceValore>0000022359346</CodiceValore> </CodiceArticolo> <Descrizione>LIQ. LHM BREMBO 500ML</Descrizione> <Quantita>5.00</Quantita> <PrezzoUnitario>7.34</PrezzoUnitario> <PrezzoTotale>36.68</PrezzoTotale> <AliquotaIVA>22.00</AliquotaIVA> <AltriDatiGestionali> <TipoDato>SCONTRINO</TipoDato> </AltriDatiGestionali> All the data comes from the backend. Nothing is calculated in the extraction. We can see that : 7.34 x 5 = 36.7 <> 36.68 I had another case where the sum of the <PrezzoTotale> was not equal to the <ImponibileImporto> which means the sum of the line without taxes was not equals to the total of the ticket without taxes because of roundings done in the BO. | |||||||
Proposed Solution | We have 3 options I guess : → Either we add digits for more accuracy in the BO → Or we split the products per quantity if we need to round the amount in the BO (ex : 2 qties at 2,74 and 1 at 2,73) → Or we manage that only in the export XML recalculating everything which is the worst option IMO | |||||||
Tags | NOR | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0151498) psanjuan (manager) 2023-06-22 13:02 |
This "I had another case where the sum of the <PrezzoTotale> was not equal to the <ImponibileImporto> which means the sum of the line without taxes was not equals to the total of the ticket without taxes because of roundings done in the BO." needs to be managed in a separated issue with proper definition and steps to reproduce. Please open a new issue for it. |
(0151539) hgbot (developer) 2023-06-23 08:27 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/33 [^] |
(0151541) frank_gonzalez (developer) 2023-06-23 09:13 |
We've found a solution for the rounding problem that basically consists in following the technical spec for Sdl and allowing the unitPrice (PrezzoUnitario) to have up to 8 decimal places. Sdl technical spec: https://www.agenziaentrate.gov.it/portale/documents/20143/2370834/Allegato+A+-+Specifiche+tecniche+vers+1.6_.pdf/a9917ec2-29a3-4f4a-a7d0-93af96fcaad5 [^] To fix the issue: 1. Set the price precision to 4 in the Backoffice 2. Apply the changes in the MR |
(0151672) wicherr (developer) 2023-06-27 14:33 |
The solution seems promising. let's try it. |
(0151813) frank_gonzalez (developer) 2023-06-29 10:21 edited on: 2023-06-29 12:29 |
It appears the fix can't be applied due to differences in client price precision configuration so another fix has been implemented that should solve the problem at the time of XML generation: Instead of getting the unit price from the API, calculate it by dividing the net total by the quantity since that's how the Italian government's exchange system expects rounding to be done. |
(0151892) hgbot (developer) 2023-06-29 18:30 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice [^] Changeset: e2f6a9675bf3c3fecb018c2aef0bb4a2eba3cc97 Author: Frank González <frank.gonzalez@openbravo.com> Date: 29-06-2023 16:30:40 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/commit/e2f6a9675bf3c3fecb018c2aef0bb4a2eba3cc97 [^] Fixes ISSUE-52768: Italy E-Invoice PrezzoTotale non calcolato secondo le specifiche tecniche --- M src-test/org/openbravo/localization/italy/einvoice/TestItalyXMLCreationFromJson.java M src/org/openbravo/localization/italy/einvoice/xmlengine/document/ItalyDatiRiepilogo.java M src/org/openbravo/localization/italy/einvoice/xmlengine/document/ItalyDettaglioLinee.java --- |
(0151893) hgbot (developer) 2023-06-29 18:30 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/33 [^] |
(0151895) aferraz (developer) 2023-06-29 18:32 |
With the fix we finally implemented, it is not needed to change the price precision in OB backoffice. |
(0151922) hgbot (developer) 2023-06-30 08:26 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/34 [^] |
(0151948) hgbot (developer) 2023-06-30 11:24 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice [^] Changeset: 6c4331f5bd9ca4b0e6d28ef69397f15b6ecfcf2d Author: Frank González <frank.gonzalez@openbravo.com> Date: 30-06-2023 09:24:06 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/commit/6c4331f5bd9ca4b0e6d28ef69397f15b6ecfcf2d [^] Related to ISSUE-52768: Fix test --- M src-test/org/openbravo/localization/italy/einvoice/TestItalyXMLCreationFromJson.java --- |
(0151949) hgbot (developer) 2023-06-30 11:24 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.italy.einvoice/-/merge_requests/34 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2023-06-16 12:20 | wicherr | New Issue | |
2023-06-16 12:20 | wicherr | Assigned To | => psanjuan |
2023-06-16 12:20 | wicherr | Tag Attached: NOR | |
2023-06-16 12:55 | psanjuan | Assigned To | psanjuan => Triage Omni OMS |
2023-06-20 09:57 | aferraz | Assigned To | Triage Omni OMS => frank_gonzalez |
2023-06-21 14:14 | frank_gonzalez | Status | new => acknowledged |
2023-06-22 12:51 | psanjuan | Note Added: 0151496 | |
2023-06-22 12:51 | psanjuan | Note Deleted: 0151496 | |
2023-06-22 13:02 | psanjuan | Note Added: 0151498 | |
2023-06-23 08:27 | hgbot | Note Added: 0151539 | |
2023-06-23 09:13 | frank_gonzalez | Note Added: 0151541 | |
2023-06-27 14:33 | wicherr | Note Added: 0151672 | |
2023-06-29 10:21 | frank_gonzalez | Note Added: 0151813 | |
2023-06-29 12:29 | frank_gonzalez | Note Edited: 0151813 | View Revisions |
2023-06-29 18:30 | hgbot | Resolution | open => fixed |
2023-06-29 18:30 | hgbot | Status | acknowledged => closed |
2023-06-29 18:30 | hgbot | Note Added: 0151892 | |
2023-06-29 18:30 | hgbot | Note Added: 0151893 | |
2023-06-29 18:32 | aferraz | Note Added: 0151895 | |
2023-06-30 08:26 | hgbot | Note Added: 0151922 | |
2023-06-30 11:24 | hgbot | Note Added: 0151948 | |
2023-06-30 11:24 | hgbot | Note Added: 0151949 |
Copyright © 2000 - 2009 MantisBT Group |