Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041752Retail ModulesWeb POSpublic2019-09-04 19:362024-02-08 14:48
marvintm 
jorge-garcia 
normalmajorhave not tried
closedout of date 
5
 
 
No
0041752: Split lines is not distributing correctly the amounts
When a line which contains manual discounts is split, the code which computes the resulting partial discounts does the following:

      var amount = (clonedPromotion.amt / clonedPromotion.originalQty) * qty;

This is not correct for two reasons:
- It doesn't use the OB.DEC API, so it doesn't properly round amounts
- It doesn't adjust the resulting quantity, so in some cases it may happen that the resulting partial discounts do not sum the total amount of the original discount
Generate a line with amount 18.9, and quantity 3.
Add a manual for total amount 5 EUR
Split in two lines (quantities 2 and 1). Debug the previously mentioned code, and verify that resulting promotion amounts are not properly rounded.


Also, see tests SplitLineWithManualPromoDiscretionaryFixAmt and SplitLineWithManualPromoUserDefAmt
No tags attached.
Issue History
2019-09-04 19:36marvintmNew Issue
2019-09-04 19:36marvintmAssigned To => jorge-garcia
2019-09-04 19:36marvintmTriggers an Emergency Pack => No
2024-02-08 14:48shuehnerNote Added: 0160481
2024-02-08 14:48shuehnerStatusnew => closed
2024-02-08 14:48shuehnerResolutionopen => out of date

Notes
(0160481)
shuehner   
2024-02-08 14:48   
After mass reviewing old pos issues in 52891 => Closing as out of date