Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028164Retail ModulesDiscounts and Promotionspublic2014-11-12 18:332014-11-14 10:44
malsasua 
migueldejuana 
urgentmajorhave not tried
closedfixed 
20Community Appliance
 
RR14Q3.1 
Orekaria
Production - QA Approved
2014-06-10
RR14Q3
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/ff64aefab4b0 [^]
No
0028164: discount is removed when exists other line negative
when there are lines negatives in receipt, and one positive line has got a discretionary discount and also automatic discount, the automatic discount is removed in positive line, and it should not be removed
. in F&B
. add Avalanche Receiver
  . qty 1
. add GPS handheld (automatic discount: "GPS_10_per" is added)
  . qty 1
. apply discretionary discount disc_5_var_perc to all lines
the receipt:
   . Avalance Receiver: qty 1
     - discounts: disc_5_var_perc
   . GPS handheld: qty 1
     - discounts: disc_5_var_perc
                   GPS_10_per

. return line Avalance Receiver
expected receipt:
   . Avalance Receiver: qty -1
   . GPS handheld: qty 1
     - discounts: disc_5_var_perc
                   GPS_10_per
receipt:
   . Avalance Receiver: qty -1
   . GPS handheld: qty 1
     - discounts: disc_5_var_perc

the discount GPS_10_per has been removed, and it should not be removed
No tags attached.
depends on defect 0028120RR14Q3.1 closed malsasua Discounts related to packs are not properly related to order lines when sharing products 
related to defect 0028100 closed Orekaria [RR14Q4] Discretionary discounts not applied in Return receipts 
Issue History
2014-11-12 18:33malsasuaNew Issue
2014-11-12 18:33malsasuaAssigned To => marvintm
2014-11-12 18:33malsasuaRegression level => Production - QA Approved
2014-11-12 18:33malsasuaRegression date => 2014-06-10
2014-11-12 18:33malsasuaRegression introduced in release => RR14Q3
2014-11-12 18:33malsasuaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/ff64aefab4b0 [^]
2014-11-12 18:33malsasuaTriggers an Emergency Pack => No
2014-11-14 08:56migueldejuanaAssigned Tomarvintm => migueldejuana
2014-11-14 08:59OrekariaRelationship addeddepends on 0028120
2014-11-14 09:01hgbotCheckin
2014-11-14 09:01hgbotNote Added: 0071647
2014-11-14 09:01hgbotStatusnew => resolved
2014-11-14 09:01hgbotResolutionopen => fixed
2014-11-14 09:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2930de98c0637d8202a10d368cc72686b45ccd54 [^]
2014-11-14 09:11OrekariaRelationship addedrelated to 0028100
2014-11-14 10:43hgbotCheckin
2014-11-14 10:43hgbotNote Added: 0071650
2014-11-14 10:44OrekariaReview Assigned To => Orekaria
2014-11-14 10:44OrekariaStatusresolved => closed
2014-11-14 10:44OrekariaFixed in Version => RR14Q3.1

Notes
(0071647)
hgbot   
2014-11-14 09:01   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2930de98c0637d8202a10d368cc72686b45ccd54
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Nov 14 09:00:30 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2930de98c0637d8202a10d368cc72686b45ccd54 [^]

Fixed issue 0028164: discount is removed when exists other line negative

Order lines by qty desc before applying discount rules in order to have first higher qty and positive lines.

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0071650)
hgbot   
2014-11-14 10:43   
Repository: tools/automation/pi-mobile
Changeset: ee610ff136be31caff6a95361a682c11c1a9176f
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Fri Nov 14 10:43:18 2014 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/ee610ff136be31caff6a95361a682c11c1a9176f [^]

Related to issue 28164: 2 tests have been added

These tests verify that the discounts are correctly applied and that a receipt with a return in the first or the second line, will give the same results

---
M src-test/org/openbravo/retail/standard/automation/suites/DiscountsAndPromotionsSuite.java
A src-test/org/openbravo/retail/standard/automation/level20/discountsandpromotions/issues/I28164_DiscountsRemovedWhenReturnPresentI.java
A src-test/org/openbravo/retail/standard/automation/level20/discountsandpromotions/issues/I28164_DiscountsRemovedWhenReturnPresentII.java
---