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

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



Revision: 5851
          http://sourceforge.net/p/ledger-smb/code/5851
Author:   einhverfr
Date:     2013-05-21 12:15:14 +0000 (Tue, 21 May 2013)
Log Message:
-----------
Skeleton of perl class for balance sheet

Modified Paths:
--------------
    trunk/sql/modules/Report.sql

Added Paths:
-----------
    trunk/LedgerSMB/Report/Balance_Sheet.pm

Added: trunk/LedgerSMB/Report/Balance_Sheet.pm
===================================================================
--- trunk/LedgerSMB/Report/Balance_Sheet.pm	                        (rev 0)
+++ trunk/LedgerSMB/Report/Balance_Sheet.pm	2013-05-21 12:15:14 UTC (rev 5851)
@@ -0,0 +1,98 @@
+=head1 NAME
+
+LedgerSMB::Report::Balance_Sheet - The LedgerSMB Balance Sheet Report
+
+=head1 SYNOPSIS
+
+ my $report = LedgerSMB::Report::Balance_Sheet->new(%$request);
+ $report->render($request);
+
+=head1 DESCRIPTION
+
+This report class defines the balance sheet functionality for LedgerSMB.   The
+primary work is done in the database procedures, while this module largely translates data structures for the report.
+
+=cut
+
+package LedgerSMB::Report::Balance_Sheet;
+use Moose;
+extends 'LedgerSMB::Report';
+with 'LedgerSMB::Report::Dates';
+
+=head1 CRITERIA PROPERTIES
+
+=over
+
+=item to_date LedgerSMB::PGDate
+
+=back
+
+=head1 INTERNAL PROPERTIES
+
+=head2 headings
+
+This stores the account headings for handling the hierarchy in a single hashref
+
+=cut
+
+has 'headings' => (is => 'rw', isa => 'HashRef[Any]', required => 0);
+
+=head1 STATIC METHODS
+
+=over
+
+=item columns
+
+Returns no columns since this is hardwired into the template
+
+=cut
+
+sub columns {
+    return [];
+};
+
+=item heading_lines
+
+Returns none since this is not applicable to this.
+
+=cut 
+
+sub heading_lines {
+    return [];
+}
+
+=item name
+
+Returns the localized string 'Balance Sheet'
+
+=cut
+
+sub name {
+    return LedgerSMB::Report::text('Balance Sheet');
+}
+
+=item template
+
+Returns 'Reports/balance_sheet'
+
+=cut
+
+sub templates {
+    return 'Reports/balance_sheet';
+}
+
+=back
+
+=head1 SEMI-PUBLIC METHODS
+
+=head2 run_report()
+
+=head1 COPYRIGHT
+
+COPYRIGHT (C) 2013 The LedgerSMB Core Team.  This file may be re-used under the
+terms of the LedgerSMB General Public License version 2 or at your option any
+later version.  Please see enclosed LICENSE file for details.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;

Modified: trunk/sql/modules/Report.sql
===================================================================
--- trunk/sql/modules/Report.sql	2013-05-21 09:37:28 UTC (rev 5850)
+++ trunk/sql/modules/Report.sql	2013-05-21 12:15:14 UTC (rev 5851)
@@ -569,7 +569,7 @@
     heading_path text[]
 );
 
-CREATE OR REPLACE FUNCTION report__balance_sheet(in_report_date date)
+CREATE OR REPLACE FUNCTION report__balance_sheet(in_to_date date)
 RETURNS SETOF balance_sheet_line LANGUAGE SQL AS
 $$
 WITH a_bs AS (

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