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

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



Revision: 4819
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4819&view=rev
Author:   einhverfr
Date:     2012-06-02 09:30:38 +0000 (Sat, 02 Jun 2012)
Log Message:
-----------
Header lines on budget variance report fixed

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Report/Budget/Variance.pm
    trunk/UI/Reports/display_report.html

Modified: trunk/LedgerSMB/DBObject/Report/Budget/Variance.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Report/Budget/Variance.pm	2012-06-01 12:59:28 UTC (rev 4818)
+++ trunk/LedgerSMB/DBObject/Report/Budget/Variance.pm	2012-06-02 09:30:38 UTC (rev 4819)
@@ -106,7 +106,7 @@
 =cut
 
 sub header_lines {
-    return [{name => 'control_code',
+    return [{name => 'reference',
              text => $locale->text('Budget Number')},
             {name => 'description',
              text => $locale->text('Description')},
@@ -140,11 +140,11 @@
 
 =over
 
-=item control_code
+=item reference
 
 =cut
 
-has control_code => (is => 'ro', isa => 'Str');
+has  reference => (is => 'ro', isa => 'Str');
 
 =item description
 
@@ -181,7 +181,8 @@
     use LedgerSMB::DBObject::Budget;
 
     my $budget = LedgerSMB::DBObject::Budget->get($id);
-    return $self->new(%$budget);  
+    my $report = $self->new(%$budget); 
+    return $report;
 }
 
 =item run_report

Modified: trunk/UI/Reports/display_report.html
===================================================================
--- trunk/UI/Reports/display_report.html	2012-06-01 12:59:28 UTC (rev 4818)
+++ trunk/UI/Reports/display_report.html	2012-06-02 09:30:38 UTC (rev 4819)
@@ -21,7 +21,14 @@
 </div>
 <?lsmb FOREACH LINE IN hlines ?>
 <div class="report_header"><label><?lsmb LINE.text ?>:</label>
-<span class="report_header"><?lsmb request.${LINE.name} ?></span>
+<span class="report_header">
+<?lsmb 
+IF request.${LINE.name}; 
+    request.${LINE.name};
+ELSE;
+    report.${LINE.name};
+END;
+            ?></span>
 </div>
 <?lsmb END ?>
 <?lsmb PROCESS dynatable tbody = {rows => rows } 

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