Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030971
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2015-09-29 18:122015-11-23 21:17
ReportermaiteView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision336cbe497bec
ProjectionnoneETAnoneTarget Version3.0PR16Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030971: When voiding an unpaid invoice, payment schedule details should be canceled instead of deleted

DescriptionWhen an unpaid invoice is voided using "Void" process, reversed invoice is created and both original invoice payment plan and reversed invoice payment plan are deleted so invoices are automatically canceled.

In some cases, this is creating differences between accounting balance and aging balance report (now that it is possible to include voided invoices)
Steps To Reproduce- Install Aging Balance Report module.
- Enable preference "Enable void documents filter in Aging Reports".
1. Access Purchase Invoice window, set today's date, add any line and process invoice.
2. Post invoice
3. Run Payables aging report for tomorrow date and realize that balance match with accounting balance
4. Access previous invoice and run Void process, setting date for the day after tomorrow
5. Post reversed invoice
6. Run Payables aging report for tomorrow date and option "include void invoices" and realize that balance NO match with accounting balance. Problem is that purchase invoices don't have payment plan nor schedule details any more, so they are not considered in the report

Proposed SolutionInstead of delete schedule details from original and reversed invoice, payment document cancelling these details should be created. Doing that, aging balance and accounting information will match for any date
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00317013.0PR16Q1 closednonofrancisco It is not possible to modify order's payment terms when related partial invoice is in Void status 
related to defect 0034322 closedrqueralta Payment of 0 amount created when voiding an unpaid invoice is created in Awaiting Execution status 
related to defect 0034385 closedrqueralta Payment of 0 amount created when voiding an unpaid invoice should be created with Exchange Rate record from invoice (if any) 
related to defect 0034371 closedalekosmp86 Invoice Date and Accounting Date should be truncated when invoice is created using "Void" process 
related to defect 0034992 closedcollazoandy4 Payment Plan deleted when Voiding an invoice which is prepaid via sales order 
causes defect 0033339 closedmarkmm82 Error when trying to Void a NOT PAID invoice, logged with * organization 
causes defect 0033550 closedmarkmm82 Cannot void an invoice if the business partner does not have a default financial account defined 
causes defect 00338133.0PR16Q4 closedAtulOpenbravo Wrong payment date when voiding an unpaid invoice 
causes defect 0033817 closedAtulOpenbravo No error message shown when voiding an invoice and the period is closed for AP Payment and AR Receipt 

-  Notes
(0081435)
psanjuan (manager)
2015-11-02 13:07
edited on: 2015-11-16 15:11

Issue verified.

Test Plan

Prerequisites:

All of the below needs to be executed for F&B España org.

Install Aging Balance Report module

Go to Preference window, and enable preference "Enable void documents filter in Aging Reports".

Go to Business Partner window and create a new one named "Vendor 30971" for instance. Configure this new business partner as a supplier.

Test 1 - scenario 1

Create a purchase invoice for this new BP, dated on 02-11-2015, total gross amount = 2468.40.00 €. Invoice number 787

Create another purchase invoice for this new BP, dated on 02-11-2015, total gross amount = 1398.76 €. Invoice number 788

Launch Payable Aging Schedule for 03-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 3867.16 € which is correct.

Go to Purchase Invoice window and void second invoice with an void date of 04-11-2015. Void Accounting date 04-11-2015

Launch Payable Aging Schedule once again for 03-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 3867.16 € which is correct.

Launch Payable Aging Schedule once again for 04-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 2468.40 € which is correct.

Check that both, the Purchase Invoice 788 and the reversed purchase invoice created are now related to the same payment, therefore Payment Plan and Payment Details information is not deleted anymore.

A payment has been created for an amount of 0,00 (1398.76 -1398.76) for both the purchase invoice and the reversed purchase invoice and dated on 04-11-2015.

Check that this payment can not be added to the financial account.

