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

SF.net SVN: ledger-smb:[2550] trunk/LedgerSMB/IR.pm



Revision: 2550
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2550&view=rev
Author:   einhverfr
Date:     2009-04-13 05:03:26 +0000 (Mon, 13 Apr 2009)

Log Message:
-----------
Merging in closedto/cogs handling bugs

Modified Paths:
--------------
    trunk/LedgerSMB/IR.pm

Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm	2009-04-13 05:02:28 UTC (rev 2549)
+++ trunk/LedgerSMB/IR.pm	2009-04-13 05:03:26 UTC (rev 2550)
@@ -425,10 +425,10 @@
 				            invoice_id,
 				            transdate) 
 				     VALUES (?, ?, ?, ?,
-				            ?, (SELECT CASE WHEN ? > value::date
-				                            THEN ?
-				                            ELSE value::date +
+				            ?, (SELECT CASE WHEN ? <= value::date
+				                            THEN value::date +
 				                               '1 day'::interval
+				                            ELSE ?
 				                        END AS value 
 				                  FROM defaults
 				                  WHERE setting_key = 'closedto'
@@ -449,10 +449,10 @@
 				            project_id, invoice_id,
 				            transdate) 
 				     VALUES (?, ?, ?, ?,
-				            ?, (SELECT CASE WHEN ? > value::date
-				                            THEN ?
-				                            ELSE value::date +
+				            ?, (SELECT CASE WHEN ? <= value::date
+				                            THEN value::date +
 				                               '1 day'::interval
+				                            ELSE ?
 				                        END AS value 
 				                  FROM defaults
 				                  WHERE setting_key = 'closedto'


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