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

SF.net SVN: ledger-smb:[3651] trunk/LedgerSMB/RP.pm



Revision: 3651
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3651&view=rev
Author:   einhverfr
Date:     2011-08-09 23:17:32 +0000 (Tue, 09 Aug 2011)

Log Message:
-----------
Comment on the trial balance fix for ignoring last yearend

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

Modified: trunk/LedgerSMB/RP.pm
===================================================================
--- trunk/LedgerSMB/RP.pm	2011-08-09 23:12:43 UTC (rev 3650)
+++ trunk/LedgerSMB/RP.pm	2011-08-09 23:17:32 UTC (rev 3651)
@@ -1461,6 +1461,10 @@
         }
         if ($year_end ne 'none'){
              if ($year_end eq 'last'){
+                   # CT:  The coalesce below uses magic values but this should
+                   # be safe because all automatically assigned transactions 
+                   # should be positive integers.  In the long run though this
+                   # is being moved into stored procedures.
                   $yearend_filter = "AND (ac.transdate < coalesce($datefrom, ac.transdate)  OR 
 			ac.trans_id <> (select coalesce(max(trans_id), -1000) FROM yearend WHERE transdate <= coalesce($dateto, 'infinity'::timestamp)))";
              } elsif ($year_end eq 'all'){


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