Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032278Retail ModulesWeb POSpublic2016-02-18 16:352016-03-03 16:10
marvintm 
guilleaer 
normalmajoralways
closedfixed 
5
 
RR16Q1RR16Q1 
marvintm
Packaging and release
2015-12-15
pi
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5521 [^]
No
0032278: When a discretionary discount is removed, the total amount of the ticket is not computed
When a discretionary discount is added to a line, the total amount of the ticket is correctly calculated. However, when this discount is removed, the total doesn't change, and this is wrong.
- Add a line to a ticket
- Add a discretionary discount (using Receipt discounts)
- Select the line, and in the Edit panel, click on "Remove discount" button
- Verify that the discount is correctly removed from the line, but the total amount of the ticket hasn't changed.
This problem comes from the removal of these two lines in editline.js:

+++ b/web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js Tue Dec 15 13:23:54 2015 +0100
@@ -263,8 +263,6 @@
     tap: function () {
       if (this.owner.owner && this.owner.owner.line && this.owner.owner.line.get('promotions')) {
         this.owner.owner.line.unset('promotions');
- OB.Model.Discounts.applyPromotions(this.model.get('order'));
- this.model.get('order').calculateGross();
         this.hide();
       }
     },


The solution is to replace them by a call to the new calculateReceipt() function.
No tags attached.
blocks defect 0032277pi closed jorge-garcia When a discretionary discount is removed, the total amount of the ticket is not computed 
Issue History
2016-02-18 16:37marvintmTypedefect => backport
2016-02-18 16:37marvintmTarget Versionpi => RR16Q1
2016-02-25 13:55hgbotCheckin
2016-02-25 13:55hgbotNote Added: 0084501
2016-02-25 13:55hgbotStatusscheduled => resolved
2016-02-25 13:55hgbotResolutionopen => fixed
2016-02-25 13:55hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR16Q1/org.openbravo.retail.posterminal/rev/c54d56ef22fc24cc7bbf4730c16bc38eb13913cf [^]
2016-02-25 13:56guilleaerAssigned Tojorge-garcia => guilleaer
2016-03-03 16:10marvintmReview Assigned To => marvintm
2016-03-03 16:10marvintmStatusresolved => closed
2016-03-03 16:10marvintmFixed in Version => RR16Q1

Notes
(0084501)
hgbot   
2016-02-25 13:55   
Repository: retail/backports/3.0RR16Q1/org.openbravo.retail.posterminal
Changeset: c54d56ef22fc24cc7bbf4730c16bc38eb13913cf
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Thu Feb 25 13:54:21 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q1/org.openbravo.retail.posterminal/rev/c54d56ef22fc24cc7bbf4730c16bc38eb13913cf [^]

Fixed issue 32278, Backport of 32277: Receipr is recalculated when a discount is removed from an specific line

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
---