Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035279Retail ModulesWeb POSpublic2017-02-15 18:012017-03-20 15:10
nataliag 
mario_castello 
normalmajoralways
closedfixed 
5
 
RR17Q2 
marvintm
OBPS
45432
No
0035279: The reimbursement in cancel and replace an order is positive and not negative in web POS
When you cancel and replace an order the quantity that is going to be reimbursed appears in positive and it can cause confusion as it appears that you are going to pay that quantity not to have it refunded.
1-Go to web POS and create a new ticket. Add a product of 4€ for example and set the quantity to 5, so the total is 20€.
2- Layaway the receipt and pay 12€.
3- Call back the layaway and select the “Cancel and replace” option in the menu.
4- In the amount payed a line is displayed with the payment method and the quantity (12€) in positive
5- Now, in this “Cancel and replace” order change the quantity from 5 to 1. The amount of the order is 4.00 and the amount remaining to return is 8.00
6- Validate the amount to reimburse and a new line is added in the payment with the payment method and 8.00€, in positive. It should be a negative quantity as it is a reimbursement.
No tags attached.
jpg Amount_reimbursed _ Openbravo POS - Google Chrome_232.jpg (249,891) 2017-02-16 09:07
https://issues.openbravo.com/file_download.php?file_id=10452&type=bug
jpg

patch Issue0035279.patch (1,469) 2017-02-23 15:56
https://issues.openbravo.com/file_download.php?file_id=10479&type=bug
patch test35279.patch (7,443) 2017-02-23 15:57
https://issues.openbravo.com/file_download.php?file_id=10480&type=bug
Issue History
2017-02-15 18:01nataliagNew Issue
2017-02-15 18:01nataliagAssigned To => Retail
2017-02-15 18:01nataliagOBNetwork customer => Yes
2017-02-15 18:01nataliagSupport ticket => 45432
2017-02-15 18:01nataliagResolution time => 1488927600
2017-02-15 18:01nataliagTriggers an Emergency Pack => No
2017-02-16 09:07mrecasensFile Added: Amount_reimbursed _ Openbravo POS - Google Chrome_232.jpg
2017-02-17 20:20mario_castelloAssigned ToRetail => mario_castello
2017-02-20 15:46mario_castelloStatusnew => acknowledged
2017-02-22 19:39mario_castelloStatusacknowledged => scheduled
2017-02-23 15:56mario_castelloFile Added: Issue0035279.patch
2017-02-23 15:57mario_castelloFile Added: test35279.patch
2017-03-10 21:07hgbotCheckin
2017-03-10 21:07hgbotNote Added: 0094951
2017-03-10 21:07hgbotStatusscheduled => resolved
2017-03-10 21:07hgbotResolutionopen => fixed
2017-03-10 21:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6ddcd46e6252c64662c1de35dc3c508a9f975514 [^]
2017-03-10 22:55hgbotCheckin
2017-03-10 22:55hgbotNote Added: 0094955
2017-03-13 09:24marvintmNote Added: 0094972
2017-03-13 09:24marvintmStatusresolved => new
2017-03-13 09:24marvintmResolutionfixed => open
2017-03-13 15:45mario_castelloStatusnew => acknowledged
2017-03-13 15:45mario_castelloStatusacknowledged => scheduled
2017-03-16 01:49hgbotCheckin
2017-03-16 01:49hgbotNote Added: 0095308
2017-03-16 01:49hgbotStatusscheduled => resolved
2017-03-16 01:49hgbotResolutionopen => fixed
2017-03-16 01:49hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6ddcd46e6252c64662c1de35dc3c508a9f975514 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/51d62aca33cc4e07e7dec41b995a189518b10f4e [^]
2017-03-16 11:11marvintmNote Added: 0095311
2017-03-16 11:11marvintmStatusresolved => new
2017-03-16 11:11marvintmResolutionfixed => open
2017-03-16 15:13mario_castelloStatusnew => scheduled
2017-03-17 00:33hgbotCheckin
2017-03-17 00:33hgbotNote Added: 0095348
2017-03-17 00:33hgbotStatusscheduled => resolved
2017-03-17 00:33hgbotResolutionopen => fixed
2017-03-17 00:33hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/51d62aca33cc4e07e7dec41b995a189518b10f4e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be130a0fd6b94c69a3b4e7f1c8fffbc5cccfedc3 [^]
2017-03-17 13:58marvintmReview Assigned To => marvintm
2017-03-17 13:58marvintmStatusresolved => closed
2017-03-17 13:58marvintmFixed in Version => RR17Q2
2017-03-20 15:10hgbotCheckin
2017-03-20 15:10hgbotNote Added: 0095424

