Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036645Retail ModulesDiscounts Combopublic2017-08-14 10:242017-10-06 15:12
malsasua 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR18Q1 
marvintm
No
0036645: combo price is not correct: wrong total amount is calculated
in some cases, the total price calculated using combo discount is wrong. It happens defining price by family.
(please, contact with support team to provide the environment where the problem is reproducible)

define combo:
 total amount of combo: 22

New bill:
. add two combo: total amount: 44
. add new line with one product (this product belongs to combo) price: 7

Problem:
  total amount calculated: 46.49
  correct total amount: 51
No tags attached.
related to defect 0036781 closed rqueralta Combo Fix price discount is not working correctly when you add the same combo twice in the same ticket. 
Issue History
2017-08-14 10:24malsasuaNew Issue
2017-08-14 10:24malsasuaAssigned To => Retail
2017-08-14 10:24malsasuaResolution time => 1504562400
2017-08-14 10:24malsasuaTriggers an Emergency Pack => No
2017-08-14 10:27malsasuaNote Added: 0098498
2017-09-06 18:28gorka_gilAssigned ToRetail => gorka_gil
2017-09-07 16:35gorka_gilAssigned Togorka_gil => Retail
2017-09-11 12:54jorge-garciaStatusnew => scheduled
2017-09-11 12:55jorge-garciaAssigned ToRetail => jorge-garcia
2017-10-06 10:24hgbotCheckin
2017-10-06 10:24hgbotNote Added: 0099787
2017-10-06 13:11hgbotCheckin
2017-10-06 13:11hgbotNote Added: 0099799
2017-10-06 13:11hgbotCheckin
2017-10-06 13:11hgbotNote Added: 0099800
2017-10-06 13:12hgbotCheckin
2017-10-06 13:12hgbotNote Added: 0099801
2017-10-06 13:12hgbotStatusscheduled => resolved
2017-10-06 13:12hgbotResolutionopen => fixed
2017-10-06 13:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4f472a8ded74ee36605d34273104c6f20db2f23d [^]
2017-10-06 15:11marvintmNote Added: 0099811
2017-10-06 15:12marvintmReview Assigned To => marvintm
2017-10-06 15:12marvintmStatusresolved => closed
2017-10-06 15:12marvintmFixed in Version => RR18Q1
2017-10-17 11:55ngarciaRelationship addedrelated to 0036781

Notes
(0098498)
malsasua   
2017-08-14 10:27   
we have tested it with the last version published (1.0.400)
(0099787)
hgbot   
2017-10-06 10:24   
Repository: erp/pmods/org.openbravo.retail.discount.twofamiliescombo
Changeset: 368bcb788795e4a73e2394dd1d462cde70c5a82b
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Sep 13 17:21:13 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discount.twofamiliescombo/rev/368bcb788795e4a73e2394dd1d462cde70c5a82b [^]

Related to issue 36645: combo price is not correct: wrong total amount is
calculated

Added new attribute to force the replace of this kind of promotions.

---
M web/org.openbravo.retail.discount.twofamiliescombo/source/twofamilies-rule-impl.js
---
(0099799)
hgbot   
2017-10-06 13:11   
Repository: tools/automation/pi-mobile
Changeset: c1ac874407aa0c3d0435ae2a82a97d93627c0288
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Sep 29 09:15:49 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c1ac874407aa0c3d0435ae2a82a97d93627c0288 [^]

Related to issue 36645: combo price is not correct: wrong total amount is
calculated

Due to changes in the discount engine and in some rules, some test must be
changed.

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6781_BuyXPayYSameProduct.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6782_BuyXPayYDifferentProductCheapest_I.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I33201_VerifyPackCombinedWithManualPromotions.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I33390_BuyXPayYSameNonGroupProduct.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticAndManualPromoBuyXPayYSameProd.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPromo.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPromoBuyXPayYSameProd1.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/SplitLineWithAutomaticPromoBuyXPayYSameProd2.java
---
(0099800)
hgbot   
2017-10-06 13:11   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: efc4d42a63c32cab3551478cff19722fb395244c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Sep 29 09:18:21 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/efc4d42a63c32cab3551478cff19722fb395244c [^]

Related to issue 36645: combo price is not correct: wrong total amount is
calculated

The promotion buyXPayYSameProduct has change to work accordingly with
the changes in applyPromotions.

The rule implementation checks all the lines of the receipt in order to apply
the promotion.

---
M web/org.openbravo.retail.discounts/js/promotion-XYsameProduct.js
---
(0099801)
hgbot   
2017-10-06 13:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4f472a8ded74ee36605d34273104c6f20db2f23d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Oct 06 09:26:20 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4f472a8ded74ee36605d34273104c6f20db2f23d [^]

Fixed issue 36645: combo price is not correct: wrong total amount is
calculated

The solution is to allow several promotions with the same ruleId in
the same line.

Additionally, there is new logic to merge promotions with the same
ruleId. The promotions are not merged if the quantity reserved is
higher than the line quantity.

It’s necessary to keep the old functionality for two families combo.

Changed price adjusment rule implementation to work as other rules.

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0099811)
marvintm   
2017-10-06 15:11   
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/a1d4cacc0587 [^]