Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0042883 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Discounts and Promotions | major | always | 2020-01-15 10:44 | 2020-02-10 19:17 | |||
Reporter | santi_lozano | View Status | public | |||||
Assigned To | markmm82 | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR20Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | d24f1bca5e5c | ||||
Projection | none | ETA | none | Target Version | ||||
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 | 0042883: 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 | ![]() ![]() | |||||||
![]() |
|||||||||||||||
|
![]() |
|
(0117305) hgbot (developer) 2020-01-28 19:47 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: d24f1bca5e5c595577406ca0000f7321eeb9be2c Author: Mark Molina <mark.molina <at> doceleguas.com> Date: Mon Jan 27 11:48:20 2020 -0300 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d24f1bca5e5c595577406ca0000f7321eeb9be2c [^] Fixed issue 42883: 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 --- |
(0117614) hgbot (developer) 2020-02-10 19:17 |
Repository: erp/pmods/org.openbravo.retail.discounts Changeset: a36b49a84e7ca574fe7f251f4c8470cfc5b4018b Author: Mark Molina <mark.molina <at> doceleguas.com> Date: Mon Feb 10 15:13:51 2020 -0300 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/a36b49a84e7ca574fe7f251f4c8470cfc5b4018b [^] Related to issue 42883: Created test for promotions with product characteristics --- M src-test/org/openbravo/retail/discounts/test/base/model/Product.java M src-test/org/openbravo/retail/discounts/test/unittests/DiscountsUnitTestSuite.java A src-test/org/openbravo/retail/discounts/test/unittests/combined/I42883_DiscountsByCharacteristicIsWellApplied.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2020-01-15 10:44 | santi_lozano | New Issue | |
2020-01-15 10:44 | santi_lozano | Assigned To | => Retail |
2020-01-15 10:44 | santi_lozano | File Added: 14190 - reproducido en livebuilds.png | |
2020-01-15 10:44 | santi_lozano | OBNetwork customer | => OBPS |
2020-01-15 10:44 | santi_lozano | Support ticket | => 14190 |
2020-01-15 10:44 | santi_lozano | Resolution time | => 1580857200 |
2020-01-15 10:44 | santi_lozano | Triggers an Emergency Pack | => No |
2020-01-15 10:45 | santi_lozano | File Added: 14190 - livebuilds config mine.png | |
2020-01-16 15:36 | marvintm | Assigned To | Retail => markmm82 |
2020-01-16 15:36 | marvintm | Status | new => scheduled |
2020-01-27 19:04 | martinsdan | Issue Monitored: martinsdan | |
2020-01-28 19:47 | hgbot | Checkin | |
2020-01-28 19:47 | hgbot | Note Added: 0117305 | |
2020-01-28 19:47 | hgbot | Status | scheduled => resolved |
2020-01-28 19:47 | hgbot | Resolution | open => fixed |
2020-01-28 19:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d24f1bca5e5c595577406ca0000f7321eeb9be2c [^] |
2020-01-29 09:38 | guilleaer | Review Assigned To | => guilleaer |
2020-01-29 09:38 | guilleaer | Status | resolved => closed |
2020-01-29 09:38 | guilleaer | Fixed in Version | => RR20Q2 |
2020-02-10 19:17 | hgbot | Checkin | |
2020-02-10 19:17 | hgbot | Note Added: 0117614 |
Copyright © 2000 - 2009 MantisBT Group |