Notes
(0094951)
hgbot   
2017-03-10 21:07   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6ddcd46e6252c64662c1de35dc3c508a9f975514
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Mar 07 10:20:36 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6ddcd46e6252c64662c1de35dc3c508a9f975514 [^]

Fixed issue 0035279: The reimbursement in cancel and replace an order is positive and not negative in web POS

- Added validation for order CancelAndReplace and check is the paid is negatives

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0094955)
hgbot   
2017-03-10 22:55   
Repository: tools/automation/pi-mobile
Changeset: dcd29635972689efbb7a052799f820812c5d50aa
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Feb 22 11:42:28 2017 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/dcd29635972689efbb7a052799f820812c5d50aa [^]

Verifies issue 35279: Added automated test I35279_CancelAndRplcLayaway

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I35279_CancelAndRplcLayaway.java
---
(0094972)
marvintm   
2017-03-13 09:24   
There should not be references to the receipt global object, either the receipt should be passed as a parameter, or the information should be in the payment itself.
(0095308)
hgbot   
2017-03-16 01:49   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 51d62aca33cc4e07e7dec41b995a189518b10f4e
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Mar 14 11:04:39 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/51d62aca33cc4e07e7dec41b995a189518b10f4e [^]

Fixed issue 0035279: The reimbursement in cancel and replace an order is positive and not negative in web POS

- Create two new properties in payment object for cancel an replace order type
- Refactor the validation in printAmountWithSignum function based in the new properties

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0095311)
marvintm   
2017-03-16 11:11   
There is a case which is still failing here:
- Create a layaway
- Add two Avalanche Transceivers
- Add a partial payment of 200
- Send the layaway to the backend.
- Load it back
- Cancel and replace
- Remove one Avalanche Transceiver
- Go to the payment tab. It shows that 49.5€ need to be returned. This is correct.
- Add 49.5€ payment. They are shown as negative. This is correct.
- Add another Avalanche Transceiver. Go back to payment tab. Payment of 49.5€ is still shown as negative payment, but now it's actually positive internally. This is not correct, it should be shown as positive in this case.


The root cause of the problem is that to fix this issue properly, the property "paidInNegativeStatusAmt" of the receipt is the one which should be used. As this property may change due to the receipt itself being changed, we need to have a reference to the receipt object when using the printAmountWithSignum function.
(0095348)
hgbot   
2017-03-17 00:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: be130a0fd6b94c69a3b4e7f1c8fffbc5cccfedc3
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Mar 16 13:45:26 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be130a0fd6b94c69a3b4e7f1c8fffbc5cccfedc3 [^]

Fixed issue 0035279: The reimbursement in cancel and replace an order is positive and not negative in web POS

- Refactor the validation in printAmountWithSignum function based in paidInNegativeStatusAmt property for cancel and replace order

---
M web/org.openbravo.retail.posterminal/js/components/renderorderline.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0095424)
hgbot   
2017-03-20 15:10   
Repository: tools/automation/pi-mobile
Changeset: 6f1e3ad46e8951712e67a8063c37a76bf7c4d044
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Fri Mar 17 14:19:44 2017 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/6f1e3ad46e8951712e67a8063c37a76bf7c4d044 [^]

Verifies issue 35279: Added new automated test I35279_CancelAndRplcLayawayII

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I35279_CancelAndRplcLayawayII.java
---