Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033560Openbravo ERPZ. Otherspublic2016-07-27 13:482016-08-12 09:02
ngarcia 
markmm82 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q3.13.0PR16Q3.1 
aferraz
Core
Production - Confirmed Stable
2015-11-23
3.0PR16Q1
http://code.openbravo.com/erp/devel/pi/rev/336cbe497bec883b0d50b8fc3a248cf3227cfcbb [^]
Yes
0033560: Cannot void an invoice if the business partner does not have a default financial account defined
Cannot void an invoice if the business partner does not have a default financial account defined and the payment method is defined as default in a financial account that does not belong to the natural tree of the invoice's organization
As group admin role:
   Create a new Payment Method:
      Organization: *
      Payment In Allowed: Y
      Receive Payments in Multiple Currencies: Y
  Add it to 'Bank - Account 1' financial account and set it as default
  Add it to 'Cuenta de Banco' financial account (Default = 'N')
  Remove the Financial Account to 'Hoteles Buenas Noches, S.A.' customer (Business Partner - Customer tab)
  Create a Sales Invoice with that business partner and payment method
  Complete it
  Try to void it and check the following error message is shown:
     It does not exist any Financial Account available for this Payment Method
No tags attached.
blocks defect 0033550 closed markmm82 Cannot void an invoice if the business partner does not have a default financial account defined 
Issue History
2016-07-28 17:59markmm82Typedefect => backport
2016-07-28 17:59markmm82Target Version => 3.0PR16Q3
2016-08-04 13:44plujanTarget Version3.0PR16Q3 => 3.0PR16Q3.1
2016-08-12 09:01hgbotCheckin
2016-08-12 09:01hgbotNote Added: 0089070
2016-08-12 09:01hgbotStatusscheduled => resolved
2016-08-12 09:01hgbotResolutionopen => fixed
2016-08-12 09:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q3.1/rev/0d7824425cde26c44b8e60b888812c1864017aaf [^]
2016-08-12 09:01hgbotCheckin
2016-08-12 09:01hgbotNote Added: 0089071
2016-08-12 09:02aferrazReview Assigned To => aferraz
2016-08-12 09:02aferrazNote Added: 0089072
2016-08-12 09:02aferrazStatusresolved => closed
2016-08-12 09:02aferrazFixed in Version => 3.0PR16Q3.1

Notes
(0089070)
hgbot   
2016-08-12 09:01   
Repository: erp/backports/3.0PR16Q3.1
Changeset: 0d7824425cde26c44b8e60b888812c1864017aaf
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Aug 04 09:52:25 2016 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.1/rev/0d7824425cde26c44b8e60b888812c1864017aaf [^]

Fixes issue 33560: Error voiding an invoice if bp doesn't have default account

Method used to get the default financial account (getFinancialAccountPaymentMethod) was not taking into account the natural tree of the organization of document being processed, always was ordering by "default" account and when the query returns more than one results, if the first record's account does not belong to the natural tree of the entity's organization (in this case invoice's organization) validation was failing and an error message was shown.

To avoid it, was overwritten the getFinancialAccountPaymentMethod method of the FIN_Utility class to also filtering by financial accounts belonging to the natural tree of the entity's organization. Was necessary to adapt other classes using this method to work correctly.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
(0089071)
hgbot   
2016-08-12 09:01   
Repository: erp/backports/3.0PR16Q3.1
Changeset: a77938d67f97c6b6a6b6e9f99fdcf1dd2d5fb432
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 04 16:07:56 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.1/rev/a77938d67f97c6b6a6b6e9f99fdcf1dd2d5fb432 [^]

Related to issue 33560: Code review improvements

Remove unused OrganizationStructureProvider.
Remove duplicated method.
Remove orgId1 parameter as it can be calculated inside the query.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
(0089072)
aferraz   
2016-08-12 09:02   
Code review + Testing OK