Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032277Retail ModulesWeb POSpublic2016-02-18 16:352016-02-25 13:53
marvintm 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
piRR16Q2 
guilleaer
Packaging and release
2015-12-15
pi
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5521 [^]
No
0032277: 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.
depends on backport 0032278RR16Q1 closed guilleaer When a discretionary discount is removed, the total amount of the ticket is not computed 
has duplicate defect 0032271 closed ranjith_qualiantech_com [SERQA 712] When deleting a % discount already applied in a line the amount is not updated 
Issue History
2016-02-18 16:35marvintmNew Issue
2016-02-18 16:35marvintmAssigned To => jorge-garcia
2016-02-18 16:35marvintmRegression level => Packaging and release
2016-02-18 16:35marvintmRegression date => 2015-12-15
2016-02-18 16:35marvintmRegression introduced in release => pi
2016-02-18 16:35marvintmRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5521 [^]
2016-02-18 16:35marvintmTriggers an Emergency Pack => No
2016-02-18 16:37marvintmStatusnew => scheduled
2016-02-19 10:04ranjith_qualiantech_comRelationship addedhas duplicate 0032271
2016-02-23 15:38hgbotCheckin
2016-02-23 15:38hgbotNote Added: 0084436
2016-02-23 15:38hgbotStatusscheduled => resolved
2016-02-23 15:38hgbotResolutionopen => fixed
2016-02-23 15:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4f3983e69d7f656bd5c8b58e975b999f5d089cd6 [^]
2016-02-23 15:38hgbotCheckin
2016-02-23 15:38hgbotNote Added: 0084437
2016-02-25 13:53guilleaerReview Assigned To => guilleaer
2016-02-25 13:53guilleaerStatusresolved => closed
2016-02-25 13:53guilleaerFixed in Version => RR16Q2

Notes
(0084436)
hgbot   
2016-02-23 15:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4f3983e69d7f656bd5c8b58e975b999f5d089cd6
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Feb 22 11:33:26 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4f3983e69d7f656bd5c8b58e975b999f5d089cd6 [^]

Fixed issue 32277: When a discretionary discount is removed, the total amount
of the ticket is not computed

The problem was to not recalculate the receipt valueswhen the discount is
removed.

Now the problem is fixed.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
---
(0084437)
hgbot   
2016-02-23 15:38   
Repository: tools/automation/pi-mobile
Changeset: ce29cbf075bd1686a9fece6cacf88e72aba1bb99
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Feb 23 15:35:22 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/ce29cbf075bd1686a9fece6cacf88e72aba1bb99 [^]

Verifies issue 32277: When a discretionary discount is removed, the total amount
of the ticket is not computed

Added test I32277_DeleteDiscretionaryDiscount.

---
A src-test/org/openbravo/test/mobile/quarantine/pack/JGA/receipts/I32277_DeleteDiscretionaryDiscount.java
---