Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009867Openbravo ERP09. Financial managementpublic2009-07-13 18:232009-07-23 00:00
eduardo_Argal 
jayakumar 
highminoralways
closedfixed 
5
pi 
pi2.50MP3 
Core
No
0009867: Asset report; SQL wrongly writen
The SQL for this report is selecting the entry to show like this:

AND F.AMTACCTDR<>'0'

And should obtain the amount from the AcumDepreciation account. More entries could be there because of subsidied for example (se asset subsidy module) and we just want to show the accum ones.
See code
Arun, verify the reports works after the change

1. Go to Financial Management || Assets || Analysis Tools || Depreciation schedule || Depreciation schedule
Modify the SQL to obtain just FAct_Acct entryies from the AccumDepreciation account
250MP3releasecandidate, arun
Issue History
2009-07-13 18:23eduardo_ArgalNew Issue
2009-07-13 18:23eduardo_ArgalAssigned To => rajagopal
2009-07-14 09:51eduardo_ArgalStatusnew => scheduled
2009-07-14 09:51eduardo_Argalfix_in_branch => pi
2009-07-14 14:03sathiyanNote Added: 0018220
2009-07-14 16:51eduardo_ArgalNote Added: 0018224
2009-07-15 06:44jayakumarAssigned Torajagopal => jayakumar
2009-07-15 08:42jayakumarNote Added: 0018251
2009-07-15 08:43jayakumarNote Edited: 0018251
2009-07-15 08:46jayakumarNote Edited: 0018251
2009-07-15 13:12jayakumarNote Added: 0018255
2009-07-15 13:42hgbotCheckin
2009-07-15 13:42hgbotNote Added: 0018257
2009-07-15 13:42hgbotStatusscheduled => resolved
2009-07-15 13:42hgbotResolutionopen => fixed
2009-07-15 13:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/13e546b079f479ff72ded6fe04cd143c5d83e78d [^]
2009-07-21 16:24psarobeFixed in Version => 2.50MP3
2009-07-21 16:26psarobeTag Attached: 250MP3releasecandidate
2009-07-21 19:25psarobeTag Attached: arun
2009-07-21 20:00psarobefix_in_branchpi =>
2009-07-21 20:00psarobeProposed Solution updated
2009-07-22 07:05arunkumarStatusresolved => closed
2009-07-22 07:05arunkumarNote Added: 0018519
2009-07-23 00:00anonymoussf_bug_id0 => 2825615

Notes
(0018220)
sathiyan   
2009-07-14 14:03   
Edu: could you please confirm on the below action items.

Action 1:need to delete the condition as F.AMTACCTDR<>'0'

Action 2:a_asset_acct.a_accumdepreciation_acct = c_validcombination.c_validcombination_id and fact_acct.acct_id=c_validcombination.account_id (sort of condition need to be add) to filter AcumDepreciation account.

Regards
Sathiyan.
(0018224)
eduardo_Argal   
2009-07-14 16:51   
Yes. Thats the change. Do not forget to add c_validcombination as a table in the FROM of the select statement and test it.

Thanks
(0018251)
jayakumar   
2009-07-15 08:42   
(edited on: 2009-07-15 08:46)
currently we used fact_acct.amtacctdr. It wont return any value for the above newly added condition. if we use the column fact_acct.amtacctcr Instead of using the column fact_acct.amtacctdr, then we will get the expected result.

(0018255)
jayakumar   
2009-07-15 13:12   
As per Edu suggestion:fact_acct.amtacctcr field used in the select clause instead of fact_acct.amtacctdr.
(0018257)
hgbot   
2009-07-15 13:42   
Repository: erp/devel/pi
Changeset: 13e546b079f479ff72ded6fe04cd143c5d83e78d
Author: Jayakumar Kasinathan <jayakumar.kasinathan <at> openbravo.com>
Date: Wed Jul 15 17:09:32 2009 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/13e546b079f479ff72ded6fe04cd143c5d83e78d [^]

Fixes bug 9867 Asset report: SQL wrongly written

---
M src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule_data.xsql
---
(0018519)
arunkumar   
2009-07-22 07:05   
I went to Financial Management || Assets || Analysis Tools || Depreciation schedule || Asset report for depreciation schedule. I am able to verify the report in both HTML format and PDF format.