Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029497Openbravo ERPZ. Otherspublic2015-03-30 18:242015-04-07 10:21
maite 
vmromanos 
immediateminoralways
closedfixed 
5
 
3.0PR15Q23.0PR15Q2 
umartirena
Core
Production - QA Approved
2014-10-02
3.0PR14Q4
No
0029497: NullPointerException error when Adding Payment from Match Statement process and working with Automatic Payment Method
NullPointerException error when Adding Payment from Match Statement process and working with Automatic Payment Method
1. Access "Cuenta de Banco" financial account and create new Bank Statement. Add line with IN amount=50
2. Access "Execution process" window and add parameter to "Simple Execution Process" as "Parameter type= IN", "Input type= Checkbox", "Default value for flag= yes", "Mandatory= yes"
3. Access Financial Account | Payment method tab and configure Transferencia as "Automatic", Execution process= "Simple Execution Process" and Deferred= NO
4. Run "Match Statement" process and "Add transaction" process. Realize that IN amount is set to 50
5. Run "Add Payment" process, choose any invoice and press Done. Realize that IN amount is empty

Following NullPointerException error appears in openbravo.log:
java.lang.NullPointerException
    at org.openbravo.advpaymentmngt.process.FIN_ExecutePayment.init(FIN_ExecutePayment.java:83)
Problem is that "parameters" variable is null in line 83 of FIN_ExecutePayment.java file
Approved
blocks defect 0029464 closed vmromanos NullPointerException error when Adding Payment from Match Statement process and working with Automatic Payment Method 
Issue History
2015-04-01 17:26vmromanosTypedefect => backport
2015-04-01 17:26vmromanosTarget Version => 3.0PR15Q2
2015-04-01 17:27vmromanosTag Attached: Approved
2015-04-07 10:17hgbotCheckin
2015-04-07 10:17hgbotNote Added: 0076356
2015-04-07 10:17hgbotStatusscheduled => resolved
2015-04-07 10:17hgbotResolutionopen => fixed
2015-04-07 10:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/e8390419d028770373905b445ac48691f39131c1 [^]
2015-04-07 10:20umartirenaNote Added: 0076357
2015-04-07 10:20umartirenaNote Edited: 0076357bug_revision_view_page.php?bugnote_id=0076357#r8181
2015-04-07 10:21umartirenaReview Assigned To => umartirena
2015-04-07 10:21umartirenaNote Added: 0076358
2015-04-07 10:21umartirenaStatusresolved => closed
2015-04-07 10:21umartirenaFixed in Version => 3.0PR15Q2

Notes
(0076356)
hgbot   
2015-04-07 10:17   
Repository: erp/backports/3.0PR15Q2
Changeset: e8390419d028770373905b445ac48691f39131c1
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 01 15:55:26 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/e8390419d028770373905b445ac48691f39131c1 [^]

Fixed bug 29497: Several issues in Match Statement

1) Wrong management of default parameters in automatic execution process:
ParameterType was used where InputType was expected (and the opposite)

2) NPE when working with default parameters in execution process
constantParameters attribute wasn't initialized before being used. Fixed also parameters attribute with the same potential issue

3) Impossible to create a new payment from transaction when the payment method has an automatic execution process and automatic deposit/withdrawn
We now pass an internal parameter "comingFrom" to know if we come from a transaction. In this case we don't create automatically the transaction (regardless the payment method is automatic deposit/withdrawn) to avoid breaking the unique constraint FIN_FINACC_TRANSACTION_UN inside FIN_FINACC_TRANSACTION table

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0076357)
umartirena   
2015-04-07 10:20   
Repository: erp/backports/3.0PR15Q2
Changeset: fc1c0b8924b8
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Apr 07 10:06:32 2015 +0200
URL: https://code.openbravo.com/erp/backports/3.0PR15Q2/rev/fc1c0b8924b8 [^]

Related to bug 29497: Code review

Use ParameterType instead of InputType for CONSTANT String.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java

(0076358)
umartirena   
2015-04-07 10:21   
Code Review + Testing OK