Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039956Retail ModulesCopy Retail Storepublic2019-01-15 14:052019-02-14 16:23
joniturralde93 
rqueralta 
urgentmajoralways
closedfixed 
5
pi 
piRR19Q2 
marvintm
No
0039956: Under specific circumstances (payment type/method), copy terminal fails [financial account + leave as credit]
If you select no financial account for a payment type, and its payment method has leave as credit checked, copy terminal process fails.
1. VBS-1 -> Payment type voucher
2. Manage to select no financial account and have payment method with leave as credit.
3. Copy terminal.
No tags attached.
Issue History
2019-01-15 14:05joniturralde93New Issue
2019-01-15 14:05joniturralde93Assigned To => rqueralta
2019-01-15 14:05joniturralde93Resolution time => 1549321200
2019-01-15 14:05joniturralde93Triggers an Emergency Pack => No
2019-01-16 09:20jfrancesIssue Monitored: jfrances
2019-01-16 13:00hgbotCheckin
2019-01-16 13:00hgbotNote Added: 0108979
2019-01-16 13:00hgbotStatusnew => resolved
2019-01-16 13:00hgbotResolutionopen => fixed
2019-01-16 13:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e62ce91d8ee7a774f77a11478a05afe41d10c8cf [^]
2019-02-11 12:00marvintmNote Added: 0109662
2019-02-11 12:00marvintmStatusresolved => new
2019-02-11 12:00marvintmResolutionfixed => open
2019-02-11 19:39hgbotCheckin
2019-02-11 19:39hgbotNote Added: 0109680
2019-02-11 19:39hgbotStatusnew => resolved
2019-02-11 19:39hgbotResolutionopen => fixed
2019-02-11 19:39hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e62ce91d8ee7a774f77a11478a05afe41d10c8cf [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dc0800a966f1f6920cc5a6ba7de53b3de5e4fc78 [^]
2019-02-14 16:23marvintmReview Assigned To => marvintm
2019-02-14 16:23marvintmStatusresolved => closed
2019-02-14 16:23marvintmFixed in Version => RR19Q2

Notes
(0108979)
hgbot   
2019-01-16 13:00   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e62ce91d8ee7a774f77a11478a05afe41d10c8cf
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Jan 14 15:38:45 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e62ce91d8ee7a774f77a11478a05afe41d10c8cf [^]

Fixed issue 39956: Under specific circumstances (payment type/method), copy
terminal fails [financial account + leave as credit]

- Verifies if the financial account is null to avoid the event handler execution

---
M src/org/openbravo/retail/posterminal/event/AppPaymentEventHandler.java
---
(0109662)
marvintm   
2019-02-11 12:00   
The idea of the fix is good, but the implementation does not work. The changed code will crash with a NullPointerException when you define the payment method manually, because the condition which is being checked is incorrect. Instead of this:

    if (appPayment.getFinancialAccount().getId() != null) {


It should be like this:

    if (appPayment.getFinancialAccount() != null) {

The problem can be reproduced simply by creating a payment method in the touchpoint type with "leave as credit" checked, and then trying to create the corresponding payment method in the touchpoint window.
(0109680)
hgbot   
2019-02-11 19:39   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dc0800a966f1f6920cc5a6ba7de53b3de5e4fc78
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Feb 11 10:30:02 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dc0800a966f1f6920cc5a6ba7de53b3de5e4fc78 [^]

Fixed issue 39956: Under specific circumstances (payment type/method), copy
terminal fails [financial account + leave as credit]

- Fixed nullpointer caused by the previous solution

---
M src/org/openbravo/retail/posterminal/event/AppPaymentEventHandler.java
---