Openbravo Issue Tracking System - Retail Modules
View Issue Details
0024145Retail ModulesDiscounts and Promotionspublic2013-06-20 12:042013-07-22 09:09
adrianromero 
marvintm 
highminorhave not tried
closedfixed 
5
 
RMP25RMP25 
guilleaer
No
0024145: Discretionary discount may produce negative totals. This must be avoided.
If for example a discretionary discount of 50.00€ is applied to a ticket with a total of 30.00€ the result is a ticket of -20.00€. This scenario must be avoided.
In description
Two suggestions: do not allowing to apply a discount if the result is negative or if the discount is greater than the total, set the total to 0.00€ but not negative.
No tags attached.
has duplicate design defect 0022996 closed adrianromero Fixed amount discounts can cause a total negative ticket amount 
related to defect 0024305RMP27 closed marvintm Discretionary discounts may produce a discount applied not only to the receipt line. 
Issue History
2013-06-20 12:04adrianromeroNew Issue
2013-06-20 12:04adrianromeroAssigned To => marvintm
2013-07-03 10:55hgbotCheckin
2013-07-03 10:55hgbotNote Added: 0059830
2013-07-03 10:55hgbotStatusnew => resolved
2013-07-03 10:55hgbotResolutionopen => fixed
2013-07-03 10:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/43483bd5ab48e7373019371881f5e0704f852832 [^]
2013-07-03 10:59hgbotCheckin
2013-07-03 10:59hgbotNote Added: 0059831
2013-07-03 10:59hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/43483bd5ab48e7373019371881f5e0704f852832 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0d7c3461640cc2c801ecc3dec44f43bbe1f53047 [^]
2013-07-03 11:03marvintmNote Added: 0059832
2013-07-04 16:41hgbotCheckin
2013-07-04 16:41hgbotNote Added: 0059864
2013-07-04 16:41hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0d7c3461640cc2c801ecc3dec44f43bbe1f53047 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/0d7c3461640cc2c801ecc3dec44f43bbe1f53047 [^]
2013-07-10 12:40adrianromeroRelationship addedrelated to 0024305
2013-07-22 09:09guilleaerReview Assigned To => guilleaer
2013-07-22 09:09guilleaerNote Added: 0060135
2013-07-22 09:09guilleaerStatusresolved => closed
2013-07-22 09:09guilleaerFixed in Version => RMP25
2014-01-13 09:12guilleaerRelationship addedhas duplicate 0022996

Notes
(0059830)
hgbot   
2013-07-03 10:55   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 43483bd5ab48e7373019371881f5e0704f852832
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jul 03 10:54:14 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/43483bd5ab48e7373019371881f5e0704f852832 [^]

Fixed issue 24145. Discretionary discounts with defined amounts will be applied for the receipt total amount instead of the discount total amount to avoid a negative total amount.

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0059831)
hgbot   
2013-07-03 10:59   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0d7c3461640cc2c801ecc3dec44f43bbe1f53047
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jul 03 10:58:17 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0d7c3461640cc2c801ecc3dec44f43bbe1f53047 [^]

Fixed issue 24145. Users will not be able to 'pay' an order with a negative total amount.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0059832)
marvintm   
2013-07-03 11:03   
The solution finally adopted is the following:
- Discretionary discounts manually applied for an amount greater than the total of the order will be changed so that the discounted amount is the same as the total amount, so that the final total amount of the order is zero, not negative.
- Other types of discounts (ie. automatically applied discounts) are not changed. If these discounts produce a negative amount, this is considered a configuration error (this should only happen for example if a discount defined for a product has a discounted amount which is greater than the product price. This normally should never happen).
- In any case, a validation which prevents the user from paying an order with a negative amount has been added. This will prevent the user from mistakenly generating wrong orders in case of an incorrect configuration of the system.
(0059864)
hgbot   
2013-07-04 16:41   
Repository: erp/pmods/org.openbravo.retail.posterminal.multiorder
Changeset: 0d7c3461640cc2c801ecc3dec44f43bbe1f53047
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jul 03 10:58:17 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.multiorder/rev/0d7c3461640cc2c801ecc3dec44f43bbe1f53047 [^]

Fixed issue 24145. Users will not be able to 'pay' an order with a negative total amount.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0060135)
guilleaer   
2013-07-22 09:09   
verified