Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030715Openbravo ERPZ. Otherspublic2015-09-01 11:142015-09-04 12:34
maite 
aferraz 
urgentminoralways
closedfixed 
5
 
3.0PR15Q2.5 
dmiguelez
Advanced Payables and Receivables Mngmt
Production - Confirmed Stable
2015-03-16
3.0PR14Q3.8
https://code.openbravo.com/erp/devel/pi/rev/41e10f964f97 [^]
No
0030715: Payment Method not filled when running Add Payment From Invoice and business partner has not default Financial Account
Payment Method not filled when running Add Payment From Invoice and business partner has not default Financial Account
1. Access Business Partner "Alimentos y Supermercados" and leave Financial Account field empty in Customer tab
2. Register new Sales Invoice for this business partner, adding any line and process
3. Run Add Payment process and realize that Payment Method field is not filled
No tags attached.
blocks defect 00307123.0PR15Q4 closed aferraz Payment Method not filled when running Add Payment From Invoice and business partner has not default Financial Account 
Issue History
2015-09-01 12:40aferrazTypedefect => backport
2015-09-01 12:40aferrazTarget Version3.0PR15Q4 => 3.0PR15Q2.5
2015-09-03 10:32maiteSeveritymajor => minor
2015-09-04 12:32hgbotCheckin
2015-09-04 12:32hgbotNote Added: 0080099
2015-09-04 12:32hgbotStatusscheduled => resolved
2015-09-04 12:32hgbotResolutionopen => fixed
2015-09-04 12:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q2.5/rev/66cf0b6848bf51f79bada76ee643924f060186b4 [^]
2015-09-04 12:34dmiguelezReview Assigned To => dmiguelez
2015-09-04 12:34dmiguelezNote Added: 0080103
2015-09-04 12:34dmiguelezStatusresolved => closed

Notes
(0080099)
hgbot   
2015-09-04 12:32   
Repository: erp/backports/3.0PR15Q2.5
Changeset: 66cf0b6848bf51f79bada76ee643924f060186b4
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Sep 02 19:55:07 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.5/rev/66cf0b6848bf51f79bada76ee643924f060186b4 [^]

Fixes issue 30715: Payment Method not filled in Add Payment

Payment Method was not filled when running Add Payment and business partner has no default Financial Account.
When calling from getDefaultPaymentMethod to getFinancialAccountPaymentMethod in AddPaymentDefaultValuesHandler class with a null financialAccountId (in case of opening Add Payment from windows without Financial Account information like Purchase/Sales Order/Invoice and Business Partner does not have a default Financial Account setted), a NPE was raised and Payment Method was not filled in Add Payment.
Now, in Purchase/Sales Order/Invoice windows, where is no financial account information in the context, document payment method will be taken if it is active for any financial account, if not, business partner default payment method will be taken instead (if it is active for any financial account and document organization has access to it).
In those windows, Financial Account selector will show Business Partner default account if selected Payment Method belongs to it, or any Financial Account which Payment Method belongs to instead.
In case of opening Add Payment from Payment In/Out windows, where exists Financial Account information in the context, Payment Method and Financial Account will be taken from the document.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
---
(0080103)
dmiguelez   
2015-09-04 12:34   
Code Review + Testing Ok