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

SF.net SVN: ledger-smb:[5087] trunk



Revision: 5087
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5087&view=rev
Author:   einhverfr
Date:     2012-08-03 07:40:25 +0000 (Fri, 03 Aug 2012)
Log Message:
-----------
Adding account lists for reports

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/reports.pm
    trunk/sql/modules/Account.sql

Modified: trunk/LedgerSMB/Scripts/reports.pm
===================================================================
--- trunk/LedgerSMB/Scripts/reports.pm	2012-08-03 06:50:39 UTC (rev 5086)
+++ trunk/LedgerSMB/Scripts/reports.pm	2012-08-03 07:40:25 UTC (rev 5087)
@@ -64,6 +64,10 @@
     @{$request->{entity_classes}} = $request->call_procedure(
                       procname => 'entity__list_classes'
     );
+    @{$request->{heading_list}} =  $request->call_procedure(
+                      procname => 'account_heading_list');
+    @{$request->{account_list}} =  $request->call_procedure(
+                      procname => 'account__list_by_heading');
     @{$request->{batch_classes}} = $request->call_procedure(
                       procname => 'batch_list_classes'
     );

Modified: trunk/sql/modules/Account.sql
===================================================================
--- trunk/sql/modules/Account.sql	2012-08-03 06:50:39 UTC (rev 5086)
+++ trunk/sql/modules/Account.sql	2012-08-03 07:40:25 UTC (rev 5087)
@@ -183,6 +183,11 @@
 SELECT * FROM account_heading order by accno;
 $$ language sql;
 
+CREATE OR REPLACE FUNCTION account__list_by_heading()
+RETURNS SETOF account AS $$
+SELECT * FROM account ORDER BY heading;
+$$ LANGUAGE SQL;
+
 COMMENT ON FUNCTION account_heading_list() IS
 $$ Lists all existing account headings.$$;
 

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