Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0042237 | Retail Modules | Web POS | public | 2019-11-08 13:29 | 2019-11-28 19:00 | |||||||
Reporter | ngarcia | |||||||||||
Assigned To | rqueralta | |||||||||||
Priority | urgent | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR20Q1 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | Gold | |||||||||||
Support ticket | 12742 | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0042237: Discount value is not recalculated when opening a layaway with a price modification and editing it (not standard) | |||||||||||
Description | Discount value is not recalculated when opening a layaway with a price modification and editing it (not standard). The discountPercentage is recalculated in adjustPrices function if the following condition is fulfilled: (line.get('product').get('standardPrice') && line.get('product').get('standardPrice') !== price) || (_.isNumber(line.get('discountedLinePrice')) && line.get('discountedLinePrice') !== line.get('product').get('standardPrice')) ) When loading an editable layaway (customization), the standardPrice and the price are equals and discountLinePrice is undefined, so discountPercentage is not recalculated. discountLinePrice is not calculated when loading an editable layaway | |||||||||||
Steps To Reproduce | In the POS: Create a receipt Layaway this receipt Add a Adhesive body warmers product Reduce its price to 2 Layaway In the backoffice: Check the Gross Unit Price and Gross List price are different and the Discount is different from 0 (44.44%). This is correct Open Receipt Select previously created layaway Note: layaways cannot be edited so we should force it to be editable. Moreover, the discountLinePrice is calculated only for not editable receipts when they are loaded, so we should force it was editable before loading Open Developers' tools and do the following instruction OB.MobileApp.model.receipt.turnEditable() OB.MobileApp.model.receipt.attributes.lines.models[0].attributes.discountedLinePrice = undefined In the POS: Change the price of the line to the original one (3.60) Pay it In the backoffice: Check the Gross Unit Price and Gross List are equal and the Discount didn't change. It should have been recalculated | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2019-11-08 13:29 | ngarcia | New Issue | ||||||||||
2019-11-08 13:29 | ngarcia | Assigned To | => Retail | |||||||||
2019-11-08 13:29 | ngarcia | OBNetwork customer | => Gold | |||||||||
2019-11-08 13:29 | ngarcia | Support ticket | => 12742 | |||||||||
2019-11-08 13:29 | ngarcia | Resolution time | => 1574982000 | |||||||||
2019-11-08 13:29 | ngarcia | Triggers an Emergency Pack | => No | |||||||||
2019-11-08 13:29 | ngarcia | Issue Monitored: networkb | ||||||||||
2019-11-08 13:37 | ngarcia | Relationship added | related to 0041582 | |||||||||
2019-11-13 22:08 | rqueralta | Assigned To | Retail => rqueralta | |||||||||
2019-11-13 22:08 | rqueralta | Status | new => scheduled | |||||||||
2019-11-21 09:56 | ngarcia | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=19747#r19747 | |||||||||
2019-11-23 14:35 | hgbot | Checkin | ||||||||||
2019-11-23 14:35 | hgbot | Note Added: 0115781 | ||||||||||
2019-11-23 14:35 | hgbot | Status | scheduled => resolved | |||||||||
2019-11-23 14:35 | hgbot | Resolution | open => fixed | |||||||||
2019-11-23 14:35 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/109ef7129404f8b17104c2b65b9b473ea0cd4ca7 [^] | |||||||||
2019-11-28 19:00 | marvintm | Review Assigned To | => marvintm | |||||||||
2019-11-28 19:00 | marvintm | Status | resolved => closed | |||||||||
2019-11-28 19:00 | marvintm | Fixed in Version | => RR20Q1 |
Notes | |||||
|
|||||
|
|