Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014564Openbravo ERP09. Financial managementpublic2010-09-15 10:342010-10-30 11:24
networkb 
sivaraman 
urgentmajoralways
closedfixed 
5
2.50MP20 
2.50MP23 
Core
No
0014564: Writeoff accounting error in settlements
When canceling a debtpayment via settlemenet, the Write-off account of bussines partner is not taking into account.
1. Master Data Management || Business Partner Setup || Business Partner Category || Business Partner Category : search for Vendor and modify its Accounting tab to set writeoff account= 69300
2. check Financial Management || Accounting || Setup || Accounting Schema || Accounting Schema >> Defaults writeoff account: for explample 69400
3. make an invoice to bussines partner McGiver and post it
4. make a settelment: Financial Management || Receivables & Payables || Transactions || Settlement || Settlement
by clicking "Create Lines from" and selecting previuos invoice. Fill "canceled" cell with the total amount of the invoice
5. process settlement
6. post it. Now, the general ledger entry is 430 to 69400 instead of 430 to 69300. It continue using defaults values instead of BP values
No tags attached.
Issue History
2010-09-15 10:34networkbNew Issue
2010-09-15 10:34networkbAssigned To => dalsasua
2010-09-30 12:51adrianromeroNote Added: 0031513
2010-09-30 12:51adrianromeroStatusnew => feedback
2010-09-30 13:14adrianromeroAssigned Todalsasua => adrianromero
2010-10-07 09:18networkbStatusfeedback => new
2010-10-07 09:18networkbSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1016#r1016
2010-10-14 10:48networkbSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1052#r1052
2010-10-19 14:34sivaramanAssigned Toadrianromero => sivaraman
2010-10-19 14:40hgbotCheckin
2010-10-19 14:40hgbotNote Added: 0031977
2010-10-19 14:40hgbotStatusnew => resolved
2010-10-19 14:40hgbotResolutionopen => fixed
2010-10-19 14:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bc42f5aa4e930dfc6f96a23820e70455c2571463 [^]
2010-10-19 14:57sivaramanNote Added: 0031979
2010-10-20 04:39hudsonbotCheckin
2010-10-20 04:39hudsonbotNote Added: 0031995
2010-10-20 23:07hudsonbotCheckin
2010-10-20 23:07hudsonbotNote Added: 0032029
2010-10-22 07:12sureshbabuNote Added: 0032091
2010-10-22 07:12sureshbabuStatusresolved => closed
2010-10-30 11:24anonymoussf_bug_id0 => 3098731

Notes
(0031513)
adrianromero   
2010-09-30 12:51   
Hello

Steps to reproduce are not very clear.For example write off account in what accounting tab is defined?

Please rewrite the steps to reproduce more specific and detailed.

Thanks
(0031977)
hgbot   
2010-10-19 14:40   
Repository: erp/devel/pi
Changeset: bc42f5aa4e930dfc6f96a23820e70455c2571463
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Tue Oct 19 18:09:39 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/bc42f5aa4e930dfc6f96a23820e70455c2571463 [^]

Fixes issue 14564: Writeoff accounting error in settlements

Root cause:
It can be found AcctServer.ACCTTYPE_WriteOffDefault account type that was used earlier in DocPayment.java. That's why it was always taking the write off line at accounting schema level.

Solution:
Simply changing the account type from ACCTTYPE_WriteOffDefault to ACCTTYPE_WriteOff in WRITEOFF calculation would not work as C_BPartner_ID in AcctServer is nowhere populated with value (Please note, C_BPartner_ID is used in AcctServer.getAccount method). Therefore, the code has been modified in order to directly create Account object rather than calling getAccount method. This will resolve the issue as per the expected behaviour without any impacts.

---
M src/org/openbravo/erpCommon/ad_forms/DocPayment.java
---
(0031979)
sivaraman   
2010-10-19 14:57   
Steps to test:

1. Log on to Openbravo with Admin role
2. Go to Master Data Management || Business Partner Setup || Business Partner Category || Business Partner Category
3. Search for Vendor and modify its Accounting tab to set writeoff account = 69300
4. Go to Financial Management || Accounting || Setup || Accounting Schema || Accounting Schema >> Defaults
5. Verify writeoff account: for example 69400
6. Make an invoice to business partner McGiver and post it
7. Go to Financial Management || Receivables & Payables || Transactions || Settlement
8. Make a settlement by clicking "Create Lines from" and selecting previous invoice. Fill "canceled" cell with the total amount of the invoice
9. Process settlement and post it
10. Verify if general ledger entry is 43000 to 69300

also verify the following

11. Go to Master Data Management || Business Partner Setup || Business Partner Category || Business Partner Category
12. Search for Vendor and delete its Accounting record
13. Follow the steps 5 to 9
14. Verify if general ledger entry is 43000 to 69400
(0031995)
hudsonbot   
2010-10-20 04:39   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/bc42f5aa4e93 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/505b7225d671 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18565.obx [^]
(0032029)
hudsonbot   
2010-10-20 23:07   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/bc42f5aa4e93 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/505b7225d671 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18576.obx [^]
(0032091)
sureshbabu   
2010-10-22 07:12   
verified in oracle context(pi)