Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0035862 | Retail Modules | Web POS | public | 2017-04-27 13:26 | 2017-06-19 12:59 | |||||||
Reporter | jorgewederago | |||||||||||
Assigned To | jorge-garcia | |||||||||||
Priority | urgent | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | pi | |||||||||||
Target Version | RR17Q1.2 | Fixed in Version | RR17Q1.2 | |||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | OBPS | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0035862: When applying more than 2 discounts to the same line the information about them is generated wrongly. | |||||||||||
Description | If you apply more than 2 discounts to the same line and finish the transaction, if you go to the ERP and check the information related to them you will see that the values are not correctly generated so the information stored in the database is not correct. | |||||||||||
Steps To Reproduce | 1.- In the ERP go to discounts and promotions and generate (for eg) 4 Discretionary Fixed Amount discounts. 2.- In WebPOS buy something and apply all the discounts to it. 3.- Finish the transaction 4.- Go to the ERP to the Sales order window, select the order and line and check the values in Base Gross Unit Price displayed in discounts and promotions. | |||||||||||
Proposed Solution | The following code seems wrong since it applies twice the discounts due accumulators. base = line.get('price'); _.forEach(line.get('promotions') || [], function (discount) { var discountAmt = discount.actualAmt || discount.amt || 0; discount.basePrice = base; discount.unitDiscount = OB.DEC.div(discountAmt, line.get('qtyToApplyDisc') || line.get('qty')); totalDiscount = OB.DEC.add(totalDiscount, discountAmt); base = OB.DEC.sub(base, totalDiscount); }, this); | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-04-27 13:45 | marvintm | Type | defect => backport | |||||||||
2017-04-27 13:45 | marvintm | Target Version | pi => RR17Q1.2 | |||||||||
2017-06-14 08:52 | jorge-garcia | Assigned To | Retail => jorge-garcia | |||||||||
2017-06-15 09:51 | jorge-garcia | Note Added: 0097406 | ||||||||||
2017-06-15 09:51 | jorge-garcia | Status | scheduled => resolved | |||||||||
2017-06-15 09:51 | jorge-garcia | Resolution | open => fixed | |||||||||
2017-06-19 12:59 | marvintm | Review Assigned To | => marvintm | |||||||||
2017-06-19 12:59 | marvintm | Status | resolved => closed | |||||||||
2017-06-19 12:59 | marvintm | Fixed in Version | => RR17Q1.2 |
Notes | |||||
|
|||||
|
|