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

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



Revision: 3106
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3106&view=rev
Author:   einhverfr
Date:     2010-10-26 16:51:00 +0000 (Tue, 26 Oct 2010)

Log Message:
-----------
Adding logic for hiding accounts with no transactions which is multi-currency safe.

Modified Paths:
--------------
    addons/1.3/enhanced_tb/trunk/UI/trial_balance/view.html
    addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl

Modified: addons/1.3/enhanced_tb/trunk/UI/trial_balance/view.html
===================================================================
--- addons/1.3/enhanced_tb/trunk/UI/trial_balance/view.html	2010-10-25 21:39:37 UTC (rev 3105)
+++ addons/1.3/enhanced_tb/trunk/UI/trial_balance/view.html	2010-10-26 16:51:00 UTC (rev 3106)
@@ -30,9 +30,15 @@
                 <?lsmb text("End Balance")?>
             </td>
         </tr>
-        
+        <?lsmb iter = 0 ?> 
         <?lsmb FOREACH account IN accounts?>
-        <tr class="list <?lsmb loop.count mod 2 ? "odd" : "even" ?>">
+        <?lsmb IF ((account.debits == zero) and (account.credits == zero) and 
+                       (not show_all_accounts)) ?>
+         <?lsmb          NEXT;
+               END # if ... ?>
+        <?lsmb iter = iter + 1 # Moving from loop.count to avoid UI funkiness Q
+                               # when rows are skipped ?>
+        <tr class="list <?lsmb iter mod 2 ? "odd" : "even" ?>">
             <td class="accounttitle">
                 <a href="gl.pl?action=generate_report&amp;accounttype=<?lsmb account.gifi_accno ? 'gifi' : 'standard'?>&amp;datefrom=<?lsmb report.date_from ?>&amp;dateto=<?lsmb report.date_to ?>&amp;sort=transdate&amp;l_subtotal=Y&amp;l_balance=Y&amp;department=<?lsmb report.department ?>&amp;title=<?lsmb "Trial Balance Individual Transactions"?>&amp;category=X&amp;l_reference=Y&amp;l_transdate=Y&amp;l_description=Y&amp;l_debit=Y&amp;l_credit=Y<?lsmb IF account.gifi_accno; "&amp;gifi_accno=" _ account.gifi_accno _ "&amp;gifi_description=" _ account.account_desc; ELSE; "&amp;accno=" _ account.account_number; END;?>"><?lsmb account.account_number?></a>
             </td>
@@ -118,4 +124,4 @@
             </tr>
         </table>
     </form>
-</body>
\ No newline at end of file
+</body>

Modified: addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl
===================================================================
--- addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl	2010-10-25 21:39:37 UTC (rev 3105)
+++ addons/1.3/enhanced_tb/trunk/scripts/trial_balance.pl	2010-10-26 16:51:00 UTC (rev 3106)
@@ -50,6 +50,12 @@
         total_debits=>$total_debits->bstr(),
         total_credits =>$total_credits->bstr(),
         report=>$report,
+        zero  => $request->format_amount( # Needed for 0 comparisons....
+            {
+                amount=> 0, 
+                money => 1
+            }
+        ),
     });
 }
 


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