Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041008Retail ModulesWeb POSpublic2019-06-03 09:502019-07-22 16:30
xabiermerino 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q4 
guilleaer
No
0041008: Negative price using promotions in different scenarios
Scenario 1:
  1.-Scaled price: --> Category A
    * Unit 1 --> 0%
    * Unit 2 --> 0%
    * Unit 3 --> 100%
  2.-Price adjustment (10%) --> Category A

Scenario 2:
  1.-Scaled price: --> Category A
    * Unit 1 --> 0%
    * Unit 2 --> 0%
    * Unit 3 --> 100%
  2.- Discount per total amount (coupon)
    * Total receipt = 10
    * Amount = 3
Scenario 1:
* Create a ticket with three different products of Category A
* Realize that, the line with 100% of discount is synchronized with negative price

Scenario 2:
* Select a list of product to introduce promo 1
* Introduce a coupon of the second discount
No tags attached.
related to defect 0040938 closed ranjith_qualiantech_com Negative line if a Scaled prices is applied twice 
related to defect 0041219 closed rqueralta The information of a promotion is not saved in the ticket if the discount is 0 
Issue History
2019-06-03 09:50xabiermerinoNew Issue
2019-06-03 09:50xabiermerinoAssigned To => Retail
2019-06-03 09:50xabiermerinoResolution time => 1560981600
2019-06-03 09:50xabiermerinoTriggers an Emergency Pack => No
2019-06-04 10:27xabiermerinoSummaryNegative amount using promotions in different scenarios => Negative price using promotions in different scenarios
2019-06-04 10:27xabiermerinoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18869#r18869
2019-06-04 11:04xabiermerinoDescription Updatedbug_revision_view_page.php?rev_id=18875#r18875
2019-06-04 11:04xabiermerinoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18876#r18876
2019-06-05 12:10ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-06-05 12:10ranjith_qualiantech_comStatusnew => scheduled
2019-06-05 14:14ranjith_qualiantech_comRelationship addedrelated to 0040938
2019-06-10 07:54hgbotCheckin
2019-06-10 07:54hgbotNote Added: 0112527
2019-06-10 10:18hgbotCheckin
2019-06-10 10:18hgbotNote Added: 0112532
2019-06-11 07:46hgbotCheckin
2019-06-11 07:46hgbotNote Added: 0112561
2019-06-11 07:46ranjith_qualiantech_comStatusscheduled => resolved
2019-06-11 07:46ranjith_qualiantech_comResolutionopen => fixed
2019-06-27 16:12jorge-garciaReview Assigned To => jorge-garcia
2019-06-28 09:28jorge-garciaNote Added: 0113091
2019-06-28 09:28jorge-garciaStatusresolved => new
2019-06-28 09:28jorge-garciaResolutionfixed => open
2019-06-28 11:53hgbotCheckin
2019-06-28 11:53hgbotNote Added: 0113097
2019-06-28 11:54hgbotCheckin
2019-06-28 11:54hgbotNote Added: 0113098
2019-06-28 11:54ranjith_qualiantech_comStatusnew => scheduled
2019-07-10 14:51hgbotCheckin
2019-07-10 14:51hgbotNote Added: 0113255
2019-07-11 04:14hgbotCheckin
2019-07-11 04:14hgbotNote Added: 0113260
2019-07-11 11:01ranjith_qualiantech_comStatusscheduled => resolved
2019-07-11 11:01ranjith_qualiantech_comResolutionopen => fixed
2019-07-15 10:48jorge-garciaNote Added: 0113365
2019-07-15 10:48jorge-garciaStatusresolved => closed
2019-07-18 14:58ranjith_qualiantech_comRelationship addedrelated to 0041219
2019-07-19 11:10ranjith_qualiantech_comNote Added: 0113549
2019-07-19 11:10ranjith_qualiantech_comStatusclosed => new
2019-07-19 11:10ranjith_qualiantech_comResolutionfixed => open
2019-07-19 11:10ranjith_qualiantech_comStatusnew => scheduled
2019-07-19 11:11hgbotCheckin
2019-07-19 11:11hgbotNote Added: 0113550
2019-07-20 07:55ranjith_qualiantech_comStatusscheduled => resolved
2019-07-20 07:55ranjith_qualiantech_comResolutionopen => fixed
2019-07-22 16:30guilleaerReview Assigned Tojorge-garcia => guilleaer
2019-07-22 16:30guilleaerStatusresolved => closed
2019-07-22 16:30guilleaerFixed in Version => RR19Q4

