Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036159Retail ModulesWeb POSpublic2017-06-01 11:312017-06-07 16:31
marvintm 
marvintm 
normalmajoralways
closedfixed 
5
 
RR17Q3 
mtaal
No
0036159: When order synchronization fails in synchronized mode, previous state is not recovered properly
If an order synchronization fails when synchronized mode is enabled, the previous state of the order should be recovered. However, it seems this is currently not working fine.

There seems to be at least two problems:
- Snapshot of the order is taken too late in the process, so some changes required for synchronization but which make the order incompatible with its usage in the Web POS have already happened.
- The snapshot is then not recovered properly, and the receipt shown in the UI is not correct
- Enable synchronized mode, and force an error in Orderloader (for example, add an exception in the class).
- Log in the Web POS.
- Add an Avalanche transceiver.
- Add a payment of 200€ in cash. This will create a payment greater than the total amount of the order, and will therefore generate change.
- Complete the order. This will fail due to the exception in the Orderloader.
- Verify that the amount of the payment has changed from 200 to 150.5. This is wrong.
- If you try to sync it again, you will notice that the amount goes down again, and again...
No tags attached.
related to defect 0036859 closed ranjith_qualiantech_com Errors in Pay Open ticket when paying with Digital Coupon GS1 
diff issue36159.diff (4,073) 2017-06-01 11:38
https://issues.openbravo.com/file_download.php?file_id=10819&type=bug
Issue History
2017-06-01 11:31marvintmNew Issue
2017-06-01 11:31marvintmAssigned To => Retail
2017-06-01 11:31marvintmTriggers an Emergency Pack => No
2017-06-01 11:38marvintmFile Added: issue36159.diff
2017-06-02 14:04marvintmResolution time => 1497477600
2017-06-06 11:47hgbotCheckin
2017-06-06 11:47hgbotNote Added: 0097163
2017-06-06 11:47hgbotStatusnew => resolved
2017-06-06 11:47hgbotResolutionopen => fixed
2017-06-06 11:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8125d38051a7116fabe0b2d2d3f33a13af5d06b [^]
2017-06-06 11:47hgbotCheckin
2017-06-06 11:47hgbotNote Added: 0097164
2017-06-06 11:47marvintmReview Assigned To => mtaal
2017-06-06 11:57marvintmAssigned ToRetail => marvintm
2017-06-07 16:31mtaalNote Added: 0097193
2017-06-07 16:31mtaalStatusresolved => closed
2017-06-07 16:31mtaalFixed in Version => RR17Q3
2017-09-19 09:24ranjith_qualiantech_comRelationship addedrelated to 0036859

Notes
(0097163)
hgbot   
2017-06-06 11:47   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f8125d38051a7116fabe0b2d2d3f33a13af5d06b
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jun 01 11:35:12 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f8125d38051a7116fabe0b2d2d3f33a13af5d06b [^]

Fixed issue 36159. Two changes have been made:
- Snapshot of the order has been moved to an earlier step in the process, to ensure that changes in the payment information are avoided in the snapshot.
- The current order is reloaded from the WebSQL database, so that the UI properly reflects the state of the receipt taken from the snapshot.

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0097164)
hgbot   
2017-06-06 11:47   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7c326d82a3b44bc239b3c046024ab0437e71f037
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jun 05 12:16:17 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7c326d82a3b44bc239b3c046024ab0437e71f037 [^]

Related to issue 36159. Payment tab will be shown if synchronization fails

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0097193)
mtaal   
2017-06-07 16:31   
Tested and reviewed