[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2946] addons/1.3/assets/trunk/sql/modules/Assets. sql



Revision: 2946
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2946&view=rev
Author:   einhverfr
Date:     2010-03-03 19:31:25 +0000 (Wed, 03 Mar 2010)

Log Message:
-----------
Correcting one error in disposal approval functions

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-03-03 19:28:24 UTC (rev 2945)
+++ addons/1.3/assets/trunk/sql/modules/Assets.sql	2010-03-03 19:31:25 UTC (rev 2946)
@@ -564,14 +564,14 @@
     FROM asset_report 
     JOIN asset_report_line ON (asset_report.id = asset_report_line.report_id)
     JOIN asset_item        ON (asset_report_line.asset_id = asset_item.id)
-   WHERE asset_report.id = in_id
+   WHERE asset_report.id = $1
 GROUP BY asset_report.id, asset_report.report_date;
 
   INSERT
     INTO acc_trans (chart_id, trans_id, amount, approved, transdate)
   SELECT a.dep_account_id, currval('id')::int, sum(r.accum_depreciation),
          TRUE, r.disposed_on
-    FROM get_disposal_report(in_id) r
+    FROM get_disposal_report($1) r
     JOIN asset_item ai ON (r.id = ai.id)
 GROUP BY a.dep_account_id, r.disposed_on;
 
@@ -580,7 +580,7 @@
   SELECT case when sum(r.gain_loss) > 0 THEN $2 else $3 end,
          currval('id')::int, sum(r.gain_loss) * -1,
          TRUE, r.disposed_on
-    FROM get_disposal_report(in_id) r
+    FROM get_disposal_report($1) r
     JOIN asset_item ai ON (r.id = ai.id)
 GROUP BY r.disposed_on;
 
@@ -588,7 +588,7 @@
     INTO acc_trans (chart_id, trans_id, amount, approved, transdate)
   SELECT a.asset_account_id, currval('id')::int, sum(r.purchase_value),
          TRUE, r.disposed_on
-    FROM get_disposal_report(in_id) r
+    FROM get_disposal_report($1) r
     JOIN asset_item ai ON (r.id = ai.id)
 GROUP BY a.asset_account_id, r.disposed_on;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.