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

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



Revision: 5856
          http://sourceforge.net/p/ledger-smb/code/5856
Author:   einhverfr
Date:     2013-05-21 15:44:46 +0000 (Tue, 21 May 2013)
Log Message:
-----------
Balance sheet now displays fine, may need minor styling still

Modified Paths:
--------------
    trunk/LedgerSMB/Report/Balance_Sheet.pm
    trunk/UI/Reports/balance_sheet.html
    trunk/css/ledgersmb.css

Added Paths:
-----------
    trunk/UI/Reports/filters/balance_sheet.html

Modified: trunk/LedgerSMB/Report/Balance_Sheet.pm
===================================================================
--- trunk/LedgerSMB/Report/Balance_Sheet.pm	2013-05-21 14:57:30 UTC (rev 5855)
+++ trunk/LedgerSMB/Report/Balance_Sheet.pm	2013-05-21 15:44:46 UTC (rev 5856)
@@ -133,6 +133,7 @@
         if $sheet->{Q}->{total};
     $sheet->{ratios}->{QL} = $sheet->{Q}->{total} / $sheet->{L}->{total} 
         if $sheet->{L}->{total};
+    $sheet->{total_LQ} = $sheet->{L}->{total} + $sheet->{Q}->{total};
     $self->headings($head);
     $self->balance_sheet($sheet);
     $self->rows([]);

Modified: trunk/UI/Reports/balance_sheet.html
===================================================================
--- trunk/UI/Reports/balance_sheet.html	2013-05-21 14:57:30 UTC (rev 5855)
+++ trunk/UI/Reports/balance_sheet.html	2013-05-21 15:44:46 UTC (rev 5856)
@@ -1,5 +1,5 @@
-<?lsmb INCLUDE 'ui-header.html' ?>
-<body class="financial-statement balance-sheet">
+<?lsmb INCLUDE 'ui-header.html' stylesheet=request.stylesheet ?>
+<body class="financial-statement" id="balance-sheet">
 <h1><?lsmb text('Balance Sheet') ?></h1>
 <h2><?lsmb text('Through date:') _ ' ' _ report.to_date ?></h2>
 <?lsmb # TODO:  header hierarchy handling ?>
@@ -14,35 +14,38 @@
     <td class="amount"><?lsmb line.balance ?> </td>
 </tr>
 <?lsmb END ?>
-<tr><th><?lsmb text('Total Assets') ?></th>
-    <td><?lsmb report.balance_sheet.A.total ?></td>
+<tr class="total"><th><?lsmb text('Total Assets') ?></th>
+    <td class="amount"><?lsmb report.balance_sheet.A.total ?></td>
 </tr>
 <tr class="section-head">
    <th colspan="2"><?lsmb text('Liabilities') ?></th>
 </tr>
-<?lsmb FOREACH line IN report.balance_sheet.A.lines ?> 
+<?lsmb FOREACH line IN report.balance_sheet.L.lines ?> 
 <tr><th><a href="journal.pl?action=search&to_date=<?lsmb to_date 
        ?>&accno=account_number"
        ><?lsmb line.account_number _ ': ' _ line.account_description ?></a></th>
     <td class="amount"><?lsmb line.balance ?> </td>
 </tr>
 <?lsmb END ?>
-<tr><th><?lsmb text('Total Liabilities') ?></th>
-    <td><?lsmb report.balance_sheet.L.total ?></td>
+<tr class="total"><th><?lsmb text('Total Liabilities') ?></th>
+    <td class="amount"><?lsmb report.balance_sheet.L.total ?></td>
 </tr>
 <tr class="section-head">
    <th colspan="2"><?lsmb text('Equity') ?></th>
 </tr>
-<?lsmb FOREACH line IN report.balance_sheet.A.lines ?> 
+<?lsmb FOREACH line IN report.balance_sheet.Q.lines ?> 
 <tr><th><a href="journal.pl?action=search&to_date=<?lsmb to_date 
        ?>&accno=account_number"
        ><?lsmb line.account_number _ ': ' _ line.account_description ?></a></th>
     <td class="amount"><?lsmb line.balance ?> </td>
 </tr>
 <?lsmb END ?>
-<tr><th><?lsmb text('Total Equity') ?></th>
-    <td><?lsmb report.balance_sheet.Q.total ?></td>
+<tr class="total"><th><?lsmb text('Total Equity') ?></th>
+    <td class="amount"><?lsmb report.balance_sheet.Q.total ?></td>
 </tr>
+<tr class="total"><th><?lsmb text('Total Liabilities Plus Equity') ?></th>
+    <td class="amount"><?lsmb report.balance_sheet.total_LQ ?></td>
+</tr>
 </table>
 
 <h2>Key Ratios</h2>

Added: trunk/UI/Reports/filters/balance_sheet.html
===================================================================
--- trunk/UI/Reports/filters/balance_sheet.html	                        (rev 0)
+++ trunk/UI/Reports/filters/balance_sheet.html	2013-05-21 15:44:46 UTC (rev 5856)
@@ -0,0 +1,23 @@
+<?lsmb INCLUDE 'ui-header.html';
+       PROCESS 'elements.html'; ?>
+<body>
+<div class="listtop"><?lsmb text('Balance Sheet') ?></div>
+<form action="reports.pl" method="get">
+<?lsmb 
+PROCESS input element_data = {
+           label = text('Through date') #'
+            name = 'to_date'
+           value = to_date
+           class = 'date'
+            size = 12
+}; 
+PROCESS button element_data = {
+            text = text('Generate')
+            name = 'action'
+           value = 'balance_sheet'
+            type = 'submit'
+           class = 'submit'
+} ?>
+</form>
+</body>
+</html>

Modified: trunk/css/ledgersmb.css
===================================================================
--- trunk/css/ledgersmb.css	2013-05-21 14:57:30 UTC (rev 5855)
+++ trunk/css/ledgersmb.css	2013-05-21 15:44:46 UTC (rev 5856)
@@ -319,3 +319,37 @@
 span.indicator {
   border: 1px solid black; font-size: 10px; padding: 2px; background-color: #eee;
 }
+
+.financial-statement h1, .financial-statement h2 {
+   text-align: center;
+}   
+
+.financial-statement table {
+   margin-left: auto;
+   margin-right: auto;
+}
+
+.financial-statement td.amount{
+   text-align: right;
+   padding-left: 4em;
+}
+
+.financial-statement tr.total td, .financial-statement tr.total th {
+   padding-bottom: 2em;
+}
+.financial-statement tr.total td.amount {
+   border-top: thick double black;
+}
+
+.financial-statement th {
+   text-align: left;
+}
+
+.financial-statement tr.section-head th, .financial-statement tr.total th {
+   text-align: center;
+}
+
+.financial-statement a, .financial-statement a:visited {
+   color: black;
+   text-decoration: none;
+}

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