Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027872Openbravo ERPZ. Otherspublic2014-10-15 11:252014-12-30 23:22
maite 
vmromanos 
immediatemajoralways
closedfixed 
5
 
 
AtulOpenbravo
Core
Packaging and release
2014-08-11
main
https://code.openbravo.com/erp/devel/pi/rev/681262a36913d7d9e63662894a1f0fe3b131e7f3 [^]
No
0027872: Error obtained when trying to Reactivate a payment and related business partner does not have currency defined
Error obtained when trying to Reactivate a payment and related business partner does not have currency defined
1. Create new Business Partner. Set it as "Customer" and define Payment MEthod and Financial Account (NO define Pricelist). Define Location for that business partner
2. Register new Payment In using business partner. Add gl item line and process
3. Try to run "Reactivate" or "Reactivate and delete lines" process and "Error" (with no information) will be raised

Real problem is that this business partner does not have currency defined, so null pointer exception error is thrown in line 774 of FIN_PaymentProcess.java, when following code is executed: toCurrency = businessPartner.getCurrency().getId();
No tags attached.
related to defect 00253923.0PR14Q4 closed eduardo_Argal Wrong customer balance when working with multicurrency 
caused by defect 0027298pi closed daniOpenbravo Error when reactivating payment in/out if business partner field is blank. 
Issue History
2014-10-15 11:25maiteNew Issue
2014-10-15 11:25maiteAssigned To => dmiguelez
2014-10-15 11:25maiteModules => Core
2014-10-15 11:25maiteRegression level => Production - QA Approved
2014-10-15 11:25maiteTriggers an Emergency Pack => No
2014-10-15 11:25maiteIssue Monitored: networkb
2014-10-15 11:41vmromanosStatusnew => scheduled
2014-10-15 11:41vmromanosAssigned Todmiguelez => vmromanos
2014-10-15 11:41vmromanosfix_in_branch => pi
2014-10-15 13:24vmromanosRelationship addedrelated to 0025392
2014-10-15 13:24vmromanosRelationship addedcaused by 0027298
2014-10-15 13:27vmromanosRegression levelProduction - QA Approved => Packaging and release
2014-10-15 13:27vmromanosRegression date => 2014-08-11
2014-10-15 13:27vmromanosRegression introduced in release => main
2014-10-15 13:27vmromanosRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/681262a36913d7d9e63662894a1f0fe3b131e7f3 [^]
2014-10-15 13:27vmromanosfix_in_branchpi =>
2014-10-15 13:31vmromanosNote Added: 0070957
2014-10-15 13:32vmromanosNote Edited: 0070957bug_revision_view_page.php?bugnote_id=0070957#r6787
2014-10-15 13:41hgbotCheckin
2014-10-15 13:41hgbotNote Added: 0070959
2014-10-15 13:41hgbotStatusscheduled => resolved
2014-10-15 13:41hgbotResolutionopen => fixed
2014-10-15 13:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/36d35b92e566c690bd1e8cea06b304eed40d8ad0 [^]
2014-10-15 15:24AtulOpenbravoReview Assigned To => AtulOpenbravo
2014-10-15 15:24AtulOpenbravoNote Added: 0070967
2014-10-15 15:24AtulOpenbravoStatusresolved => closed
2014-12-30 23:22hudsonbotCheckin
2014-12-30 23:22hudsonbotNote Added: 0072936

Notes
(0070957)
vmromanos   
2014-10-15 13:31   
(edited on: 2014-10-15 13:32)
Test plan:
Login as role admin
1. Create new Business Partner. Set it as "Customer" and define Payment Method and Financial Account (NO define Pricelist). Define Location for that business partner
2. Register new Payment In using business partner. Add gl item line and process
3. Try to run "Reactivate" or "Reactivate and delete lines" process. The payment will be successfully reactivated

(0070959)
hgbot   
2014-10-15 13:41   
Repository: erp/devel/pi
Changeset: 36d35b92e566c690bd1e8cea06b304eed40d8ad0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Oct 15 13:40:56 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/36d35b92e566c690bd1e8cea06b304eed40d8ad0 [^]

Fixed bug 27872: NPE when reactivating payment for BPartner without currency

When reactivating the payment, the FIN_PaymentProcess was getting the business partner currency's ID where, in some strange circunstances, it may not be defined yet.
Moreover, getting the BP currency ID at this point is not needed at all, so these lines have been removed.

Finally, in another part of the code, we have done a trivial refactor to use Currency objects instead of Strings to have a better control over NPE.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0070967)
AtulOpenbravo   
2014-10-15 15:24   
Verified
(0072936)
hudsonbot   
2014-12-30 23:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6525fe229e06 [^]
Maturity status: Test