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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035029
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2017-01-23 10:552017-03-17 02:25
ReportermaiteView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision32d462335fc9
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarkmm82
Web browser
ModulesAdvanced Payables and Receivables Mngmt
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035029: Wrong Reverse Payment accounting entry when referring an invoice declared as doubtful debt

DescriptionAn invoice declared as doubtful debt can lately be paid. Accounting entry of this payment is properly posted according with documentation: http://wiki.openbravo.com/wiki/Doubtful_Debt [^]
But in case this payment is reversed, accounting entry of reversed payment is not undoing previous posting
Steps To Reproduce1. Register Sales Invoice for any org and bp. Set invoice date in November and payment term=30 days. Add any line and process. Post invoice
2. Create Doubtful Debt Run for same org, bp, today's date and days overdue=30. Run "select doubtful debt" and select previous invoice. Process document
3. Access Doubtful Debt window and post document
4. Access previous Sales Invoice and run "Add payment" process to completely pay invoice. Post created payment and realize that accounting entry is the expected one, according with: http://wiki.openbravo.com/wiki/Doubtful_Debt [^]
5. Run "Reverse Payment" process (should be previously enabled: http://wiki.openbravo.com/wiki/Projects:Reversepayment/User_Manual [^]), access reversed payment created and post it. Realize that accounting entry is not reverting effect of previous entry
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0094835)
AtulOpenbravo (developer)
2017-03-08 14:41

Test Plan