Check also that both Purchase Invoice and Reversed Purchase Invoice have both the status "Voided" and Payment Complete = Yes. Total Paid = 1398.76 and Total Outstanding = 0.00 which is correct.

Test 2 - scenario 2

Post this payment and check that below accounting information is generated:

04-11-2015

1398.76 (2110) Accounts Payables (DEBIT)
1398.76 (40000) Vendor Liabilities (CREDIT)

Test 3 - scenario 3

Go to payment out window and Reactivate and Delete Lines.
check that payment details info is deleted from the purchase invoice and the reversed purchase invoice.

Launch Payable Aging Schedule once again for 03-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 3867.16 € which is correct.

Launch Payable Aging Schedule once again for 04-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 2468.40 € which is correct.

So, as it seems payment out reactivation did not have any impact on the report.

Go back to Payment Out window and press Add Details button. Select the purchase invoice 788 and the reversed purchase invoice. Select Process Made Payment(s) and Withdrawal. Press Done.

Check that Purchase invoice 788 and Reverse Purchase invoice Payment Complete = Yes. Total Paid = 1398.76 and Total Outstanding = 0.00

Test 4 - scenario 4

Go to Business Partner window and create a new one named "New Vendor 30971" for instance. Configure this new business partner as a supplier.

Create a purchase invoice for this new BP, dated on 16-11-2015, total gross amount = 246.84 €. Invoice number 802

Create another purchase invoice for this new BP, dated on 18-11-2015, total gross amount = 1810.16 €. Invoice number 803

Launch Payable Aging Schedule for 16-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 264.84 € which is correct.

Launch Payable Aging Schedule for 18-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 2057.00 € which is correct.

Go to Purchase Invoice window and void second invoice with an void date of 20-11-2015. Void Accounting date 30-11-2015

Post reversed invoice:

30-11-2015

1810.16 (40000) Account Payable (DEBIT)
1496.00 (60000) Product Expense (CREDIT)
314.16 (47200 ) Purchase Tax Amount (CREDIT)

Launch Payable Aging Schedule once again for 18-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 2057.00 € which is correct.

Launch Payable Aging Schedule once again for 20-11-2015 and F&B España Euro General Ledger. Check that the balance shown in there is 246.84 € which is correct.

Check that both, the Purchase Invoice 803 and the reversed purchase invoice created are now related to the same payment, dated on 20-11-2015 (void date), therefore Payment Plan and Payment Details information is not deleted anymore.

A payment has been created for an amount of 0,00 (1810.16 -1810.16) for both the purchase invoice and the reversed purchase invoice and dated on 20-11-2015 (Void Date).

Check that this payment can not be added to the financial account.

Check also that both Purchase Invoice and Reversed Purchase Invoice have both the status "Voided" and Payment Complete = Yes. Total Paid = 1810.16 and Total Outstanding = 0.00 which is correct.

Post the payment and verify that "Vendor Prepayment" ledger account is used because payment date 20-11-2015 is before the accounting date of the voided invoice 30-11-2015

20-11-2015

1810.16 (40000) Accounts Payables (DEBIT)
1810.16 (40700) Vendor Prepayment (CREDIT)

30-11-2015

1810.16 (40700) Vendor Prepayment (DEBIT)
1810.16 (40000) Accounts Payables (CREDIT)

Test 5 - scenario 5

Select Caja financial account and set Al contado payment method as active = false. Make sure that also financial account "Cuenta de Banco" does not have "Al contado" payment method configured as an available payment method in the tab "Payment MethoD".

Create a Purchase Invoice for created business partner and Al contado payment method. Complete it. Void it. Realize an error is shown because it does not exist any financial account available for this payment method.

Test 6 - scenario 6

Select Caja financial account and set Al contado payment method as active = True. Make sure that also financial account "Cuenta de Banco" does not have "Al contado" payment method configured as an available payment method in the tab "Payment Methos".

Go to Business Partner window and check that the financial account configured for the vendor is "Cuenta de Banco".

