Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0042649 | Retail Modules | Discounts and Promotions | public | 2019-12-26 05:08 | 2020-01-03 10:11 | |||||||
Reporter | jorgewederago | |||||||||||
Assigned To | ranjith_qualiantech_com | |||||||||||
Priority | high | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR20Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0042649: User defined amount discounts may not work properly under certain circumstances | |||||||||||
Description | When a user defined amount discount was configured initially as user defined % and had a default value on it. If used on ticket that requires to reload the information from the discount the values are wrongly calculated. | |||||||||||
Steps To Reproduce | Backend: -Create a new discount as User Defined % and set 10 as default value -Change the type of the discount to User Defined Amount There are two ways to reproduce the issue: Original issue: -Add a product to the ticket and apply the discount with value 10 -Close the transaction as layaway -Load the receipt and execute in the console OB.MobileApp.model.receipt.turnEditable() -Add a new discount -The previous discount value will be recalculated wrongly How to reproduce it in PI: -Add a product to the ticket and apply the discount with value 10 -Close the transaction as layaway -Load the receipt -Execute cancel and replace -Add an extra unit of the product -The discount will be recalculated wrongly | |||||||||||
Proposed Solution | The issue is related to the following line in order.js if (discount.get('obdiscPercentage')) { Even if the discount type is one which does not need the value of obdiscPercentage since it is present in the discount saved in the local database it is used and thus the discount is wrongly set. The proposed solution would be to add an extra check based on the discount type to avoid this behavior. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | issue 42649 source discounts.patch (3,465) 2019-12-27 13:18 https://issues.openbravo.com/file_download.php?file_id=13737&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2019-12-26 05:08 | jorgewederago | New Issue | ||||||||||
2019-12-26 05:08 | jorgewederago | Assigned To | => Retail | |||||||||
2019-12-26 05:08 | jorgewederago | Resolution time | => 1579129200 | |||||||||
2019-12-26 05:08 | jorgewederago | Triggers an Emergency Pack | => No | |||||||||
2019-12-26 05:09 | jorgewederago | Relationship added | related to 0042630 | |||||||||
2019-12-26 11:10 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com | |||||||||
2019-12-26 11:10 | ranjith_qualiantech_com | Status | new => scheduled | |||||||||
2019-12-27 13:18 | ranjith_qualiantech_com | File Added: issue 42649 source discounts.patch | ||||||||||
2020-01-03 07:19 | hgbot | Checkin | ||||||||||
2020-01-03 07:19 | hgbot | Note Added: 0116613 | ||||||||||
2020-01-03 07:19 | hgbot | Checkin | ||||||||||
2020-01-03 07:19 | hgbot | Note Added: 0116614 | ||||||||||
2020-01-03 07:19 | hgbot | Status | scheduled => resolved | |||||||||
2020-01-03 07:19 | hgbot | Resolution | open => fixed | |||||||||
2020-01-03 07:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/1b526cc30575c0011c3f81ef5665f9e985b60c65 [^] | |||||||||
2020-01-03 10:11 | marvintm | Review Assigned To | => marvintm | |||||||||
2020-01-03 10:11 | marvintm | Status | resolved => closed | |||||||||
2020-01-03 10:11 | marvintm | Fixed in Version | => RR20Q2 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|