Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033550Openbravo ERPZ. Otherspublic2016-07-27 13:482018-02-22 17:21
ngarcia 
markmm82 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
Production - Confirmed Stable
2015-11-19
3.0PR16Q1
http://code.openbravo.com/erp/devel/pi/rev/336cbe497bec883b0d50b8fc3a248cf3227cfcbb [^]
Yes
0033550: 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.
depends on backport 00335603.0PR16Q3.1 closed markmm82 Cannot void an invoice if the business partner does not have a default financial account defined 
depends on backport 00335613.0PR16Q2.2 closed markmm82 Cannot void an invoice if the business partner does not have a default financial account defined 
caused by defect 00309713.0PR16Q1 closed aferraz When voiding an unpaid invoice, payment schedule details should be canceled instead of deleted 
Issue History
2016-07-27 13:48ngarciaNew Issue
2016-07-27 13:48ngarciaAssigned To => Triage Finance
2016-07-27 13:48ngarciaModules => Core
2016-07-27 13:48ngarciaTriggers an Emergency Pack => No
2016-07-27 13:50ngarciaRelationship addedcaused by 0030971
2016-07-27 13:52ngarciaResolution time => 1471384800
2016-07-27 13:52ngarciaTriggers an Emergency PackNo => Yes
2016-07-27 20:47markmm82Assigned ToTriage Finance => markmm82
2016-07-28 17:51markmm82Regression level => Production - Confirmed Stable
2016-07-28 17:51markmm82Regression date => 2015-11-23
2016-07-28 17:51markmm82Regression introduced in release => 3.0PR16Q1
2016-07-28 17:51markmm82Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/336cbe497bec883b0d50b8fc3a248cf3227cfcbb [^]
2016-07-28 17:59markmm82Statusnew => scheduled
2016-07-28 19:36markmm82Note Added: 0088698
2016-08-01 08:53aferrazRegression date2015-11-23 => 2015-11-19
2016-08-05 09:47hgbotCheckin
2016-08-05 09:47hgbotNote Added: 0088831
2016-08-05 09:47hgbotStatusscheduled => resolved
2016-08-05 09:47hgbotResolutionopen => fixed
2016-08-05 09:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ee738640c40498a1cccf160e1c0ec6cf3d31c684 [^]
2016-08-05 09:48hgbotCheckin
2016-08-05 09:48hgbotNote Added: 0088832
2016-08-05 09:49aferrazReview Assigned To => aferraz
2016-08-05 09:49aferrazNote Added: 0088833
2016-08-05 09:49aferrazStatusresolved => closed
2016-08-05 09:49aferrazFixed in Version => 3.0PR16Q4
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089041
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089042
2018-02-22 17:21hgbotCheckin
2018-02-22 17:21hgbotNote Added: 0102609

Notes
(0088698)
markmm82   
2016-07-28 19:36   
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 no error is shown and the reversed invoice is created successfully
(0088831)
hgbot   
2016-08-05 09:47   
Repository: erp/devel/pi
Changeset: ee738640c40498a1cccf160e1c0ec6cf3d31c684
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Aug 04 09:52:25 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/ee738640c40498a1cccf160e1c0ec6cf3d31c684 [^]

Fixes issue 33550: 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
---
(0088832)
hgbot   
2016-08-05 09:48   
Repository: erp/devel/pi
Changeset: ae1076c7e9eabbe78e94b198b03c5a7addacb8cc
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 04 16:07:56 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ae1076c7e9eabbe78e94b198b03c5a7addacb8cc [^]

Related to issue 33550: 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
---
(0088833)
aferraz   
2016-08-05 09:49   
Code review + Testing OK
(0089041)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0089042)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0102609)
hgbot   
2018-02-22 17:21   
Repository: tools/automation/int
Changeset: 2ac3c79b0af0218f57eca9b6edd67c63eb90c89c
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Thu Oct 20 21:42:10 2016 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/2ac3c79b0af0218f57eca9b6edd67c63eb90c89c [^]

Related to issue 33550: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/data/financial/receivablespayables/setup/paymentmethod/PaymentMethodData.java
M src-test/com/openbravo/test/integration/erp/gui/popups/RequestProcessPopUp.java
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/PurchaseInvoiceHeaderTab.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesinvoice/SalesInvoiceHeaderTab.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRO_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SAL_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/procurement/transactions/PurchaseInvoice.java
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesInvoice.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression33550.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression33550.java
---