1. Register Sales Invoice for any org and bp. Set invoice date in November and payment term=30 days. Add any line and process. Post invoice
2. Create Doubtful Debt Run for same org, bp, today's date and days overdue=30. Run "select doubtful debt" and select previous invoice. Process document
3. Access Doubtful Debt window and post document
4. Access previous Sales Invoice and run "Add payment" process to completely pay invoice. Post created payment and realize that accounting entry is the expected one, according with: http://wiki.openbravo.com/wiki/Doubtful_Debt [^] [^]
5. Run "Reverse Payment" process (should be previously enabled: http://wiki.openbravo.com/wiki/Projects:Reversepayment/User_Manual [^] [^]), access reversed payment created and post it. Check that accounting entry is reverting effect of previous entry

Tested above flow when

1. Payment In Posting enabled - Payment Method in Financial Account has "Upon Receipt Use" configuration set as "In Transit Payment Account"

2. Payment In Posting disabled - Payment Method in Financial Account has "Upon Receipt Use" configuration set as blank and "Upon Deposit Use Account" set as "Deposited Payment Account". In this case testing is done by posting related Financial Account Transaction.
(0095032)
psanjuan (manager)
2017-03-15 13:48
edited on: 2017-03-16 12:29

Issue verified as described below:

As system admin go to windows, tabs and fields and display "Reverse Payment" field. Compile the window as explained here: http://wiki.openbravo.com/wiki/Projects:Reversepayment/User_Manual [^]

Go to Doubtful Deb Method and create a new one with below setup:

Days Overdue = 30

In F&B España. Go to Business Partner Category and make sure you configure below accounts for the two general ledgers:

Doubtful Debt Account
Bad Debt Expense
Bad Debt Revenue
Allowance for doubtful debt account

Go to business partner and create a new one for F&B España, named for instance "Cliente Dudoso Cobro". Make sure you enter 30 days payment terms, and Transferecia payment method.

Go to Financial Account Cuenta de Banco and make sure that Transferencia payment method is configured to account in Upon Receipt Use (In Transit payment account), and Automatic Withdrawal = No.

Go to Sales Invoice window and create a new one for the new bp, dated on 22-11-2016, enter any product. Complete and post the invoice.

Below posting is shown:
901.45 (43000) Account Receivables DEBIT
750.00 (70000) Product Revenue CREDIT
156.45 (47000) Sales VAT CREDIT

Go to Doutbful Debt Run and create a new one by selecting doutful deb method just created. Press Select Doubtful Debt and select the invoice just created.
Press Done and process.

Go to Doubtful Debt window, select the record just created and post it.Check that below posting is shown:

901.45 (43600) Doubtful Debt DEBIT
901.45 (43000) Accounts Receivable CREDIT
901.45 (65000) Bad debt Expense Account DEBIT
901.45 (62500) Allowance for doubtful debt account CREDIT

Go to the sales invoice dated on November 2016 and fully pay it, dated on current's date. Process the payment, do not deposit it.

Go to payment in window and post the payment. Verify below posting is shown:

901.45 (55500) Payment In Account DEBIT
901.45 (43600) Doubtful Debt CREDIT
901.45 (62500) Allowance for doubtful debt account DEBIT
901.45 (79549) Bad Debt Revenue CREDIT

Go to the payment in created and reverse it. Verify below posting is shown for the reverse payment created, which is NOT correct as it does not reverse doubtful debt.

901.45 (62500) Allowance for doubtful debt account DEBIT
901.45 (79549) Bad Debt Revenue CREDIT


901.45 (43600) Doubtful Debt DEBIT
901.45 (55500) Payment In Account DEBIT
1802.90 (43000) Accounts Receivable CREDIT

(0095033)
psanjuan (manager)
2017-03-15 13:55
edited on: 2017-03-16 15:38

Test case 1 - Doubtful Debt sales invoice fully paid. Payment in posting.

Go to Sales Invoice window and create a new one for the new bp, dated on 23-11-2016, enter any product. Complete and post the invoice.

Below posting is shown:
209.81 (43000) Account Receivables DEBIT
173.40 (70000) Product Revenue CREDIT
36.41 (47000) Sales VAT CREDIT

Go to Doutbful Debt Run and create a new one by selecting doutful deb method just created. Press Select Doubtful Debt and select the invoice just created.
Press Done and process.

Go to Doubtful Debt window, select the record just created and post it. Check that below posting is shown:

209.81 (43600) Doubtful Debt DEBIT
209.81 (43000) Accounts Receivable CREDIT

209.81 (65000) Bad debt Expense Account DEBIT
209.81 (62500) Allowance for doubtful debt account CREDIT

Go to the sales invoice dated on November 2016 and fully pay it, dated on current's date. Process the payment, do not deposit it.

Go to payment in window and post the payment. Verify below posting is shown:

209.81 (55500) Payment In Account DEBIT
209.81 (43600) Doubtful Debt CREDIT

209.81 (62500) Allowance for doubtful debt account DEBIT
209.81 (79549) Bad Debt Revenue CREDIT

Go to the payment in created and reverse it. Verify below posting is shown for the reverse payment created, which is correct.

209.81 (43600) Doubtful Debt DEBIT
209.81 (55500) Payment In Account CREDIT

209.81 (79549) Bad Debt Revenue DEBIT
209.81 (62500) Allowance for doubtful debt account CREDIT

Test Case 2 - Doubtful Debt sales invoice fully paid. FA transaction posting.

Repeat same test case as above but posting the financial account transaction once reverse payment has been deposited.

Transaction posting is:

209.81 (57200) Payment In Account DEBIT
209.81 (43600) Doubtful Debt CREDIT

209.81 (62500) Allowance for doubtful debt account DEBIT
209.81 (79549) Bad Debt Revenue CREDIT

Reverse payment transaction posting is:

209.81 (43600) Doubtful Debt DEBIT
209.81 (57200) Payment In Account CREDIT

209.81 (79549) Bad Debt Revenue DEBIT
209.81 (62500) Allowance for doubtful debt account CREDIT

(0095321)
psanjuan (manager)
2017-03-16 13:42
edited on: 2017-03-16 15:44

Test case 3 - Doubtfull Debt sales invoice partially paid. Payment in posting.

Go to Sales Invoice window and create a new one for the new bp, dated on 27-11-2016, enter any product. Complete and post the invoice.

Below posting is shown:
180.29 (43000) Account Receivables DEBIT
149.00(70000) Product Revenue CREDIT
31.29 (47000) Sales VAT CREDIT

Go to Doutbful Debt Run and create a new one by selecting doutful deb method just created. Press Select Doubtful Debt and select the invoice just created.
Press Done and process.

Go to Doubtful Debt window, select the record just created and post it. Check that below posting is shown:

180.29 (43600) Doubtful Debt DEBIT
180.29 (43000) Accounts Receivable CREDIT

180.29 (65000) Bad debt Expense Account DEBIT
180.29 (62500) Allowance for doubtful debt account CREDIT

Go to the sales invoice dated on November 2016 and pay 100.00, dated on current's date. Process the payment, do not deposit it.

Go to payment in window and post the payment. Verify below posting is shown:

100.00 (55500) Payment In Account DEBIT
100.00 (43600) Doubtful Debt CREDIT

100.00 (62500) Allowance for doubtful debt account DEBIT
100.00 (79549) Bad Debt Revenue CREDIT

Go to the payment in created and reverse it. Verify below posting is shown for the reverse payment created, which is correct.

100.00 (43600) Doubtful Debt DEBIT
100.00 (55500) Payment In Account CREDIT

100.00 (79549) Bad Debt Revenue DEBIT
100.00 (62500) Allowance for doubtful debt account CREDIT

Test Case 4 - Doubtfull Debt sales invoice partially paid. FA transaction posting.

Repeat same test case as above but posting the financial account transaction once reverse payment has been deposited.

Transaction posting is:

100.00 (57200) Payment In Account DEBIT
100.00 (43600) Doubtful Debt CREDIT

100.00 (62500) Allowance for doubtful debt account DEBIT
100.00 (79549) Bad Debt Revenue CREDIT

Reverse payment transaction posting is:

100.00 (43600) Doubtful Debt DEBIT
100.00 (57200) Payment In Account CREDIT

100.00 (79549) Bad Debt Revenue DEBIT
100.00 (62500) Allowance for doubtful debt account CREDIT

(0095327)
psanjuan (manager)
2017-03-16 15:54
edited on: 2017-03-16 16:00

Test Case 5 - Sales Invoice fully paid and payment reversed.

Go to Sales Invoice window and create a new invoice for Alimentos y Supermercados business partner. Pay it.

Go to payment in window and post the payment. Reverse that payment. Post reversed payment and check that payment accounting entries are reversed.

Test Case 6 - Sales Invoice partially paid and payment reversed.

Go to Sales Invoice window and create a new invoice for Alimentos y Supermercados business partner. Pay it partially.

Go to payment in window and post the payment. Reverse that payment. Post reversed payment and check that payment accounting entries are reversed.

(0095328)
psanjuan (manager)
2017-03-16 16:01

Test plan above verified.

Issue can be code reviewed and closed.
(0095342)
hgbot (developer)
2017-03-16 19:47

Repository: erp/devel/pi
Changeset: 32d462335fc9fe926a69325edfbcdadfcdce38fe
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Mar 08 19:17:53 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/32d462335fc9fe926a69325edfbcdadfcdce38fe [^]

Fixes Issue 35029:Wrong Reverse Payment accounting
entry when referring an invoice declared as doubtful debt

When payment is reversed the doubtfuldebtamount is not set in the
fin payment schedule detail being created for reversed payment.
Now it is correctly set as negative value of doubtfuldebt
amount of the fin payment schedule detail of the payment being
reversed.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0095343)
markmm82 (developer)
2017-03-16 19:47

