Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2010-10-11 13:102010-12-09 16:06
ReportersureshbabuView Statuspublic 
Assigned Tomirurita 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision91f1797633de
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50SCM revision 
Review Assigned To
Web browser
ModulesAdvanced Payables and Receivables Mngmt
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0014851: Deposit document generted with wrong payment amount (not sure, please go through the steps to reproduce this issue)

DescriptionSystem generates Deposit document with wrong payment amount as 348.80, when payment document is generated with below details
Amount : 500 euros
used credit : 10 euros
write off amount : 151.20 euros

For an invoice with amount: 661.20
Steps To ReproducePrecondition: make available credit of 10 euros for Business partner: Red Bunny

1) create and complete a sales invoice for Bp: Red bunny for Invoice amount: 661.20

43000 (Dr) 661.20
70000 (Cr) 661.20

2) Create payment document using payment method having Automatic receipt: unchecked and automatic deposit: Checked. with below details

In header tab enter Amount:500, then click "Add payment details" button

In Add payment window,

Use Available credit: Check
And also select the above invoice details,

3) There will be difference of 151.20 euros, make it as write off amount by selecting "Write off" option and click "Process" button. payment document will get generated successfully. and click post button to post the Journal entries.

69400 (Dr) 151.20
43700 (Dr) 10.00
55500 (Dr) 500.00
43000 (Cr) 661.20

4) Once the payment is completed, a deposit document is generated automatically and navigate to Financial account || transactions tab to check the system generated deposit document details

Error: System wrongly generates deposit amount with amount 348.80 instead of 500 euros.

but when i post the document, i am getting the below journal entries

90400 (Dr) 151.20
57200 (Dr) 348.80
55500 (Cr) 500.00

TagsNo tags attached.
Attached Filespatch file icon 14851.patch [^] (1,894 bytes) 2010-10-13 07:14 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
eintelau (developer)
2010-10-13 06:53

I can confirm that the issue exists in our environment as well. We can reproduce without needing the credit component. i.e. just doing a deposit for less than the expected amount and writing off the difference.

The cause of the issue appears to be lines 107 to 113 in the TransactionsDao class. The transaction sets its deposit/payment amount equal to the amount of the associated FIN_Payment minus the writeoff amount the FIN_Payment. The problem is that the FIN_Payment.Amount value does not include the writeoff amount, so the transaction amount ends up being incorrect.

e.g. This is what should happen
Original Invoice = 1000
Receive Payment of 900 and write off 100
Invoice is marked as fully paid, Payment has amount=900, writoff =100
Deposit transaction is generated for 900 (the amount received)

What actually happens is that the deposit transaction is generated for 900 - 100 = 800.. less than the amount received. This leads to an unbalanced journal and an entry in the suspence balance account.
eintelau (developer)
2010-10-13 07:15

I've attached a patch that fixes the problem in our environment
hgbot (developer)
2010-10-13 17:54

Repository: erp/pmods/org.openbravo.advpaymentmngt
Changeset: 91f1797633def34673c1976c7326533132c1e049
Author: Mikel Irurita <mikel.irurita <at>>
Date: Wed Oct 13 17:54:25 2010 +0200
URL: [^]

Fixes issue 14851: Deposit document generted with wrong payment amount

M src/org/openbravo/advpaymentmngt/dao/
sureshbabu (reporter)
2010-10-14 09:16


- Issue History
Date Modified Username Field Change
2010-10-11 13:10 sureshbabu New Issue
2010-10-11 13:10 sureshbabu Assigned To => mirurita
2010-10-13 06:44 eintelau Issue Monitored: eintelau
2010-10-13 06:53 eintelau Note Added: 0031787
2010-10-13 07:14 eintelau File Added: 14851.patch
2010-10-13 07:15 eintelau Note Added: 0031788
2010-10-13 17:53 mirurita Status new => scheduled
2010-10-13 17:53 mirurita fix_in_branch => pi
2010-10-13 17:54 hgbot Checkin
2010-10-13 17:54 hgbot Note Added: 0031824
2010-10-13 17:54 hgbot Status scheduled => resolved
2010-10-13 17:54 hgbot Resolution open => fixed
2010-10-13 17:54 hgbot Fixed in SCM revision => [^]
2010-10-14 09:16 sureshbabu Note Added: 0031844
2010-10-14 09:16 sureshbabu Status resolved => closed
2010-12-09 16:06 anonymous sf_bug_id 0 => 3133510

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker