Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037114Retail ModulesWeb POSpublic2017-10-19 12:382017-11-17 14:16
jorge-garcia 
jorge-garcia 
urgentmajorsometimes
closedfixed 
5
 
RR18Q1 
marvintm
No
0037114: By total discounts should ignore discount priority and be calculated at the end
By total discounts should ignore discount priority and be calculated at the end
1) Login in the WebPOS.
2) Apply a combo to the ticket.
3) Go to discounts entry menu and apply a Variable Discount per Total Amount promotion to all lines without checking overwrite Promotion.
4) Depending on priorities of both discount, it could happen the combo promotion is overwrite (and it should not).
No tags attached.
related to feature request 0034674 closed guillermogil Implement Manual discounts by Total 
related to defect 0037017 closed jorge-garcia Manual discounts with priorities are generating an error 
related to defect 0037260 closed rqueralta Combos and Pack are not working properly in some cases 
Issue History
2017-10-19 12:38jorge-garciaNew Issue
2017-10-19 12:38jorge-garciaAssigned To => jorge-garcia
2017-10-19 12:38jorge-garciaTriggers an Emergency Pack => No
2017-10-19 12:38jorge-garciaRelationship addedrelated to 0034674
2017-10-19 12:38jorge-garciaStatusnew => scheduled
2017-10-19 12:44hgbotCheckin
2017-10-19 12:44hgbotNote Added: 0099962
2017-10-19 12:44hgbotStatusscheduled => resolved
2017-10-19 12:44hgbotResolutionopen => fixed
2017-10-19 12:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8ab3d80bdbeca2bc9c576d04fe45bd83b8682bd1 [^]
2017-10-24 16:26jorge-garciaRelationship addedrelated to 0037017
2017-10-25 11:52hgbotCheckin
2017-10-25 11:52hgbotNote Added: 0100051
2017-10-25 15:05hgbotCheckin
2017-10-25 15:05hgbotNote Added: 0100062
2017-10-25 15:05hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8ab3d80bdbeca2bc9c576d04fe45bd83b8682bd1 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8a17462fb22e24e969df8d776c46d0d6f79ae527 [^]
2017-10-25 15:06hgbotCheckin
2017-10-25 15:06hgbotNote Added: 0100063
2017-11-08 08:34hgbotCheckin
2017-11-08 08:34hgbotNote Added: 0100322
2017-11-08 08:35hgbotCheckin
2017-11-08 08:35hgbotNote Added: 0100323
2017-11-08 12:38jorge-garciaRelationship addedrelated to 0037260
2017-11-08 15:52hgbotCheckin
2017-11-08 15:52hgbotNote Added: 0100353
2017-11-08 15:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8a17462fb22e24e969df8d776c46d0d6f79ae527 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7c00d0acd0cdc071346648f4af08cf64ed78985c [^]
2017-11-08 15:53hgbotCheckin
2017-11-08 15:53hgbotNote Added: 0100354
2017-11-08 15:53hgbotCheckin
2017-11-08 15:53hgbotNote Added: 0100355
2017-11-13 18:24PracticsIssue Monitored: Practics
2017-11-17 14:16marvintmReview Assigned To => marvintm
2017-11-17 14:16marvintmStatusresolved => closed
2017-11-17 14:16marvintmFixed in Version => RR18Q1

Notes
(0099962)
hgbot   
2017-10-19 12:44   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 8ab3d80bdbeca2bc9c576d04fe45bd83b8682bd1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Oct 19 12:26:57 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8ab3d80bdbeca2bc9c576d04fe45bd83b8682bd1 [^]

Fixed issue 37114: By total discounts should ignore discount priority
and be calculated at the end

All discounts by total should be moved at the end of discount array
list to be calculated at the end of the process.

This is done using preApplyAutomaticDiscount hook.

---
M src/org/openbravo/retail/discounts/bytotal/DiscTComponentProvider.java
A web/org.openbravo.retail.discounts.bytotal/js/preApplyAutomaticDiscountHook.js
---
(0100051)
hgbot   
2017-10-25 11:52   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: cacd593b7d7f15b2f4f98cade26eae7ff3d6fa1d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Oct 25 11:37:10 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/cacd593b7d7f15b2f4f98cade26eae7ff3d6fa1d [^]

Related to issue 37114: By total discounts should ignore discount priority
and be calculated at the end

Manual by total discount should replace previous manual by total discounts.

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0100062)
hgbot   
2017-10-25 15:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 8a17462fb22e24e969df8d776c46d0d6f79ae527
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Oct 25 11:39:33 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8a17462fb22e24e969df8d776c46d0d6f79ae527 [^]

Fixed issue 37114: By total discounts should ignore discount priority
and be calculated at the end

Attribute idx indicates the priority in which the promotions should be
calculated. It’s necessary this order is calculated after
preApplyDiscountsHook.

The units consumed by other promotions should be smarter.

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0100063)
hgbot   
2017-10-25 15:06   
Repository: tools/automation/pi-mobile
Changeset: faf758ac09db320a85ec2ae295c568884bdf214f
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Oct 25 11:40:26 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/faf758ac09db320a85ec2ae295c568884bdf214f [^]

Related to issue 37114: By total discounts should ignore discount priority
and be calculated at the end

test should be changed to work properly.

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdScaledPriceAndManualPromo.java
---
(0100322)
hgbot   
2017-11-08 08:34   
Repository: erp/pmods/org.openbravo.retail.discounts.combo
Changeset: 8fd670d804e00ef27dcab28246ee77461de84b5e
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 07 17:51:13 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.combo/rev/8fd670d804e00ef27dcab28246ee77461de84b5e [^]

Related to issue 37114: By total discounts should ignore discount priority and
be calculated at the end

Change combo implementation to check the number of units available to apply
the promotion using the new receipt API ccheckAvailableUnitsPerLine.

---
M web/org.openbravo.retail.discounts.combo/source/combo-rule-impl.js
---
(0100323)
hgbot   
2017-11-08 08:35   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: d1f9bea443f073b98c4afd2bafc9bb26281ab4aa
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 07 17:52:31 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/d1f9bea443f073b98c4afd2bafc9bb26281ab4aa [^]

Related to issue 37114: By total discounts should ignore discount priority and
be calculated at the end

By total discounts are applied at the end, and even they are set to not apply in
cascade, they should not consume units.

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0100353)
hgbot   
2017-11-08 15:52   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7c00d0acd0cdc071346648f4af08cf64ed78985c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 07 17:56:07 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7c00d0acd0cdc071346648f4af08cf64ed78985c [^]

Fixed issue 37114: By total discounts should ignore discount priority and
be calculated at the end

The priority old code could cause some performance problems in the
webPOS, including a maximum callstack (infinite loop). This code has
been removed.

Added a new API to check the number of units available per line.

Improve addPromotion logic.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0100354)
hgbot   
2017-11-08 15:53   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 72f2a61d39fbd84909681077b27c2b7f769a8376
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 07 17:53:51 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/72f2a61d39fbd84909681077b27c2b7f769a8376 [^]

Related to issue 37114: By total discounts should ignore discount priority and
be calculated at the end

Change pack implementation to use the new API to check the available units
per line.

---
M web/org.openbravo.retail.discounts/js/promotion-pack.js
---
(0100355)
hgbot   
2017-11-08 15:53   
Repository: tools/automation/pi-mobile
Changeset: 48fc3af3456455e51550ab5a35d0730f2641631c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Nov 08 11:55:30 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/48fc3af3456455e51550ab5a35d0730f2641631c [^]

Related to issue 37114: By total discounts should ignore discount priority and
be calculated at the end

Change tests to adapt to the new functionality.

Added new testIds for the tests.

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_combo/I34809_WrongCalculationOfComboDependingSequence.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I33201_VerifyPackCombinedWithManualPromotions.java
---