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

SF.net SVN: ledger-smb:[5212] trunk/sql/Pg-database.sql



Revision: 5212
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5212&view=rev
Author:   einhverfr
Date:     2012-11-19 09:35:48 +0000 (Mon, 19 Nov 2012)
Log Message:
-----------
Correcting sign of return values for cash impact view

Modified Paths:
--------------
    trunk/sql/Pg-database.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2012-11-19 09:32:45 UTC (rev 5211)
+++ trunk/sql/Pg-database.sql	2012-11-19 09:35:48 UTC (rev 5212)
@@ -4764,8 +4764,8 @@
 CREATE VIEW cash_impact AS
 SELECT id, '1'::numeric AS portion, 'gl' as rel FROM gl
 UNION ALL
-SELECT id, CASE WHEN (gl.amount - sum(ac.amount * -1)) = 0 THEN 0 
-                ELSE gl.amount / (gl.amount - sum(ac.amount * -1))
+SELECT id, CASE WHEN (gl.amount - sum(ac.amount)) = 0 THEN 0 
+                ELSE gl.amount / (gl.amount - sum(ac.amount))
                 END , 'ar' as rel
   FROM ar gl
   JOIN acc_trans ac ON ac.trans_id = gl.id

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