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

SF.net SVN: ledger-smb:[3092] addons/1.3/enhanced_tb/trunk



Revision: 3092
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3092&view=rev
Author:   einhverfr
Date:     2010-10-06 05:05:20 +0000 (Wed, 06 Oct 2010)

Log Message:
-----------

* Numbers now rounded to system configured precision for money
* Chart of accounts now sorted
* Still no real per department trial balance support
* One bug remains in that it seems to be picking up on two post-dated unapproved vouchers, and unsure why.

Modified Paths:
--------------
    addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl
    addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql

Modified: addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl
===================================================================
--- addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl	2010-10-05 22:13:56 UTC (rev 3091)
+++ addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl	2010-10-06 05:05:20 UTC (rev 3092)
@@ -279,13 +279,15 @@
         $acc->{debits} = $request->format_amount(
             {   
                 amount=>$acc->{debits}, 
-                format=>'1,000.00'
+                format=>'1,000.00',
+                money => 1
             }
         );
         $acc->{credits} = $request->format_amount(
             {
                 amount=> $acc->{credits}, 
-                format=>'1,000.00' 
+                format=>'1,000.00',
+                money => 1
             }
         );
         $acc->{starting_balance} = $request->format_amount({amount=> $acc->{starting_balance}, format=>'1,000.00' });

Modified: addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql
===================================================================
--- addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql	2010-10-05 22:13:56 UTC (rev 3091)
+++ addons/1.3/enhanced_tb/trunk/sql/modules/trial_balance.sql	2010-10-06 05:05:20 UTC (rev 3092)
@@ -39,13 +39,13 @@
     
     -- don't bother with checking from/to dates for NULL below.
     IF i_date_from IS NULL THEN
-     SELECT INTO date_from '1900-01-01';
+     SELECT min(transdate) - '1 day'::interval INTO date_from from acc_trans;
     ELSE
      date_from = i_date_from;
     END IF;          
     
     IF i_date_to IS NULL THEN
-     SELECT INTO date_to current_date + 1;
+     SELECT max(transdate) + '1 day'::interval INTO date_to from acc_trans;
     ELSE
      date_to = i_date_to;
     END IF;
@@ -188,6 +188,7 @@
 				 a.contra, a.category,cpa.end_date, cpb.end_date,
                  cpa.amount, cpb.amount, cpa.debits, cpb.debits,
                  cpa.credits, cpb.credits                                         
+          ORDER BY a.accno
 	LOOP
 	    -- if ignore_yearends is none - we are done. Otherwise we have to
 	    -- substract the value of yearend transactions for each account.


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