Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043769Retail ModulesWeb POSpublic2020-04-17 13:172020-04-24 15:03
jorge-garcia 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR20Q3 
marvintm
No
0043769: Discretionary Promotions in New Discount Engine for WebPOS state
Discretionary promotions are added to the receipt in several ways depending on the discretionary promotion applied (manual promotion, manual by total promotion or coupons).

This promotions were added in a proper way by the WebPOS adapter before are calculated by the new discount engine

As part of WebPOS state development, we want to avoid the adapter and use a object property in the receipt called "discountsFromUser" every time a discretionary promotions is added/modified/removed.

"discountsFromUser" is a plain javascript object with three objects inside:
  * manualPromotions: plain JS array with manual promotions from retail discounts module.
  * bytotalManualPromotions: plain JS array with manual promotions from retail by total discounts module.
  * coupons: plain JS array with manual promotions from retail coupons discounts module.

The logic of discretionary promotion calculation must not be changed and the results should be the same as before.
-
No tags attached.
causes defect 0043961 new Retail cannot split line with "User Defined Line Amount" discount 
causes defect 0047453pi closed javierRodriguez issue with chrome 92 in addPromotion manual 
Issue History
2020-04-17 13:17jorge-garciaNew Issue
2020-04-17 13:17jorge-garciaAssigned To => jorge-garcia
2020-04-17 13:17jorge-garciaTriggers an Emergency Pack => No
2020-04-17 13:17jorge-garciaStatusnew => scheduled
2020-04-17 13:47hgbotCheckin
2020-04-17 13:47hgbotNote Added: 0119240
2020-04-17 13:47hgbotCheckin
2020-04-17 13:47hgbotNote Added: 0119241
2020-04-17 18:13hgbotCheckin
2020-04-17 18:13hgbotNote Added: 0119242
2020-04-18 00:07hgbotCheckin
2020-04-18 00:07hgbotNote Added: 0119244
2020-04-18 00:07hgbotStatusscheduled => resolved
2020-04-18 00:07hgbotResolutionopen => fixed
2020-04-18 00:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c4825f3c82669db4c1f8701d7500d7f93d9d9df1 [^]
2020-04-18 00:08hgbotCheckin
2020-04-18 00:08hgbotNote Added: 0119245
2020-04-24 15:03marvintmReview Assigned To => marvintm
2020-04-24 15:03marvintmStatusresolved => closed
2020-04-24 15:03marvintmFixed in Version => RR20Q3
2020-05-06 13:41alostaleRelationship addedcauses 0043961
2021-07-26 17:58adrianromeroRelationship addedcauses 0047453

Notes
(0119240)
hgbot   
2020-04-17 13:47   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: d1d8cf3395f8bb726a20b9dd0eb22fba85cae28f
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 13:22:08 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/d1d8cf3395f8bb726a20b9dd0eb22fba85cae28f [^]

Related to BUG-43769: Change manual by total promotions to use
discountsFromUser object from receipt

---
M web/org.openbravo.retail.discounts.bytotal/js/deleteDiscountExtension.js
M web/org.openbravo.retail.discounts.bytotal/js/preApplyDiscountsHook.js
---
(0119241)
hgbot   
2020-04-17 13:47   
Repository: erp/pmods/org.openbravo.retail.discounts.coupons
Changeset: f4e367b41b87d1ca351edb1c9b863e462e70b8c2
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 13:23:28 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.coupons/rev/f4e367b41b87d1ca351edb1c9b863e462e70b8c2 [^]

Related to BUG-43769: Change coupons to use discountsFromUser object
from receipt

---
M web/org.openbravo.retail.discounts.coupons/js/hooks/preordersavehook.js
M web/org.openbravo.retail.discounts.coupons/js/utils/utils.js
---
(0119242)
hgbot   
2020-04-17 18:13   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 028f0681376926549e36c8eb94356ce20225ccb1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 18:12:59 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/028f0681376926549e36c8eb94356ce20225ccb1 [^]

Related to BUG-43769: Initialize receipt discountFromUser object
in case it does not exists

---
M web/org.openbravo.retail.discounts.bytotal/js/preApplyDiscountsHook.js
---
(0119244)
hgbot   
2020-04-18 00:07   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c4825f3c82669db4c1f8701d7500d7f93d9d9df1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 13:30:00 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c4825f3c82669db4c1f8701d7500d7f93d9d9df1 [^]

Fixed BUG-43769: Change manual promotions to use discountsFromUser
receipt object

Logic from WebPOs connector has change and does not do anymore the
transformation of discretionary promotions.

---
M web/org.openbravo.retail.posterminal/js/components/modalsplitlines.js
M web/org.openbravo.retail.posterminal/js/discountsengine/pos/pos-discounts.js
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/modals/modalDeleteDiscounts.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/ticketdiscount.js
---
(0119245)
hgbot   
2020-04-18 00:08   
Repository: tools/automation/pi-mobile
Changeset: e64fec37d158e510325bfabdbf9d5ceac6ff3eca
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 13:37:38 2020 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e64fec37d158e510325bfabdbf9d5ceac6ff3eca [^]

Related to BUG-43769: Remove test from Cancel and Replace as it is
not valid

In a cancel and replace scenario, manual promotions applied should
not be recalculated even if the line is changed.

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/CancelAndRplcManualDiscount.java
---