Notes
(0112527)
hgbot   
2019-06-10 07:54   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: 12b2c8934ab9eadc0ef3845c4f4cad915166297e
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 10 11:24:17 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/12b2c8934ab9eadc0ef3845c4f4cad915166297e [^]

Related to issue 41008 : Scaled Price should be applied on line price instead of discounted line price

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0112532)
hgbot   
2019-06-10 10:18   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: e6a12106dafc02106721ac5b20f4c324123248e1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 10 13:48:41 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/e6a12106dafc02106721ac5b20f4c324123248e1 [^]

Related to issue 41008 : Scaled Price should be applied on line price instead of discounted line price

* if line price is negative after applying scaled discount, then scaled discount should be applied as Zero

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0112561)
hgbot   
2019-06-11 07:46   
Repository: tools/automation/pi-mobile
Changeset: e865f6df12c76a97bd077ce6eefb8a97a383046e
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jun 11 11:15:56 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e865f6df12c76a97bd077ce6eefb8a97a383046e [^]

Verifies issue 41008 : Added automated test 'I41008_VerifyDiscountWithPriceAdjustment'

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother2.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdScaledPriceAndManualPromo.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I41008_VerifyDiscountWithPriceAdjustment.java
---
(0113091)
jorge-garcia   
2019-06-28 09:28   
In this case, the behavior is not correct:
Scenario 1:
  1.-Scaled price: --> Category A with Priority 2
    * Unit 1 --> 0%
    * Unit 2 --> 0%
    * Unit 3 --> 100%
  2.-Price adjustment (10%) --> Category A with Priority 1

If we add three products to the ticket:
  Product 1
      --> Price Adjustment 10% discount (OK)
  Product 2
      --> Price Adjustment 10% discount (OK)
  Product 3
      --> Price Adjustment 10% discount (OK)
      --> Scaled Price of 0.00€ (WRONG)

In this case, we expect that scaled price reduce the line price to 0.00 (which in this case will be the 90% of the original price), instead of applying a discount of 0.00
(0113097)
hgbot   
2019-06-28 11:53   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: 1628cbd6b8cc64825eab1a4c7bf57a048efc759b
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 28 15:23:39 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/1628cbd6b8cc64825eab1a4c7bf57a048efc759b [^]

Related to issue 41008 : Backout changes 1f24bc9dc3a9 and e6a12106dafc

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0113098)
hgbot   
2019-06-28 11:54   
Repository: tools/automation/pi-mobile
Changeset: a25628aa159d7eb69fa317f602f6fb2770158413
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 28 14:43:16 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/a25628aa159d7eb69fa317f602f6fb2770158413 [^]

Related to issue 41008 : Backed out changeset: e865f6df12c7

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother2.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/splitline/SplitLineWithAutomaticPromoFreeProdScaledPriceAndManualPromo.java
R src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I41008_VerifyDiscountWithPriceAdjustment.java
---
(0113255)
hgbot   
2019-07-10 14:51   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: c99e6c7488a5ac3898f44aa57ac3cf4de299c6cf
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jul 10 18:21:23 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/c99e6c7488a5ac3898f44aa57ac3cf4de299c6cf [^]

Related to issue 41008 : Scaled Price should be applied on discounted line price instead of line price

* if line price is negative after applying scaled discount, then scaled discount should be applied as Zero

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---
(0113260)
hgbot   
2019-07-11 04:14   
Repository: tools/automation/pi-mobile
Changeset: 1ebd5a3820c7c1dac09c7e9b99da11ee821351c8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 11 07:44:00 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/1ebd5a3820c7c1dac09c7e9b99da11ee821351c8 [^]

Verifies issue 41008 : Added automated test 'I41008_VerifyDiscountWithPriceAdjustment'

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I38813_VerifyDiscountWhenCanceledByAnother2.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_scaledprice/I41008_VerifyDiscountWithPriceAdjustment.java
---
(0113365)
jorge-garcia   
2019-07-15 10:48   
Code reviewed and tested
(0113549)
ranjith_qualiantech_com   
2019-07-19 11:10   
Promotion should be added to line with amount zero, if the scaled percentage is defined as zero
(0113550)
hgbot   
2019-07-19 11:11   
Repository: erp/pmods/org.openbravo.retail.discounts.scaledprice
Changeset: 24e41d36ccad0fa54dbab4957a65acc1ce59c23c
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jul 19 14:41:42 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.scaledprice/rev/24e41d36ccad0fa54dbab4957a65acc1ce59c23c [^]

Related to issue 41008 : Promotion should be added to line with amount zero if the scaled percentage is defined as zero

---
M web/org.openbravo.retail.discounts.scaledprice/js/scaledprice.js
---