Create a Purchase Invoice for created business partner and "Al contado" payment method. Complete it. Void it.

Check that no error is shown because it does exist a financial account available for this payment method.

Check that the payment out created has been created on "Caja" financial account, regardless it can not be added to this financial account because payment out amount is = 0.00


Test Plan above verified. Issue can be closed once code review is done.

(0081980)
hgbot (developer)
2015-11-19 11:50

Repository: erp/devel/pi
Changeset: 336cbe497bec883b0d50b8fc3a248cf3227cfcbb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Nov 16 13:39:15 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/336cbe497bec883b0d50b8fc3a248cf3227cfcbb [^]

Fixes issue 30971: Cancel PaymentScheduleDetails when voiding an unpaid invoice

When voiding an unpaid invoice, a dummy payment will be created related with both the actual invoice and the voided invoice.
In case there is no financial account available for invoice payment method, an error will be shown.
getFinancialAccountPaymentMethod method has been moved from AddPaymentDefaultValuesHandler to FIN_Utility, in order to use it in ProcessInvoice class.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
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
---
(0081981)
dmiguelez (developer)
2015-11-19 11:51

Code Review + Testing Ok
(0082255)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-09-29 18:12 maite New Issue
2015-09-29 18:12 maite Assigned To => Triage Finance
2015-09-29 18:12 maite Modules => Core
2015-09-29 18:12 maite Triggers an Emergency Pack => No
2015-09-29 18:14 maite Issue Monitored: networkb
2015-10-29 19:07 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2015-10-29 19:08 AtulOpenbravo Status new => scheduled
2015-10-29 19:10 AtulOpenbravo Steps to Reproduce Updated View Revisions
2015-11-02 13:07 psanjuan Note Added: 0081435
2015-11-02 13:08 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 13:42 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 13:45 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 13:49 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 13:53 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 13:55 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 14:18 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 14:19 psanjuan Note Edited: 0081435 View Revisions
2015-11-02 14:24 psanjuan Note Edited: 0081435 View Revisions
2015-11-09 11:55 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 12:54 aferraz Note Edited: 0081435 View Revisions
2015-11-16 12:55 aferraz Note Edited: 0081435 View Revisions
2015-11-16 13:01 aferraz Note Edited: 0081435 View Revisions
2015-11-16 13:10 aferraz Note Edited: 0081435 View Revisions
2015-11-16 13:27 aferraz Assigned To AtulOpenbravo => aferraz
2015-11-16 14:19 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 14:36 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 14:45 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 14:46 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 14:51 psanjuan Note Edited: 0081435 View Revisions
2015-11-16 15:11 psanjuan Note Edited: 0081435 View Revisions
2015-11-19 11:50 hgbot Checkin
2015-11-19 11:50 hgbot Note Added: 0081980
2015-11-19 11:50 hgbot Status scheduled => resolved
2015-11-19 11:50 hgbot Resolution open => fixed
2015-11-19 11:50 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/336cbe497bec883b0d50b8fc3a248cf3227cfcbb [^]
2015-11-19 11:51 dmiguelez Review Assigned To => dmiguelez
2015-11-19 11:51 dmiguelez Note Added: 0081981
2015-11-19 11:51 dmiguelez Status resolved => closed
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082255
2015-12-17 12:05 vmromanos Relationship added related to 0031701
2016-06-23 12:09 maite Relationship added causes 0033339
2016-07-27 13:50 ngarcia Relationship added causes 0033550
2016-08-25 14:53 maite Relationship added causes 0033813
2016-08-26 08:56 ngarcia Relationship added causes 0033817
2016-10-27 14:08 ngarcia Relationship added related to 0034322
2016-11-04 09:15 maite Relationship added related to 0034385
2016-11-09 09:18 aferraz Relationship added related to 0034371
2017-01-18 11:30 maite Relationship added related to 0034992


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker