Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037537Retail ModulesWeb POSpublic2017-12-21 12:282017-12-22 13:24
samuel_nicuesa 
jorge-garcia 
highmajoralways
closedfixed 
5
RR16Q4.3 
RR18Q1 
marvintm
No
0037537: It is necessary to display an advice, red message , and not execute callback when the WEB POS transaction fails.
It is necessary to display an advice and don't execute callback when the WEB POS transaction fails.
-Login into Web POS
-Using org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/data/dataordersave.js file,put a breakpoint in "frozenReceipt.set('hasbeenpaid', 'Y');" line of this part:

           receipt.set('hasbeenpaid', 'Y');
           frozenReceipt.set('hasbeenpaid', 'Y');
           if (OB.MobileApp.model.hasPermission('OBMOBC_SynchronizedMode',
           true)) {
and put another breakpoint in:
        "OB.error("[receipt.closed] The transaction failed..." line.

-Add one product to the receipt and pay it.

-Then execute this commands in the first breakpoint using the developers tools of chrome:
    superreceipt=OB.UTIL.clone(frozenReceipt)
    frozenReceipt=null

-In the second breakpoint execute superreceipt = frozenReceipt.

-After that if you refresh WEB POS you can see the same receipt because it has not been synchronized and there wasn't a red popup showing the error (transaction failed...).
No tags attached.
Issue History
2017-12-21 12:28samuel_nicuesaNew Issue
2017-12-21 12:28samuel_nicuesaAssigned To => Retail
2017-12-21 12:28samuel_nicuesaResolution time => 1515625200
2017-12-21 12:28samuel_nicuesaTriggers an Emergency Pack => No
2017-12-21 17:26jorge-garciaStatusnew => scheduled
2017-12-21 17:26jorge-garciaAssigned ToRetail => jorge-garcia
2017-12-22 09:31hgbotCheckin
2017-12-22 09:31hgbotNote Added: 0101198
2017-12-22 09:31hgbotStatusscheduled => resolved
2017-12-22 09:31hgbotResolutionopen => fixed
2017-12-22 09:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/49b3057456996423b8fd5007bf7383a88294e168 [^]
2017-12-22 13:24marvintmReview Assigned To => marvintm
2017-12-22 13:24marvintmStatusresolved => closed
2017-12-22 13:24marvintmFixed in Version => RR18Q1

Notes
(0101198)
hgbot   
2017-12-22 09:31   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 49b3057456996423b8fd5007bf7383a88294e168
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Dec 22 09:31:43 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/49b3057456996423b8fd5007bf7383a88294e168 [^]

Fixed issue 37537: It is necessary to display an advice, red message , and
not execute callback when the WEB POS transaction fails.

The solution is to show a red message when the transaction fails and don’t
execute the callback to stop the execution flow.

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