[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3102] trunk/sql/modules/Reconciliation.sql
- Subject: SF.net SVN: ledger-smb:[3102] trunk/sql/modules/Reconciliation.sql
- From: ..hidden..
- Date: Tue, 19 Oct 2010 17:36:16 +0000
Revision: 3102
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3102&view=rev
Author: aurynn_cmd
Date: 2010-10-19 17:36:16 +0000 (Tue, 19 Oct 2010)
Log Message:
-----------
Fixing to use a coalesce for acc trans instead of the case statement, in Reconcilliation, pending_transactions
Modified Paths:
--------------
trunk/sql/modules/Reconciliation.sql
Modified: trunk/sql/modules/Reconciliation.sql
===================================================================
--- trunk/sql/modules/Reconciliation.sql 2010-10-18 23:40:49 UTC (rev 3101)
+++ trunk/sql/modules/Reconciliation.sql 2010-10-19 17:36:16 UTC (rev 3102)
@@ -336,7 +336,10 @@
BEGIN
INSERT INTO cr_report_line (report_id, scn, their_balance,
our_balance, "user", voucher_id, ledger_id, post_date)
- SELECT in_report_id, case when gl.table = 'gl' then gl.ref else ac.source end, 0, sum(amount) * -1 AS amount,
+ SELECT in_report_id,
+ COALESCE(ac.source, gl.ref),
+ 0,
+ sum(amount) * -1 AS amount,
(select entity_id from users
where username = CURRENT_USER),
ac.voucher_id, min(ac.entry_id), ac.transdate
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.