Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041148Retail ModulesWeb POSpublic2019-06-21 10:582019-08-09 14:56
xabiermerino 
rqueralta 
urgentmajoralways
closedfixed 
5
 
RR19Q3 
marvintm
No
0041148: Wrong ticket if we apply two similiar "Free product per total amount" promotions
 Promotion 1 "Free product per total amount"
> Total amount:5
> Free product: Avanalncher

 Promotion 2 "Free product per total amount"
> Total amount:5
> Free product: Avanalncher

1.- Create a ticket with amount > 5
2.- Click Amount button
3.- Introduce one of the promotion
4.- Click again the amount button
5.- Select the other promotion
6.- Pay it
7.- Go to backend and realize that "The sum of the gross of each line does not equal the gross of the order"
No tags attached.
depends on backport 0041264RR19Q3 closed rqueralta Wrong ticket if we apply two similiar "Free product per total amount" promotions 
png Screenshot from 2019-07-11 12-59-49.png (140,942) 2019-07-11 13:02
https://issues.openbravo.com/file_download.php?file_id=13110&type=bug
png

png Screenshot from 2019-07-11 12-48-55.png (164,167) 2019-07-11 13:03
https://issues.openbravo.com/file_download.php?file_id=13111&type=bug
png
Issue History
2019-06-21 10:58xabiermerinoNew Issue
2019-06-21 10:58xabiermerinoAssigned To => Retail
2019-06-21 10:58xabiermerinoResolution time => 1561672800
2019-06-21 10:58xabiermerinoTriggers an Emergency Pack => No
2019-06-24 05:15rqueraltaAssigned ToRetail => rqueralta
2019-06-24 05:15rqueraltaStatusnew => scheduled
2019-06-27 10:49Asantos9Issue Monitored: Asantos9
2019-06-27 23:26hgbotCheckin
2019-06-27 23:26hgbotNote Added: 0113080
2019-06-27 23:26hgbotStatusscheduled => resolved
2019-06-27 23:26hgbotResolutionopen => fixed
2019-06-27 23:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/e2a0f4d8072718197e53687bc218acfc9f618d3b [^]
2019-06-28 13:42rqueraltaStatusresolved => new
2019-06-28 13:42rqueraltaResolutionfixed => open
2019-07-01 14:10hgbotCheckin
2019-07-01 14:10hgbotNote Added: 0113117
2019-07-01 14:10hgbotStatusnew => resolved
2019-07-01 14:10hgbotResolutionopen => fixed
2019-07-01 14:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/e2a0f4d8072718197e53687bc218acfc9f618d3b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/954c72f4256abfb5ec05c0f10078e93d7af0938f [^]
2019-07-01 14:11hgbotCheckin
2019-07-01 14:11hgbotNote Added: 0113118
2019-07-03 17:50rqueraltaStatusresolved => new
2019-07-03 17:50rqueraltaResolutionfixed => open
2019-07-03 17:51rqueraltaStatusnew => scheduled
2019-07-03 17:51rqueraltaStatusscheduled => resolved
2019-07-03 17:51rqueraltaResolutionopen => fixed
2019-07-11 12:49hgbotCheckin
2019-07-11 12:49hgbotNote Added: 0113271
2019-07-11 13:02adrianromeroNote Added: 0113273
2019-07-11 13:02adrianromeroStatusresolved => new
2019-07-11 13:02adrianromeroResolutionfixed => open
2019-07-11 13:02adrianromeroFile Added: Screenshot from 2019-07-11 12-59-49.png
2019-07-11 13:03adrianromeroFile Added: Screenshot from 2019-07-11 12-48-55.png
2019-08-09 14:56marvintmStatusnew => scheduled
2019-08-09 14:56marvintmStatusscheduled => resolved
2019-08-09 14:56marvintmFixed in Version => RR19Q3
2019-08-09 14:56marvintmResolutionopen => fixed
2019-08-09 14:56marvintmReview Assigned To => marvintm
2019-08-09 14:56marvintmStatusresolved => closed

Notes
(0113080)
hgbot   
2019-06-27 23:26   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: e2a0f4d8072718197e53687bc218acfc9f618d3b
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Jun 27 17:21:42 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/e2a0f4d8072718197e53687bc218acfc9f618d3b [^]

Fixed issue 41148: Wrong ticket if we apply two similiar "Free product per total
amount" promotions

- After apply the free product discount sometimes the receipt is not recalculated,
now to be sure a calculate gross is forced

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
---
(0113117)
hgbot   
2019-07-01 14:10   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 954c72f4256abfb5ec05c0f10078e93d7af0938f
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jun 26 19:24:43 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/954c72f4256abfb5ec05c0f10078e93d7af0938f [^]

Fixed issue 41148: Wrong ticket if we apply two similiar "Free product per total
amount" promotions

- After apply the free product discount sometimes the receipt is not recalculated,
now to be sure a calculate gross is forced

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0113118)
hgbot   
2019-07-01 14:11   
Repository: tools/automation/pi-mobile
Changeset: 88f1a64ac5743ae2ba8b096205f1e8536d1690ce
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Sun Jun 30 09:09:32 2019 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/88f1a64ac5743ae2ba8b096205f1e8536d1690ce [^]

Related to issue 41148: Wrong ticket if we apply two similiar "Free product per
total amount" promotions

- Required changes in three test case:
  SplitLineWithAutomaticPromoFreeProdPerTotalAmt
  SplitLineWithPromoComboFamilyComboFreeProd
  I41092_VerifyFreeProductPerTotalAmount

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I41092_VerifyFreeProductPerTotalAmount.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdPerTotalAmt.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithPromoComboFamilyComboFreeProd.java
---
(0113271)
hgbot   
2019-07-11 12:49   
Repository: retail/backports/3.0RR19Q3/pi-mobile
Changeset: 2311618d625d63a9a90ccee2729cdafc34f6216e
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Jul 11 10:34:21 2019 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR19Q3/pi-mobile/rev/2311618d625d63a9a90ccee2729cdafc34f6216e [^]

Related to issue 41148: Wrong ticket if we apply two similiar "Free product per
total amount" promotions

- Required changes in three test case:
SplitLineWithAutomaticPromoFreeProdPerTotalAmt
SplitLineWithPromoComboFamilyComboFreeProd
I41092_VerifyFreeProductPerTotalAmount

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I41092_VerifyFreeProductPerTotalAmount.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdPerTotalAmt.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithPromoComboFamilyComboFreeProd.java
---
(0113273)
adrianromero   
2019-07-11 13:02   
It looks like now it is calculated the total of the receipt but some weird things still happens related for this test.

For example in the test line https://code.openbravo.com/tools/automation/pi-mobile/file/tip/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdPerTotalAmt.java#l112 [^]

Observe After increasing in one unit the "Camera Bag" line it has now two units, the total of the line is 21.00, ant the discount it is still -10.50. This is OK because it has been defined the discount with just 1 free unit of Camera Bag in the discount -> https://code.openbravo.com/tools/automation/pi-mobile/file/tip/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdPerTotalAmt.java#l166 [^] But the total is not incremented.

Other possible issue is testing locally with the same discount applied is that defining the same discount as defined in the test: Free Products per Total Amount with a total greater than 500 with 3 free units of Adhesive body warmers and 1 free unit of Camera bag. If I create one ticket with 4 Avalanche transceiver and 4 "Camera bag", The POS adds a discount for the 4 camera bags. This is wrong, only one has to be free. And the label says "-- (2x) Free" when actually the application is discounting the 4 units.

See screenshots attached.