Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048028Retail ModulesDiscounts by Totalpublic2021-11-10 14:512021-12-02 11:14
ludmila_ursu 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
3020.04.3
RR20Q1.2 
RR22Q1 
No
0048028: Discounts apply to all lines of the ticket
Today, when we set a "Fixed Percentage per Total Amount Discount" or "Fixed Discount per Total Amount" in the backoffice, we may choose to exclude products from this discount.
Nevertheless, in the POS, the product still is discounted

Go to backoffice, Window "Discounts and Promotions". Create a new discount, either of type "Fixed Discount per Total Amount", either of type "Fixed Percentage per Total Amount".
In "Filter Options", "included Products*" option, set "All excluding defined".
Save the new discount.
In tab "Products" of this new discount, add a product, that you want to exclude from the discount.
Save.

Go to POS and add some products to the ticket, and also the product that was set as "excluded" in the promotion.
Click on one line from the ticket, then click on button "Discounts" in the right pane.
Choose the discount that was created in the backoffice.
Apply.

You will notice that all products were discounted, even the excluded product.

This is not correct, the excluded product should not be discounted.
No tags attached.
? print screens discount all lines ticket.odt (370,541) 2021-11-10 14:51
https://issues.openbravo.com/file_download.php?file_id=16338&type=bug
Issue History
2021-11-10 14:51ludmila_ursuNew Issue
2021-11-10 14:51ludmila_ursuAssigned To => Retail
2021-11-10 14:51ludmila_ursuFile Added: print screens discount all lines ticket.odt
2021-11-10 14:51ludmila_ursuTriggers an Emergency Pack => No
2021-11-11 06:57ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-11-19 06:55hgbotNote Added: 0133196
2021-11-19 06:55hgbotNote Added: 0133197
2021-11-19 06:55hgbotNote Added: 0133198
2021-11-19 08:12hgbotResolutionopen => fixed
2021-11-19 08:12hgbotStatusnew => closed
2021-11-19 08:12hgbotFixed in Version => RR22Q1
2021-11-19 08:12hgbotNote Added: 0133203
2021-11-19 08:12hgbotNote Added: 0133204
2021-11-19 08:12hgbotNote Added: 0133205
2021-11-19 08:12hgbotNote Added: 0133206
2021-11-19 08:12hgbotNote Added: 0133207
2021-11-19 08:12hgbotNote Added: 0133208
2021-11-30 13:59ranjith_qualiantech_comNote Added: 0133414
2021-11-30 13:59ranjith_qualiantech_comStatusclosed => new
2021-11-30 13:59ranjith_qualiantech_comResolutionfixed => open
2021-11-30 13:59ranjith_qualiantech_comFixed in VersionRR22Q1 =>
2021-11-30 14:48ranjith_qualiantech_comStatusnew => scheduled
2021-12-01 11:50hgbotNote Added: 0133424
2021-12-02 09:23hgbotResolutionopen => fixed
2021-12-02 09:23hgbotStatusscheduled => closed
2021-12-02 09:23hgbotFixed in Version => RR22Q1
2021-12-02 09:23hgbotNote Added: 0133469
2021-12-02 09:23hgbotNote Added: 0133470
2021-12-02 11:14hgbotNote Added: 0133479
2021-12-02 18:59marvintmNote Deleted: 0133479

Notes
(0133196)
hgbot   
2021-11-19 06:55   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/42 [^]
(0133197)
hgbot   
2021-11-19 06:55   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/631 [^]
(0133198)
hgbot   
2021-11-19 06:55   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/merge_requests/12 [^]
(0133203)
hgbot   
2021-11-19 08:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 31cbe81ccc596778854fbd9e6d163b176370f914
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-11-16T15:35:55+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/31cbe81ccc596778854fbd9e6d163b176370f914 [^]

Fixed ISSUE-48028: Discount Filter should be applied for Manual and ByTotal Promotions

---
M src-test/org/openbravo/retail/discounts/test/base/model/definition/DiscretionaryFixedAmount.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/DiscretionaryFixedPercentage.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/UserDefinedAmount.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/UserDefinedLineAmount.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/UserDefinedPercentage.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountDiscretionaryFixedAmountTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountDiscretionaryFixedPercentageTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountUserDefinedAmountTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountUserDefinedLineAmountTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountUserDefinedPercentageTest.java
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-amount-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-linefinalprice-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/manual-percentage-promotions-discount.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js
---
(0133204)
hgbot   
2021-11-19 08:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/42 [^]
(0133205)
hgbot   
2021-11-19 08:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: af605b8128b7b6b1daa8e05b66f61b73284c78ec
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-11-19T11:20:00+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/af605b8128b7b6b1daa8e05b66f61b73284c78ec [^]

Related to ISSUE-48028: Discount Filter should be applied for Manual and ByTotal Promotions

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/AddByTotalPromotion.js
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0133206)
hgbot   
2021-11-19 08:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/631 [^]
(0133207)
hgbot   
2021-11-19 08:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal [^]
Changeset: 3254ec4a5a0681870454c0fe699dae2941b3196a
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-11-15T16:04:30+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/commit/3254ec4a5a0681870454c0fe699dae2941b3196a [^]

Related to ISSUE-48028: Junit test for Discount Filter in ByTotal Promotions

---
M src-test/org/openbravo/discounts/bytotal/test/base/model/definition/FixedDiscountPerTotalAmount.java
M src-test/org/openbravo/discounts/bytotal/test/base/model/definition/FixedPercentagePerTotalAmount.java
M src-test/org/openbravo/discounts/bytotal/test/base/model/definition/VariableDiscountPerTotalAmount.java
M src-test/org/openbravo/discounts/bytotal/test/base/model/definition/VariablePercentagePerTotalAmount.java
M src-test/org/openbravo/discounts/bytotal/test/unittests/DiscountFixedDiscountPerTotalAmountTest.java
M src-test/org/openbravo/discounts/bytotal/test/unittests/DiscountFixedPercentagePerTotalAmountTest.java
M src-test/org/openbravo/discounts/bytotal/test/unittests/DiscountVariableDiscountPerTotalAmountTest.java
M src-test/org/openbravo/discounts/bytotal/test/unittests/DiscountVariablePercentagePerTotalAmountTest.java
---
(0133208)
hgbot   
2021-11-19 08:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.bytotal/-/merge_requests/12 [^]
(0133414)
ranjith_qualiantech_com   
2021-11-30 13:59   
Manual Promotions not properly applied when doing CR
(0133424)
hgbot   
2021-12-01 11:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/45 [^]
(0133469)
hgbot   
2021-12-02 09:23   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: e1c2aff42ba858acb15bae71aaf1ca98cd62574e
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-12-02T08:23:05+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/e1c2aff42ba858acb15bae71aaf1ca98cd62574e [^]

Fixed ISSUE-48028: Manual Promotions should be recalculated when doing CR

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js
---
(0133470)
hgbot   
2021-12-02 09:23   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/45 [^]