[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5854] trunk
- Subject: SF.net SVN: ledger-smb:[5854] trunk
- From: ..hidden..
- Date: Tue, 21 May 2013 14:51:20 +0000
Revision: 5854
http://sourceforge.net/p/ledger-smb/code/5854
Author: einhverfr
Date: 2013-05-21 14:51:19 +0000 (Tue, 21 May 2013)
Log Message:
-----------
New balance sheet logic runs without errors but does not display balance sheet yet. Still must fix
Modified Paths:
--------------
trunk/LedgerSMB/Report/Balance_Sheet.pm
trunk/LedgerSMB/Scripts/reports.pm
trunk/UI/Reports/balance_sheet.html
Modified: trunk/LedgerSMB/Report/Balance_Sheet.pm
===================================================================
--- trunk/LedgerSMB/Report/Balance_Sheet.pm 2013-05-21 14:34:47 UTC (rev 5853)
+++ trunk/LedgerSMB/Report/Balance_Sheet.pm 2013-05-21 14:51:19 UTC (rev 5854)
@@ -60,13 +60,13 @@
return [];
};
-=item heading_lines
+=item header_lines
Returns none since this is not applicable to this.
=cut
-sub heading_lines {
+sub header_lines {
return [];
}
@@ -88,7 +88,7 @@
=cut
-sub templates {
+sub template {
return 'Reports/balance_sheet';
}
@@ -126,9 +126,12 @@
push @{$sheet->{$cat}->{lines}}, $ref;
$sheet->{$cat}->{total} += $ref->{balance};
}
- $sheet->{ratios}->{AL} = $sheet->{A}->{total} / $sheet->{L}->{total};
- $sheet->{ratios}->{AQ} = $sheet->{A}->{total} / $sheet->{Q}->{total};
- $sheet->{ratios}->{QL} = $sheet->{Q}->{total} / $sheet->{L}->{total};
+ $sheet->{ratios}->{AL} = $sheet->{A}->{total} / $sheet->{L}->{total}
+ if $sheet->{L}->{total};
+ $sheet->{ratios}->{AQ} = $sheet->{A}->{total} / $sheet->{Q}->{total}
+ if $sheet->{Q}->{total};
+ $sheet->{ratios}->{QL} = $sheet->{Q}->{total} / $sheet->{L}->{total}
+ if $sheet->{L}->{total};
$self->headings($head);
$self->balance_sheet($sheet);
$self->rows([]);
Modified: trunk/LedgerSMB/Scripts/reports.pm
===================================================================
--- trunk/LedgerSMB/Scripts/reports.pm 2013-05-21 14:34:47 UTC (rev 5853)
+++ trunk/LedgerSMB/Scripts/reports.pm 2013-05-21 14:51:19 UTC (rev 5854)
@@ -17,6 +17,7 @@
use LedgerSMB::Template;
use LedgerSMB::Business_Unit;
use LedgerSMB::Business_Unit_Class;
+use LedgerSMB::Report::Balance_Sheet;
use LedgerSMB::Report::Listings::Business_Type;
use strict;
@@ -108,6 +109,18 @@
$report->render($request);
}
+=item balance_sheet
+
+Generates a balance sheet
+
+=cut
+
+sub balance_sheet {
+ my ($request) = @_;
+ my $report = LedgerSMB::Report::Balance_Sheet->new(%$request);
+ $report->render($request);
+}
+
=back
=head1 Copyright (C) 2007 The LedgerSMB Core Team
Modified: trunk/UI/Reports/balance_sheet.html
===================================================================
--- trunk/UI/Reports/balance_sheet.html 2013-05-21 14:34:47 UTC (rev 5853)
+++ trunk/UI/Reports/balance_sheet.html 2013-05-21 14:51:19 UTC (rev 5854)
@@ -1,7 +1,7 @@
-<?lsmb include 'ui-header.html' ?>
+<?lsmb INCLUDE 'ui-header.html' ?>
<body class="financial-statement balance-sheet">
<h1><?lsmb text('Balance Sheet') ?></h1>
-<h2><?lsmb text('Through date:') _ ' ' _ report/to_date ?></h2>
+<h2><?lsmb text('Through date:') _ ' ' _ report.to_date ?></h2>
<?lsmb # TODO: header hierarchy handling ?>
<table>
<tr class="section-head">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.