Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0047741 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Discounts and Promotions | major | always | 2021-09-22 20:47 | 2021-10-20 08:34 | |||
Reporter | lbressan | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR22Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | RR20Q2.2 | SCM revision | ||||||
Merge Request Status | approved | |||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | 29025 | |||||||
Regression level | ||||||||
Regression date | 2021-10-08 | |||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0047741: Problem with discount aplication | |||||||
Description | Problem when applying a discount of the 3x2 type, when loading 3 units of the promotional product it is applied correctly but when loading more than 3 units a second discount of 10 percent applies, which is not applicable. | |||||||
Steps To Reproduce | 1. Create promotion of type 'Fixed Percentage Discount' with the check of 'Apply Next Discount / Promotions' activated. 2. Create promotion of type 'Buy X and pay Y of same product' with the check of 'Apply Next Discount / Promotions' deactivated. 3. In the POS, generate a sales order for the product in promotion, set the number of units of this product to 3, the corresponding promotion will appear. 4. Then, change the number of units for one greater than 3 and it will be observed that a second discount is applied when it should not because the check mentioned above is deactivated. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0132032) marvintm (viewer) 2021-09-27 16:56 |
For lines with multiple units, the check "apply next discount" applies only to the units that have received the discount. In the example shown, when there is 4 units, 3 of them are consumed by the 3x2 discount, but the fourth one is "free", and therefore it receives the 10% discount. This is the intended behaviour. |
(0132070) marvintm (viewer) 2021-09-29 15:45 |
Actually we checked again, and even though the second discount should be applied (because there is a free unit in the line), the amount of this discount is incorrect, because it is calculated from the discounted amount of the line (after applying the first discount), while instead it should be calculated from the available units. |
(0132227) hgbot (developer) 2021-10-07 07:35 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/38 [^] |
(0132375) hgbot (developer) 2021-10-18 07:56 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^] Changeset: 3c0f20ac8152b046e41c940fd5c3cefc993777e8 Author: Ranjith S R <ranjith@qualiantech.com> Date: 2021-10-16T17:06:10+05:30 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/3c0f20ac8152b046e41c940fd5c3cefc993777e8 [^] Fixed ISSUE-47741: FixedPercentage discount should be applied only for available quantity * If ticket line qty was consumed by previous discount, then fixed percentage discount should be applied only for available quantity --- A src-test/org/openbravo/retail/discounts/test/unittests/combined/I47741_VerifyDiscountAfterQtyConsumed.java M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-engine.js M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/fixed-percentage-discount.js M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/price-adjustment-discount.js M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js --- |
(0132376) hgbot (developer) 2021-10-18 07:56 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/38 [^] |
(0132469) ranjith_qualiantech_com (viewer) 2021-10-20 07:56 |
Price Adjustment calculation is not working after the changes for the following case Backoffice 1) Create New discount with Type - Price Adjustment 2) Add Fixed Unit Price as 90 and Min Quantity as 2 POS 1) Add 5 Quantity of Product Bottles 2) Change price from 9.5 to 100 3x2 Bottle discount will be applied Newly created discount should be applied. But its not |
(0132474) hgbot (developer) 2021-10-20 08:04 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/39 [^] |
(0132475) hgbot (developer) 2021-10-20 08:34 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/39 [^] |
(0132476) hgbot (developer) 2021-10-20 08:34 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^] Changeset: 54074d545dffe8139da3ec967c8565a2bedda9db Author: Ranjith S R <ranjith@qualiantech.com> Date: 2021-10-20T11:29:11+05:30 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/54074d545dffe8139da3ec967c8565a2bedda9db [^] Fixed ISSUE-47741: Updated Discount calculation for Price Adjustment * For Price Adjustment Fixed Unit price calculation, discount should be applied for availableUnitPrice instead of unitPrice --- M src-test/org/openbravo/retail/discounts/test/unittests/DiscountsUnitTestSuite.java M src-test/org/openbravo/retail/discounts/test/unittests/combined/I47741_VerifyDiscountAfterQtyConsumed.java M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/price-adjustment-discount.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2021-09-22 20:47 | lbressan | New Issue | |
2021-09-22 20:47 | lbressan | Assigned To | => Retail |
2021-09-22 20:47 | lbressan | File Added: promotions_error.zip | |
2021-09-22 20:47 | lbressan | OBNetwork customer | => No |
2021-09-22 20:47 | lbressan | Support ticket | => 29025 |
2021-09-22 20:47 | lbressan | Regression date | => 2021-10-08 |
2021-09-22 20:47 | lbressan | Triggers an Emergency Pack | => No |
2021-09-27 16:56 | marvintm | Review Assigned To | => marvintm |
2021-09-27 16:56 | marvintm | Note Added: 0132032 | |
2021-09-27 16:56 | marvintm | Status | new => closed |
2021-09-27 16:56 | marvintm | Resolution | open => no change required |
2021-09-29 15:45 | marvintm | Note Added: 0132070 | |
2021-09-29 15:45 | marvintm | Status | closed => new |
2021-09-29 15:45 | marvintm | Resolution | no change required => open |
2021-10-04 08:28 | marvintm | OBNetwork customer | No => OBPS |
2021-10-05 06:00 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2021-10-07 07:35 | hgbot | Merge Request Status | => open |
2021-10-07 07:35 | hgbot | Note Added: 0132227 | |
2021-10-10 08:13 | ranjith_qualiantech_com | Status | new => scheduled |
2021-10-18 07:56 | hgbot | Merge Request Status | open => approved |
2021-10-18 07:56 | hgbot | Resolution | open => fixed |
2021-10-18 07:56 | hgbot | Status | scheduled => closed |
2021-10-18 07:56 | hgbot | Fixed in Version | => RR22Q1 |
2021-10-18 07:56 | hgbot | Note Added: 0132375 | |
2021-10-18 07:56 | hgbot | Note Added: 0132376 | |
2021-10-19 08:20 | ranjith_qualiantech_com | File Added: 47741_discounts_20Q1.diff | |
2021-10-19 10:40 | ranjith_qualiantech_com | File Deleted: 47741_discounts_20Q1.diff | |
2021-10-20 07:56 | ranjith_qualiantech_com | Note Added: 0132469 | |
2021-10-20 07:56 | ranjith_qualiantech_com | Status | closed => new |
2021-10-20 07:56 | ranjith_qualiantech_com | Resolution | fixed => open |
2021-10-20 07:56 | ranjith_qualiantech_com | Fixed in Version | RR22Q1 => |
2021-10-20 08:04 | hgbot | Note Added: 0132474 | |
2021-10-20 08:04 | ranjith_qualiantech_com | Status | new => scheduled |
2021-10-20 08:34 | hgbot | Note Added: 0132475 | |
2021-10-20 08:34 | hgbot | Resolution | open => fixed |
2021-10-20 08:34 | hgbot | Status | scheduled => closed |
2021-10-20 08:34 | hgbot | Fixed in Version | => RR22Q1 |
2021-10-20 08:34 | hgbot | Note Added: 0132476 |
Copyright © 2000 - 2009 MantisBT Group |