Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0042911 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Retail Modules] Discounts and Promotions | major | always | 2020-01-15 10:44 | 2020-02-17 12:51 | |||
Reporter | santi_lozano | View Status | public | |||||
Assigned To | markmm82 | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR20Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 716b00f146b8 | ||||
Projection | none | ETA | none | Target Version | RR20Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | guilleaer | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | 14190 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0042911: Promotions or discounts for a concrete characteristic are not being applied well | |||||||
Description | After adding a discount for a concrete characteristic on back office, on web POS adding products to the ticket with that characteristic results in the discount only being applied when next product is added to the ticket (see images attached) | |||||||
Steps To Reproduce | * go to Openbravo livebuilds section Retail with module (pgsql link for back office, webpos for web POS) * Go to back office, change role to The White Valley Group Admin * create a new discount / promotion on window Discounts and Promotions. Organization = *, Discount/Promotion Type = Fixed Percentage Discount, Name = whatever test, Printed Name = whatever test, Starting Date = “today”, Priority = 10, Included Characteristics = Only those defined, Discount % = 10. On tab Characteristics create a new record: Active = Yes, Characteristic = Capacity, Characteristic Value = Under 2L. * go to Web POS, search for products, select Capacity, on the popup select Under 2L, add the first one to the ticket * the discount has not been applied * add the second one to the ticket * the discount is now applied to the product we added before only | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0117306) hgbot (developer) 2020-01-28 19:50 |
Repository: retail/backports/3.0RR20Q1/org.openbravo.retail.posterminal Changeset: 716b00f146b8fdda5d92bf62d2d605817e3ced90 Author: Mark Molina <mark.molina <at> doceleguas.com> Date: Tue Jan 28 10:39:35 2020 -0300 URL: http://code.openbravo.com/retail/backports/3.0RR20Q1/org.openbravo.retail.posterminal/rev/716b00f146b8fdda5d92bf62d2d605817e3ced90 [^] Fixed issue 42911: Correctly applied promotions to product with characteristics Promotions or discounts for a concrete characteristic was not being applied well because the first time the product was added to the ticket, a new line was created and finally as the last step, the product characteristics was updated to the line. The discount engine was verifying if was possible to apply the discount for products with characteristics defined in the rule, but it was happening before the product characteristic list of the product was updated in model, so the rule was been marked as not possible to apply to the new created line. To fix this issue, was updated the product model to be added into the ticket, with all it characteristics before adding the product to the line, and execute the discount validations. This fix updates the productCharacteristics attribute of the product model before the line is created, instead of update the line itself after the line was created and discounts validations fired. As the product characteristics are updated previously to create the line (before the OBPOS_PreAddProductToOrder hook is executed), it is not needed to do this when the OBPOS_PostAddProductToOrder hook is executed, so the execution at this point of the code was removed. --- M web/org.openbravo.retail.posterminal/js/model/order.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2020-01-16 15:36 | marvintm | Type | defect => backport |
2020-01-16 15:36 | marvintm | Target Version | => RR20Q1 |
2020-01-28 19:50 | hgbot | Checkin | |
2020-01-28 19:50 | hgbot | Note Added: 0117306 | |
2020-01-28 19:50 | hgbot | Status | scheduled => resolved |
2020-01-28 19:50 | hgbot | Resolution | open => fixed |
2020-01-28 19:50 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/retail/backports/3.0RR20Q1/org.openbravo.retail.posterminal/rev/716b00f146b8fdda5d92bf62d2d605817e3ced90 [^] |
2020-02-17 12:51 | guilleaer | Review Assigned To | => guilleaer |
2020-02-17 12:51 | guilleaer | Status | resolved => closed |
2020-02-17 12:51 | guilleaer | Fixed in Version | => RR20Q1 |
Copyright © 2000 - 2009 MantisBT Group |