Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035301Retail ModulesWeb POSpublic2017-02-17 14:032017-02-27 09:27
aaroncalero 
mario_castello 
highmajoralways
closedfixed 
5
 
RR17Q2 
marvintm
No
0035301: Calculate Receipt remains locked if the server fails to process a ticket transaction
When the WebPOS Synchronized Mode is enabled, if the transaction that processes a receipt fails, the webpos remains in an inconsistent state and the receipt totals can no longer be calculated, because the isCalculateReceiptLocked attribute of the receipt remains set to 'true'.
Configuration:
(1) Log in in backend, go to the preference window and enable the preference 'WebPOS Synchronized Mode' with value 'Y'
(2) Go to the Warehouse and storage bins window, create a new warehouse for the organization Vall Blanca Store, and add a DISABLED storage bin for that warehouse.
(3) Go to the Organization window, find the Vall Blanca Store record, and on the Warehouse tab add a new record with the warehouse created on step (2), with priority 0 (highest priority).

Web POS:
Login in web pos on the terminal VBS-1
Add 1 Multi-tool.
Click on the total amount button and pay the receipt.
The Processing Transaction popup will appear, and after a few seconds the Transaction Failed popup will be shown, specifying the error: The warehouse does not have any storage bins.
Click on Ok, and then try changing the qty of the receipt. The qty will be changed, but the total amount of the receipt won't be updated, and the browser console will show the following error:
calculateReceipt execution is forbidden right now
When the runSyncProcess error callback executed, the callback of the receipt's close event is executed[1], passing the isCancelled flag as 'true'.
On the code of that callback, the isCalculateReceiptLocked is only reset if the isCancelled flag was 'false'.
This flag, along with setIsCalculateGrossLockState, should be reset in any case, regardless of the output of runSyncProcess

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/b1993add07d7/web/org.openbravo.retail.posterminal/js/data/dataordersave.js#l236 [^]
No tags attached.
diff 35301possibleFix.diff (690) 2017-02-17 14:55
https://issues.openbravo.com/file_download.php?file_id=10462&type=bug
Issue History
2017-02-17 14:03aaroncaleroNew Issue
2017-02-17 14:03aaroncaleroAssigned To => Retail
2017-02-17 14:03aaroncaleroResolution time => 1488495600
2017-02-17 14:03aaroncaleroTriggers an Emergency Pack => No
2017-02-17 14:09aaroncaleroProposed Solution updated
2017-02-17 14:55jorge-garciaFile Added: 35301possibleFix.diff
2017-02-17 15:46mario_castelloAssigned ToRetail => mario_castello
2017-02-17 15:46mario_castelloStatusnew => acknowledged
2017-02-17 15:46mario_castelloStatusacknowledged => scheduled
2017-02-21 16:14hgbotCheckin
2017-02-21 16:14hgbotNote Added: 0094521
2017-02-21 16:14hgbotStatusscheduled => resolved
2017-02-21 16:14hgbotResolutionopen => fixed
2017-02-21 16:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cef081b9da0b534bea6b896f44305491abcb1916 [^]
2017-02-27 09:27marvintmReview Assigned To => marvintm
2017-02-27 09:27marvintmStatusresolved => closed
2017-02-27 09:27marvintmFixed in Version => RR17Q2

Notes
(0094521)
hgbot   
2017-02-21 16:14   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: cef081b9da0b534bea6b896f44305491abcb1916
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Fri Feb 17 10:16:52 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cef081b9da0b534bea6b896f44305491abcb1916 [^]

Fixed issue 0035301: Calculate Receipt remains locked if the server fails to process a ticket transaction

- Set the receipt properties to false when the transactions fails.

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---