[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2985] addons/1.3/assets/trunk/sql/modules/Assets. sql
- Subject: SF.net SVN: ledger-smb:[2985] addons/1.3/assets/trunk/sql/modules/Assets. sql
- From: ..hidden..
- Date: Tue, 13 Apr 2010 22:07:46 +0000
Revision: 2985
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2985&view=rev
Author: einhverfr
Date: 2010-04-13 22:07:46 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
Minor typos in nbv functions fixed
Modified Paths:
--------------
addons/1.3/assets/trunk/sql/modules/Assets.sql
Modified: addons/1.3/assets/trunk/sql/modules/Assets.sql
===================================================================
--- addons/1.3/assets/trunk/sql/modules/Assets.sql 2010-04-13 22:04:24 UTC (rev 2984)
+++ addons/1.3/assets/trunk/sql/modules/Assets.sql 2010-04-13 22:07:46 UTC (rev 2985)
@@ -512,7 +512,7 @@
returns setof asset_nbv_line AS
$$
SELECT ai.id, ai.tag, ai.description, coalesce(ai.start_depreciation, ai.purchase_date),
- adm.short_label, ai.usable_life
+ adm.short_name, ai.usable_life
- months_passed(coalesce(ai.start_depreciation, ai.purchase_date),
coalesce(max(r.report_date),
ai.start_depreciation,
@@ -525,11 +525,11 @@
ai.purchase_date))/ 12)/ai.usable_life) * 100
FROM asset_item ai
JOIN asset_class ac ON (ai.asset_class_id = ac.id)
- JOIN asset_dep_method adm ON (adm.id = ac.dep_method)
+ JOIN asset_dep_method adm ON (adm.id = ac.method)
LEFT JOIN asset_report_line rl ON (ai.id = rl.asset_id)
LEFT JOIN asset_report r on (rl.report_id = r.id)
GROUP BY ai.id, ai.tag, ai.description, ai.start_depreciation, ai.purchase_date,
- adm.short_label, ai.usable_life, ai.purchase_value
+ adm.short_name, ai.usable_life, ai.purchase_value, salvage_value
HAVING NOT 2 = ANY(as_array(r.report_class)) AND NOT 4 = ANY(as_array(r.report_class))
ORDER BY ai.id, ai.tag, ai.description;
$$ language sql;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.