Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035848Retail ModulesDiscounts and Promotionspublic2017-04-26 13:262019-02-14 00:44
lorenzofidalgo 
rqueralta 
immediatemajoralways
scheduledopen 
5
pi 
 
Production - Confirmed Stable
2015-11-02
RR16Q1
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/0aa75789a053f6fd069baab3ff1509f3a827e40e [^]
No
0035848: The Discount Subtype "Apply Average Price" does not calculate the average of the products but discounts one entire product
The discount type "Buy X pay Y of different product" can apply the Discount Subtype "Apply Average Price". It is supposed it has to calculate the arithmetic mean of the products added to the receipt that belong to that discount and discount that mean. Instead of that, it is just discounting one entire product and no mean is calculated.
I have been able to reproduce this issue from pi to RR16Q1.3. It is not reproducible in RR15Q4.6.
Besides, it must be taken into account that the old code (RR15Q4.6) has some rounding inaccuracies.
0-Login POS Backend and, using The White Valley Group Admin" role, go to Discounts and Promotions window.
1-Edit the existent "3 x 2 Bottles" record. It must be saved with the following values:
--
Discount/promotion Type: Buy X pay Y of different product
Name: 3 x 2 Bottles
Starting Date: 01-06-2013
Included Products: Only those defined
(In Definition section)
X Units: 3
Y Units: 2
Discount Subtype: Apply Average Price
--
Save that record.
2-Go to Products tab and add the following records if they are not already added:
--
Bottle 1 L
Camel bak 3 L
Plastic bottle
Thermo 1 L
--
3-Go to POS and login as vallblanca.
4-Click SEARCH tab, enter bottle and click search button.
5-Add to the receipt 1x Bottle 1 L and 2x Plastic bottle
6-Realise the the applied discount is not right.
No tags attached.
caused by defect 0031261 closed jorge-garcia Promotions are wrong applied if there is more than one promotion for the products 
png 16Q1.3AverageDiscount.png (203,293) 2017-04-26 13:26
https://issues.openbravo.com/file_download.php?file_id=10690&type=bug
png

png 15Q4.6AverageDiscount.png (222,629) 2017-04-26 13:27
https://issues.openbravo.com/file_download.php?file_id=10691&type=bug
png
Issue History
2017-04-26 13:26lorenzofidalgoNew Issue
2017-04-26 13:26lorenzofidalgoAssigned To => Retail
2017-04-26 13:26lorenzofidalgoFile Added: 16Q1.3AverageDiscount.png
2017-04-26 13:26lorenzofidalgoRegression level => Production - Confirmed Stable
2017-04-26 13:26lorenzofidalgoRegression introduced in release => RR16Q1
2017-04-26 13:26lorenzofidalgoTriggers an Emergency Pack => No
2017-04-26 13:27lorenzofidalgoFile Added: 15Q4.6AverageDiscount.png
2017-04-26 13:55jorge-garciaRegression date => 2015-11-02
2017-04-26 13:55jorge-garciaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/0aa75789a053f6fd069baab3ff1509f3a827e40e [^]
2017-04-26 13:56jorge-garciaRelationship addedcaused by 0031261
2019-02-14 00:43rqueraltaAssigned ToRetail => rqueralta
2019-02-14 00:44rqueraltaStatusnew => scheduled

There are no notes attached to this issue.