[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2949] addons/1.3/enhanced_tb/trunk/sql/modules/ trial_balance.sql
- Subject: SF.net SVN: ledger-smb:[2949] addons/1.3/enhanced_tb/trunk/sql/modules/ trial_balance.sql
- From: ..hidden..
- Date: Fri, 05 Mar 2010 17:33:33 +0000
Revision: 2949
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2949&view=rev
Author: einhverfr
Date: 2010-03-05 17:33:13 +0000 (Fri, 05 Mar 2010)
Log Message:
-----------
Adding a few comments to hand off to other developers
Modified Paths:
--------------
addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql
Modified: addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql
===================================================================
--- addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql 2010-03-03 20:27:43 UTC (rev 2948)
+++ addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql 2010-03-05 17:33:13 UTC (rev 2949)
@@ -17,17 +17,21 @@
t_checkpoint_date date;
include_trans int;
BEGIN
+ --in_ignore_yearend can be 'none', 'all', and 'last'
if (in_ignore_yearend = 'last') then
select trans_id into include_trans FROM yearend
WHERE transdate < in_date_to and transdate > in_date_from
order by transdate desc limit 1;
end if;
+
+ -- setup checkpoint stuff since can't do this in the from clause so well
SELECT end_date INTO t_checkpoint_date
FROM account_checkpoint
WHERE end_date <= in_date_from
ORDER BY end_date desc LIMIT 1;
FOR out_row IN
+ -- main trial balance query
SELECT a.id, a.accno, a.description,
(SUM(CASE WHEN ac.transdate < in_date_from
THEN ac.amount
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.