Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040620
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-04-15 17:522019-04-24 12:18
ReporterxabiermerinoView Statuspublic 
Assigned Tojorge-garcia 
PrioritynormalResolutionfixedFixed in VersionRR19Q3
StatusclosedFix in branchFixed in SCM revisione2c852a8e323
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toadrianromero
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040620: The priority of promotions is not managed properly

DescriptionWe have three promotions:
Promotion 1.-
* Price adjustment;
* Fixed Price 140;
* Product Avalanche Transceiver;
* Priority: 400

Promotion 2.-
* Scaled Price;
* 1 unit 0% discount; 2 unit 50% discount
* All products
* Priority: 450

Promotion 3.-
* Discount per total amount;
* Total receipt 0; Amount 10
* For Avalanche transceiver
* Priority: 500
* Uses coupon
* Coupon code: COUPON10
Note: In customer environment this discounts is defined with any specific selection. (All excluding define -> no products defined)


The third promotions is applied in second place when it priority is less than promotion 2
Steps To Reproduce1.- Log into webPOS
2.- Create a ticket
3.- Introduce Avalanche transceiver:
TICKET:
* Avalanceh transceiver 150,50€
   > Promotion 1 --> -10,50€
TOTAL: 140€

4.- Introduce Balaclava Cap. Second unit with 50% off is applied to the line with less price (avalanche)
TICKET:
* Avalanceh transceiver 150,50€
   > Promotion 1 --> Fixed price --> -10,50€
   > Promotion 2 --> 2ª Ud 50% ----> -70€ (OK)
* Balaclava CAP 169€
TOTAL: 239€

5.- Introduce COUPON10
TICKET:
* Avalanceh transceiver 150,50€
   > Promotion 1 --> Fixed price --> -10,50€
   > Promotion 3 --> Coupon --> WRONG: it has less priority of promotion 3
   > Promotion 2 --> 2ª Ud 50% ----> -65€ WRONG --> Now, 50% is applied for 130€ of avalanche (140-coupon10)
* Balaclava CAP 169€
TOTAL: 234€ --> WRONG


Proposed SolutionPromotion 3 has to be applied in third place. This should be the ticket:
TICKET:
* Avalanceh transceiver 150,50€
   > Promotion 1 --> Fixed price --> -10,50€
   > Promotion 2 --> 2ª Ud 50% ----> -70€
   > Promotion 3 --> Coupon -------> -10€
* Balaclava CAP 169€
TOTAL: 229€
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0040460 closedranjith_qualiantech_com Discounts by Total are not applied properly based on priority 

-  Notes
(0111250)
hgbot (developer)
2019-04-24 08:40

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 81b6d8f43909791b4b7c0ac9d853c8ae32e84475
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 23 17:36:06 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/81b6d8f43909791b4b7c0ac9d853c8ae32e84475 [^]

Related to issue 40620: The priority of promotions is not managed properly

Set executedAtTheEndPromo attribute to by total discounts.

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
M web/org.openbravo.retail.discounts.bytotal/js/promotion-discounttotal.js
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
M web/org.openbravo.retail.discounts.bytotal/js/promotion-percentagediscounttotal.js
---
(0111251)
hgbot (developer)
2019-04-24 08:40

Repository: erp/pmods/org.openbravo.retail.discounts.combo
Changeset: 8299b5a06bfa075a618448b8fdeed5c79d2a5f67
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 23 16:03:14 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.combo/rev/8299b5a06bfa075a618448b8fdeed5c79d2a5f67 [^]

Related to issue 40620: The priority of promotions is not managed properly

Use new API getCurrentDiscountedLinePrice in Combos.

---
M web/org.openbravo.retail.discounts.combo/source/combo-rule-impl.js
---
(0111252)
hgbot (developer)
2019-04-24 08:40

Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: b88c7274bedc51e5b5a0fab7600cf4c4bc207770
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 23 16:04:36 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/b88c7274bedc51e5b5a0fab7600cf4c4bc207770 [^]

Related to issue 40620: The priority of promotions is not managed properly

Use new API getCurrentDiscountedLinePrice in Scaled Price

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0111260)
hgbot (developer)
2019-04-24 11:08

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e2c852a8e323aae31e59d751f03f1c77efad5d74
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 23 15:58:16 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e2c852a8e323aae31e59d751f03f1c77efad5d74 [^]

Fixed issue 40620: The priority of promotions is not managed properly

In some cases (like with discounts by total with a limit of 0) the
discountedLinePrice of a line could not be correctly calculated once a new
multi-line promotion is being applied.

To avoid this incorrect behavior, a new API function has been created to get
the current discounted line price ignoring those promotions applied at the end
of all possible promotions (like by total).

Use new API getCurrentDiscountedLinePrice in Price Adjustment.

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0111261)
hgbot (developer)
2019-04-24 11:09

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 29a4f865ad55f700384034dba112727ce530afb8
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 23 16:02:26 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/29a4f865ad55f700384034dba112727ce530afb8 [^]

Related to issue 40620: The priority of promotions is not managed properly

Use new API getCurrentDiscountedLinePrice in:
  * Buy X Pay Y Same products.
  * Buy X Gift Y.
  * Manual Promotions.
  * Packs.
  * Fixed Percentage Discount.

---
M web/org.openbravo.retail.discounts/js/promotion-XYsameProduct.js
M web/org.openbravo.retail.discounts/js/promotion-buyXgiftY.js
M web/org.openbravo.retail.discounts/js/promotion-discount.js
M web/org.openbravo.retail.discounts/js/promotion-manual.js
M web/org.openbravo.retail.discounts/js/promotion-pack.js
---
(0111264)
adrianromero (manager)
2019-04-24 12:18

Verified.

- Issue History
Date Modified Username Field Change
2019-04-15 17:52 xabiermerino New Issue
2019-04-15 17:52 xabiermerino Assigned To => Retail
2019-04-15 17:52 xabiermerino Triggers an Emergency Pack => No
2019-04-16 09:07 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2019-04-16 09:07 ranjith_qualiantech_com Status new => scheduled
2019-04-16 09:14 ranjith_qualiantech_com Relationship added related to 0040460
2019-04-16 13:35 guilleaer Description Updated View Revisions
2019-04-23 13:16 jorge-garcia Assigned To ranjith_qualiantech_com => jorge-garcia
2019-04-24 08:40 hgbot Checkin
2019-04-24 08:40 hgbot Note Added: 0111250
2019-04-24 08:40 hgbot Checkin
2019-04-24 08:40 hgbot Note Added: 0111251
2019-04-24 08:40 hgbot Checkin
2019-04-24 08:40 hgbot Note Added: 0111252
2019-04-24 11:08 hgbot Checkin
2019-04-24 11:08 hgbot Note Added: 0111260
2019-04-24 11:08 hgbot Status scheduled => resolved
2019-04-24 11:08 hgbot Resolution open => fixed
2019-04-24 11:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e2c852a8e323aae31e59d751f03f1c77efad5d74 [^]
2019-04-24 11:09 hgbot Checkin
2019-04-24 11:09 hgbot Note Added: 0111261
2019-04-24 12:18 adrianromero Review Assigned To => adrianromero
2019-04-24 12:18 adrianromero Note Added: 0111264
2019-04-24 12:18 adrianromero Status resolved => closed
2019-04-24 12:18 adrianromero Fixed in Version => RR19Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker