Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031742Retail ModulesWeb POSpublic2015-12-17 15:062015-12-28 16:43
guillermogil 
simbu94 
highmajoralways
closedfixed 
30Professional Appliance
 
RR16Q1 
jorge-garcia
No
0031742: Cancel a payment with paymentData and no VoidTransaction function creates an error
Cancel a payment with paymentData and no VoidTransaction function creates an error.

Error:
TypeError: voidTransaction is not a function
    at callVoidTransaction (fab28d396699f3dea414d78c44238eff_WebPOS.js:38168)
    at Object.OB.UTIL.showConfirmation.display.action (fab28d396699f3dea414d78c44238eff_WebPOS.js:38203)
    at Object.button.tap (fab28d396699f3dea414d78c44238eff_WebPOS.js:10015)
    at Object.enyo.kind.dispatch (enyo.js:628)
    at Object.enyo.kind.dispatchEvent (enyo.js:612)
    at Object.enyo.kind.inherited (enyo.js:410)
    at Object.enyo.kind.dispatchEvent (enyo.js:1338)
    at Object.enyo.kind.dispatchBubble (enyo.js:616)
    at Object.enyo.kind.bubble (enyo.js:604)
    at Object.enyo.dispatcher.dispatchBubble (enyo.js:1783)
    at Object.enyo.dispatcher.dispatch [as dispatch] (enyo.js:1762)
    at Object.enyo.dispatch (enyo.js:1788); line: Object.OB.UTIL.showError (http://localhost:8080/openbravo/web/js/gen/fab28d396699f3dea414d78c44238eff_WebPOS.js:10150:6 [^]) (*,+)processConsoleLevel @ fab28d396699f3dea414d78c44238eff_WebPOS.js:2522
fab28d396699f3dea414d78c44238eff_WebPOS.js:38168 Uncaught TypeError: voidTransaction is not a function
Create a Payment with paymentData.
e.g.-
      OB.MobileApp.model.receipt.addPayment(new OB.Model.PaymentLine({
        kind: payment.payment.searchKey,
        name: OB.MobileApp.model.getPaymentName(payment.payment.searchKey),
        amount: OB.DEC.number(OB.DEC.div(amount, 100)),
        rate: payment.rate,
        mulrate: payment.mulrate,
        isocode: payment.isocode,
        isCash: payment.paymentMethod.iscash,
        allowOpenDrawer: payment.paymentMethod.allowopendrawer,
        openDrawer: payment.paymentMethod.openDrawer,
        printtwice: payment.paymentMethod.printtwice,
        paymentData: {
          serialNumber: voucherNumber
        }
      })
Then try to cancel it. It will show an error
Ensure that the WebPOS does not fail when, in a payment, the paymentData is defined and the voidTransaction is not defined
Right now, the application tries to execute voidTransaction even if the voidTransaction is not defined
No tags attached.
related to defect 0031743 closed ranjith_qualiantech_com Cancel a payment with paymentData after a refresh creates an error 
png Screenshot from 2015-12-17 15:04:04.png (344,825) 2015-12-17 15:06
https://issues.openbravo.com/file_download.php?file_id=8814&type=bug
Issue History
2015-12-17 15:06guillermogilNew Issue
2015-12-17 15:06guillermogilAssigned To => Retail
2015-12-17 15:06guillermogilFile Added: Screenshot from 2015-12-17 15:04:04.png
2015-12-17 15:06guillermogilResolution time => 1450738800
2015-12-17 15:06guillermogilTriggers an Emergency Pack => No
2015-12-17 15:07guillermogilSummaryCancel a payment with paymentData and no VoidTransaction functioin creates and error => Cancel a payment with paymentData and no VoidTransaction function creates an error
2015-12-17 15:07guillermogilDescription Updatedbug_revision_view_page.php?rev_id=10500#r10500
2015-12-17 15:17guillermogilRelationship addedrelated to 0031743
2015-12-17 18:27OrekariaProposed Solution updated
2015-12-17 19:12OrekariaStatusnew => acknowledged
2015-12-22 06:35simbu94Assigned ToRetail => simbu94
2015-12-22 07:50simbu94Statusacknowledged => scheduled
2015-12-22 11:25hgbotCheckin
2015-12-22 11:25hgbotNote Added: 0082931
2015-12-22 11:25hgbotStatusscheduled => resolved
2015-12-22 11:25hgbotResolutionopen => fixed
2015-12-22 11:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/109e42f6be54d5c8369c1ab81f64981d7d8dd4ea [^]
2015-12-22 11:25hgbotCheckin
2015-12-22 11:25hgbotNote Added: 0082932
2015-12-23 13:42hgbotCheckin
2015-12-23 13:42hgbotNote Added: 0082962
2015-12-28 16:03jorge-garciaReview Assigned To => jorge-garcia
2015-12-28 16:43jorge-garciaNote Added: 0083016
2015-12-28 16:43jorge-garciaStatusresolved => closed
2015-12-28 16:43jorge-garciaFixed in Version => RR16Q1

Notes
(0082931)
hgbot   
2015-12-22 11:25   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 109e42f6be54d5c8369c1ab81f64981d7d8dd4ea
Author: Silambarasan Sekar <silambarasan <at> qualiantech.com>
Date: Tue Dec 22 15:54:17 2015 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/109e42f6be54d5c8369c1ab81f64981d7d8dd4ea [^]

Fixed Issue 31742: Ignore Void Transaction Function if voidTransaction is not defined.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0082932)
hgbot   
2015-12-22 11:25   
Repository: tools/automation/pi-mobile
Changeset: e869045470e449f75a2fa6dde92ac35c44b34575
Author: Silambarasan Sekar <silambarasan <at> qualiantech.com>
Date: Tue Dec 22 15:54:22 2015 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e869045470e449f75a2fa6dde92ac35c44b34575 [^]

Verifies issue 31742: Added automated test 'I31742_CancelPaymentWithPaymentDataNoVoidTranx'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31742_CancelPaymentWithPaymentDataNoVoidTranx.java
---
(0082962)
hgbot   
2015-12-23 13:42   
Repository: tools/automation/pi-mobile
Changeset: 96c0c6bc93bcd8be755be25575df9fec5c4b5cc9
Author: Silambarasan Sekar <silambarasan <at> qualiantech.com>
Date: Wed Dec 23 18:10:47 2015 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/96c0c6bc93bcd8be755be25575df9fec5c4b5cc9 [^]

Verifies issue 31742: Added automated test 'I31742_CancelPaymentWithPaymentDataNoVoidTranx'

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31742_CancelPaymentWithPaymentDataNoVoidTranx.java
---
(0083016)
jorge-garcia   
2015-12-28 16:43   
Code review and testing ok