Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038813Retail ModulesDiscounts and Promotionspublic2018-06-22 11:162019-01-22 15:21
joniturralde93 
rqueralta 
urgentmajoralways
closedfixed 
5
pi 
RR18Q4 
jorge-garcia
No
0038813: Scaled price discount doesn't work as expected when a product has it canceled by another discount
When a product in a receipt has another discount with lower priority number and 'Apply next discount' unchecked, the next product with the same Scaled Price Discount gets the next discount from Price Scale just like if the previous one had it assigned too.
1. Configure a Scaled Price discount for 3 products, with 'Apply next discount' unchecked and priority 50. Price Scale: 20, 40, 60.
2. Configure a Fixed Percentage Discount for one of those products (the most expensive one), 'Apply next discount' unchecked, priority 10, discount 60%.
3. Create a receipt in POS and add the 3 products.
4. You can check that, even if the Fixed Percentage Discount product has only that discount applied (60%), the next one in the Scaled Price discount has a 40% discount from Scaled Price instead of 20%, just like if the previous product had Scaled Price Discount applied.
No tags attached.
Issue History
2018-06-22 11:16joniturralde93New Issue
2018-06-22 11:16joniturralde93Assigned To => Retail
2018-06-22 11:16joniturralde93Resolution time => 1531432800
2018-06-22 11:16joniturralde93Triggers an Emergency Pack => No
2018-06-22 11:19PracticsIssue Monitored: Practics
2018-06-28 22:34rqueraltaAssigned ToRetail => rqueralta
2018-06-28 22:34rqueraltaStatusnew => scheduled
2018-07-02 20:22hgbotCheckin
2018-07-02 20:22hgbotNote Added: 0105537
2018-07-03 21:26rqueraltaStatusscheduled => resolved
2018-07-03 21:26rqueraltaResolutionopen => fixed
2018-07-06 15:17hgbotCheckin
2018-07-06 15:17hgbotNote Added: 0105665
2018-07-10 10:30jorge-garciaReview Assigned To => jorge-garcia
2018-07-10 13:27jorge-garciaNote Added: 0105692
2018-07-10 13:27jorge-garciaNote Edited: 0105692bug_revision_view_page.php?bugnote_id=0105692#r17395
2018-07-10 13:28jorge-garciaNote Added: 0105693
2018-07-10 13:28jorge-garciaStatusresolved => closed
2018-07-10 13:28jorge-garciaFixed in Version => RR18Q4
2018-07-27 10:29LeyreNote Added: 0105975
2018-07-27 10:29LeyreStatusclosed => new
2018-07-31 22:13hgbotCheckin
2018-07-31 22:13hgbotNote Added: 0106063
2018-08-01 14:23rqueraltaStatusnew => scheduled
2018-08-01 14:23rqueraltaStatusscheduled => resolved
2018-08-01 22:31hgbotCheckin
2018-08-01 22:31hgbotNote Added: 0106091
2018-08-03 11:24jorge-garciaNote Added: 0106155
2018-08-03 11:24jorge-garciaStatusresolved => closed
2019-01-22 15:21hgbotCheckin
2019-01-22 15:21hgbotNote Added: 0109077
2019-01-22 15:21hgbotCheckin
2019-01-22 15:21hgbotNote Added: 0109078

Notes
(0105537)
hgbot   
2018-07-02 20:22   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: 218d61f729f91c768715dcd5f685fa1f10b0f072
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Jul 02 14:21:52 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/218d61f729f91c768715dcd5f685fa1f10b0f072 [^]

Releted issue 38813: Backed out changeset: 7492fd93224a

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0105665)
hgbot   
2018-07-06 15:17   
Repository: tools/automation/pi-mobile
Changeset: c74c02c4dd996a777600c2a6f52d2b9d7778b665
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jul 04 15:45:38 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c74c02c4dd996a777600c2a6f52d2b9d7778b665 [^]

Related to issue 38813: Added automated test.
Added tests' Suite for Scaled Price Discount tests

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DiscountsScaledPriceSuite.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DiscountsScaledPriceSuiteHV.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/AllScaledPriceDiscountsTests.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/AllScaledPriceDiscountsTestsHV.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother.java
---
(0105692)
jorge-garcia   
2018-07-10 13:27   
This issue also must include this commits:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/7492fd93224a [^]

https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/9ea2236709b9 [^] --> Final Fix

(0105693)
jorge-garcia   
2018-07-10 13:28   
Reviewed and tested
(0105975)
Leyre   
2018-07-27 10:29   
Configuration BackOffice:
Discount 1:
Discount/ Promotion Type: Scaled Price

Apply Next Discount/Promotion = No

Priority: 50

Products:
Product 1: Alpine Poles = 36.5$
Product 2: Alpine skiing backpack 27 L = 109.90$
Product 3: Ski touring boot alpine = 220.9$

Price Scale:
Item 1: 0%
Item 2: 25%
Item 3: 50%
Item 4: 75%
Item 5: 100%

Discount 2:
Discount/ Promotion Type: Fixed Percentage Discount

Apply Next Discount/Promotion = No

Priority: 10

Discount 60%

Product:
Ski touring boot alpine = 220.9$

POS:
Add the products in the following order:
1º Ski touring boot alpine
2º Alpine Poles
3º Alpine Poles
4º Alpine skiing backpack 27 L

The result should be:
1º Ski touring boot alpine - Fixed Percentage Discount 60%
2º Alpine Poles 50 %
3º Alpine Poles 25 %
4º Alpine skiing backpack 27 L 0 %

The result is:
1º Ski touring boot alpine - Fixed Percentage Discount 60%
2º Alpine Poles 50 %
3º Alpine Poles 75 %
4º Alpine skiing backpack 27 L 0 %
(0106063)
hgbot   
2018-07-31 22:13   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: bb1453888c9d974f468c15049533cbf97f1c4360
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Jul 31 16:12:21 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/bb1453888c9d974f468c15049533cbf97f1c4360 [^]

Related to issue 38813: Scaled price discount doesn't work as expected when a
product has it canceled by another discount

- Supported new test case

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0106091)
hgbot   
2018-08-01 22:31   
Repository: tools/automation/pi-mobile
Changeset: 7312eb8ddd5fd2aad71c9929a1a9b18316137969
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Aug 01 09:43:07 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7312eb8ddd5fd2aad71c9929a1a9b18316137969 [^]

Related to issue 38813: added automated test for new test case

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother2.java
---
(0106155)
jorge-garcia   
2018-08-03 11:24   
Tests and fixes reviewed and tested
(0109077)
hgbot   
2019-01-22 15:21   
Repository: tools/automation/pi-mobile
Changeset: db415683585523af034ec7577a213979b3664362
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Dec 24 11:49:46 2018 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/db415683585523af034ec7577a213979b3664362 [^]

Related to issue 38813: Test have been refactored due it doesn't create its own
sampledata anymore.

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother.java
---
(0109078)
hgbot   
2019-01-22 15:21   
Repository: tools/automation/pi-mobile
Changeset: 55b50712be7198208cc2b3291bf71f25c9326084
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Dec 24 15:28:51 2018 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/55b50712be7198208cc2b3291bf71f25c9326084 [^]

Related to issue 38813: this test no longer creates its own sampledata

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother2.java
---