Openbravo Issue Tracking System - POS2
View Issue Details
0047682POS2Restaurantspublic2021-09-10 14:282021-10-15 12:33
timothee_catteeuw 
javierRodriguez 
normalmajoralways
closedfixed 
5
 
TAPTAP 
guilleaer
No
0047682: JIRA 2304 - Proof of payment - rounding are not properly executed in some cases
At some point when you want to generate a proof of payment the split amount values are not correctly done.
You can find several cases which allow to reproduce.
There is an issue on how we distribute amount and/or taxes.
Case 1 :

On WebPOS (TAP version), select 2 different products with 1.95 € amount (let's say item A and item B).
Both articles have the same tax (10%)
--> Amount with tax 3.90, without taxes 3.55 and taxes are equals to 0.35

Currently what we do in OB in that case

1st proof of payment : 1.94 including 0.17 €
2nd proof of payment : 1.96 including 0.18 €

The correct result has to be :
1st proof of payment : 1.95 including 0.17 €
2nd proof of payment : 1.95 including 0.18 €

For information if I select item A twice for example, both proof of payment are OK.

Case 2 :
I put several articles in my basket with this configuration
ITEM A amount without tax = 6.77, 10% tax = 0.68 €, amount by including tax 7.45 €
ITEM B amount without tax = 1.63, 20% tax = 0.32 €, amount by including tax 1.95 €
ITEM C amount without tax = 0.59, 10% tax = 0.06 €, amount by including tax 0.65 €
ITEM D amount without tax = 0.91, 10% tax = 0.09 €, amount by including tax 1.00 €
ITEM E amount without tax = 7.23, 10% tax = 0.72 €, amount by including tax 7.95 €

If I split in 2 proof of payments, it necessary to manage amount like that :
1) Total amount = 9,50 €
10 % tax 0,78 €
20 % tax 0,16 €

2) Total amount = 9,50 €
10% tax 0,77 €
20% tax 0,16 €

Nowadays we manage it in OB like that :
1) Total amount = 9,52 €
10 % tax 0,78 €
20 % tax 0,16 €

2) Total amount = 9,48 €
10% tax 0,77 €
20% tax 0,16 €
Split correctly (in equal part) as much as possible. There will some cases when proof of payment amounts won'be equal (ex: 19.55 /2 = 9.77 and 9.78)
No tags attached.
duplicate of backport 0047856TAP closed javierRodriguez Refactor divide in equal parts in Proof of payment 
blocks defect 0047673TAP closed javierRodriguez JIRA 2304 - Proof of payment - rounding are not properly executed in some cases 
Issue History
2021-09-13 15:54dmiguelezTypedefect => backport
2021-09-13 16:09dmiguelezAssigned ToRetail => jorge-garcia
2021-09-14 11:12guilleaerSummaryProof of payment - rounding are not properly executed in some cases => JIRA 2304 - Proof of payment - rounding are not properly executed in some cases
2021-10-11 20:40guilleaerAssigned Tojorge-garcia => javierRodriguez
2021-10-15 12:33guilleaerRelationship addedduplicate of 0047856
2021-10-15 12:33guilleaerStatusscheduled => resolved
2021-10-15 12:33guilleaerFixed in Version => TAP
2021-10-15 12:33guilleaerResolutionopen => fixed
2021-10-15 12:33guilleaerReview Assigned To => guilleaer
2021-10-15 12:33guilleaerNote Added: 0132364
2021-10-15 12:33guilleaerStatusresolved => closed

Notes
(0132364)
guilleaer   
2021-10-15 12:33   
Closed with fix for TAP of

https://issues.openbravo.com/view.php?id=47856 [^]