Openbravo Issue Tracking System - Openbravo Localizations |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0052768 | Openbravo Localizations | Localization Italy | public | 2023-06-16 12:20 | 2023-06-30 11:24 |
|
Reporter | wicherr | |
Assigned To | frank_gonzalez | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Support ticket | |
OBNetwork customer | |
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 |
Additional Information | |
Tags | NOR |
Relationships | |
Attached Files | |
|
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 | bug_revision_view_page.php?bugnote_id=0151813#r26376 |
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 | |
Notes |
|
|
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
|
2023-06-23 08:27
|
|
|
|
|
|
|
|
The solution seems promising. let's try it. |
|
|
(0151813)
|
frank_gonzalez
|
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
|
2023-06-29 18:30
|
|
|
|
(0151893)
|
hgbot
|
2023-06-29 18:30
|
|
|
|
|
With the fix we finally implemented, it is not needed to change the price precision in OB backoffice. |
|
|
(0151922)
|
hgbot
|
2023-06-30 08:26
|
|
|
|
(0151948)
|
hgbot
|
2023-06-30 11:24
|
|
|
|
(0151949)
|
hgbot
|
2023-06-30 11:24
|
|
|