Code review + Testing OK
(0095350)
hudsonbot (developer)
2017-03-17 02:25

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

- Issue History
Date Modified Username Field Change
2017-01-23 10:55 maite New Issue
2017-01-23 10:55 maite Assigned To => Triage Finance
2017-01-23 10:55 maite Modules => Advanced Payables and Receivables Mngmt
2017-01-23 10:55 maite Triggers an Emergency Pack => No
2017-01-23 10:55 maite Issue Monitored: networkb
2017-01-23 10:56 maite Resolution time => 1486940400
2017-01-24 15:42 markmm82 Assigned To Triage Finance => collazoandy4
2017-01-31 15:05 markmm82 Assigned To collazoandy4 => Sanjota
2017-02-06 13:42 Sanjota Status new => scheduled
2017-02-23 16:41 markmm82 Assigned To Sanjota => AtulOpenbravo
2017-03-08 14:41 AtulOpenbravo Note Added: 0094835
2017-03-15 13:48 psanjuan Note Added: 0095032
2017-03-15 13:55 psanjuan Note Added: 0095033
2017-03-15 14:01 psanjuan Note Edited: 0095033 View Revisions
2017-03-15 14:02 psanjuan Note Edited: 0095033 View Revisions
2017-03-15 14:04 psanjuan Note Edited: 0095033 View Revisions
2017-03-15 14:04 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:23 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:26 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:27 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:27 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:29 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 12:29 psanjuan Note Edited: 0095032 View Revisions
2017-03-16 12:29 psanjuan Note Edited: 0095032 View Revisions
2017-03-16 13:14 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:15 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:25 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:26 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:27 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:39 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:41 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 13:42 psanjuan Note Added: 0095321
2017-03-16 15:38 psanjuan Note Edited: 0095033 View Revisions
2017-03-16 15:44 psanjuan Note Edited: 0095321 View Revisions
2017-03-16 15:54 psanjuan Note Added: 0095327
2017-03-16 16:00 psanjuan Note Edited: 0095327 View Revisions
2017-03-16 16:01 psanjuan Note Added: 0095328
2017-03-16 19:47 hgbot Checkin
2017-03-16 19:47 hgbot Note Added: 0095342
2017-03-16 19:47 hgbot Status scheduled => resolved
2017-03-16 19:47 hgbot Resolution open => fixed
2017-03-16 19:47 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/32d462335fc9fe926a69325edfbcdadfcdce38fe [^]
2017-03-16 19:47 markmm82 Review Assigned To => markmm82
2017-03-16 19:47 markmm82 Note Added: 0095343
2017-03-16 19:47 markmm82 Status resolved => closed
2017-03-16 19:47 markmm82 Fixed in Version => 3.0PR17Q2
2017-03-17 02:25 hudsonbot Checkin
2017-03-17 02:25 hudsonbot Note Added: 0095350


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker