Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027359Retail ModulesWeb POSpublic2014-08-18 14:492014-10-01 18:59
jecharri 
mtaal 
urgentmajoralways
closedfixed 
5
 
RR14Q4 
marvintm
No
0027359: Web POS is calculating the returns using the gross instead of qty
Web POS is calculating the returns using the gross instead of qty
In file org.openbraov.retail.posterminal.js.pointofsale.view.editline.js

line 437: if (this.line.get('gross') < OB.DEC.Zero) {
if (!_.isUndefined(this.line.get('returnReason'))) {
selectedReason = _.filter(this.$.returnreason.children, function (reason) {
return reason.getValue() === me.line.get('returnReason');
})[0];
this.$.returnreason.setSelected(selectedReason.getNodeProperty('index'));
}
this.$.returnreason.show();
} else {
this.$.returnreason.hide();
}


it should not use "gross" to tell which is return or not, it should use "qty" to tell
So, when we use the product which is negative price (like special service or discount) the return reason can not choose.
No tags attached.
related to defect 0026512RR14Q3 closed szapata amounts in return receipts are wrong calculated 
png a.return.png (53,627) 2014-08-31 21:49
https://issues.openbravo.com/file_download.php?file_id=7179&type=bug
png

png a.cahsup2of5 (with 100 deposit).png (103,528) 2014-08-31 21:49
https://issues.openbravo.com/file_download.php?file_id=7180&type=bug
png

png a.cashup5of5Return.png (107,231) 2014-08-31 21:50
https://issues.openbravo.com/file_download.php?file_id=7181&type=bug
png

png b.returnNegative.png (53,332) 2014-08-31 21:50
https://issues.openbravo.com/file_download.php?file_id=7182&type=bug
png

png b.cahsup2of5.png (105,220) 2014-08-31 21:50
https://issues.openbravo.com/file_download.php?file_id=7183&type=bug
png

png b.cashup5of5NegativeReturn.png (103,173) 2014-08-31 21:51
https://issues.openbravo.com/file_download.php?file_id=7184&type=bug
png

png Selection_030.png (80,683) 2014-09-03 17:44
https://issues.openbravo.com/file_download.php?file_id=7205&type=bug
png

png Selection_031.png (78,956) 2014-09-03 17:44
https://issues.openbravo.com/file_download.php?file_id=7206&type=bug
png
Issue History
2014-08-18 14:49jecharriNew Issue
2014-08-18 14:49jecharriAssigned To => marvintm
2014-08-18 14:49jecharriResolution time => 1411077600
2014-08-18 14:49jecharriTriggers an Emergency Pack => No
2014-08-19 15:30hgbotCheckin
2014-08-19 15:30hgbotNote Added: 0069517
2014-08-19 15:30hgbotStatusnew => resolved
2014-08-19 15:30hgbotResolutionopen => fixed
2014-08-19 15:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/82b51249f7b8fe9e977d57805a43ef432094badb [^]
2014-08-21 22:43hgbotCheckin
2014-08-21 22:43hgbotNote Added: 0069586
2014-08-21 22:58hgbotCheckin
2014-08-21 22:58hgbotNote Added: 0069587
2014-08-31 21:49OrekariaAssigned Tomarvintm => mtaal
2014-08-31 21:49OrekariaNote Added: 0069863
2014-08-31 21:49OrekariaStatusresolved => new
2014-08-31 21:49OrekariaResolutionfixed => open
2014-08-31 21:49OrekariaFile Added: a.return.png
2014-08-31 21:49OrekariaFile Added: a.cahsup2of5 (with 100 deposit).png
2014-08-31 21:50OrekariaFile Added: a.cashup5of5Return.png
2014-08-31 21:50OrekariaFile Added: b.returnNegative.png
2014-08-31 21:50OrekariaFile Added: b.cahsup2of5.png
2014-08-31 21:51OrekariaFile Added: b.cashup5of5NegativeReturn.png
2014-08-31 21:52OrekariaNote Edited: 0069863bug_revision_view_page.php?bugnote_id=0069863#r6502
2014-09-03 17:44mtaalFile Added: Selection_030.png
2014-09-03 17:44mtaalFile Added: Selection_031.png
2014-09-27 01:11mtaalRelationship addedrelated to 0026512
2014-09-30 11:37migueldejuanaStatusnew => scheduled
2014-09-30 11:37migueldejuanafix_in_branch => pi
2014-09-30 11:41migueldejuanaNote Added: 0070543
2014-09-30 11:41migueldejuanaStatusscheduled => resolved
2014-09-30 11:41migueldejuanaFixed in Version => RR14Q4
2014-09-30 11:41migueldejuanaResolutionopen => fixed
2014-10-01 18:59marvintmReview Assigned To => marvintm
2014-10-01 18:59marvintmNote Added: 0070628
2014-10-01 18:59marvintmStatusresolved => closed

Notes
(0069517)
hgbot   
2014-08-19 15:30   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 82b51249f7b8fe9e977d57805a43ef432094badb
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Aug 19 15:30:21 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/82b51249f7b8fe9e977d57805a43ef432094badb [^]

Fixes issue 27359: Web POS is calculating the returns using the gross instead of qty
Use qty instead of the amount (gross) to check if something is a return

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
M web/org.openbravo.retail.posterminal/res/printreceipt.xml
---
(0069586)
hgbot   
2014-08-21 22:43   
Repository: tools/automation/pi-mobile
Changeset: 6db590b4b6ce46c109221083c41875d96500b3be
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 21 22:43:23 2014 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/6db590b4b6ce46c109221083c41875d96500b3be [^]

Fixed CashupWithSaleAndReturn with the new values after the fix for issue 27359

---
M src-test/org/openbravo/retail/integrationtest/tests/general/cashup/CashupWithSaleAndReturn.java
---
(0069587)
hgbot   
2014-08-21 22:58   
Repository: tools/automation/pi-mobile
Changeset: 6c3d1b3441c2cf25b3a9b1cd4d4692b0a52cb976
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Aug 21 22:58:32 2014 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/6c3d1b3441c2cf25b3a9b1cd4d4692b0a52cb976 [^]

Fixed I26806_CashupTotalNotShown with the new values after the fix for issue 27359

---
M src-test/org/openbravo/retail/integrationtest/tests/issues/I26806_CashupTotalNotShown.java
---
(0069863)
Orekaria   
2014-08-31 21:49   
(edited on: 2014-08-31 21:52)
The cashup is not correctly calculated.

See attached screenshots.

The cashup with the regular return has a deposit made of 100€ because is necessary to have any cash to finish the return.

- Step 2 of 3 does show the amount inverted because expected amount is negative (should be possitive)

- Total withdrawals does show the amount inverted

(0070543)
migueldejuana   
2014-09-30 11:41   
The fix is ok but one file was wrongly changed. This error is fixed in the issue:
https://issues.openbravo.com/view.php?id=26512 [^]
(0070628)
marvintm   
2014-10-01 18:59   
The change in the initial commit in dataordersave is wrong. However, it has been fixed afterwards by a subsequent commit (https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e40925774f15 [^]). So now the code is finally correct.