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

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



Revision: 6641
          http://sourceforge.net/p/ledger-smb/code/6641
Author:   einhverfr
Date:     2014-01-25 16:17:08 +0000 (Sat, 25 Jan 2014)
Log Message:
-----------
Ensuring that all invoice reports show numeric values as money.
Also fixing bug 972, checkboxes appearing on total lines

Modified Paths:
--------------
    trunk/LedgerSMB/Report/Invoices/Outstanding.pm
    trunk/LedgerSMB/Report/Invoices/Payments.pm
    trunk/LedgerSMB/Report/Invoices/Transactions.pm
    trunk/LedgerSMB/Report.pm
    trunk/UI/lib/dynatable.html

Modified: trunk/LedgerSMB/Report/Invoices/Outstanding.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Outstanding.pm	2014-01-25 16:07:34 UTC (rev 6640)
+++ trunk/LedgerSMB/Report/Invoices/Outstanding.pm	2014-01-25 16:17:08 UTC (rev 6641)
@@ -308,6 +308,7 @@
 
 sub run_report {
     my $self = shift;
+    $ENV{LSMB_ALWAYS_MONEY} = 1;
     my $procname = 'report__aa_outstanding';
     if ($self->is_detailed){
        $procname .= '_details';

Modified: trunk/LedgerSMB/Report/Invoices/Payments.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Payments.pm	2014-01-25 16:07:34 UTC (rev 6640)
+++ trunk/LedgerSMB/Report/Invoices/Payments.pm	2014-01-25 16:17:08 UTC (rev 6641)
@@ -220,6 +220,7 @@
 
 sub run_report{
     my ($self) = @_;
+    $ENV{LSMB_ALWAYS_MONEY} = 1;
     my @rows = $self->exec_method({funcname => 'payment__search'});
     my $count = 1;
     for my $r(@rows){

Modified: trunk/LedgerSMB/Report/Invoices/Transactions.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Transactions.pm	2014-01-25 16:07:34 UTC (rev 6640)
+++ trunk/LedgerSMB/Report/Invoices/Transactions.pm	2014-01-25 16:17:08 UTC (rev 6641)
@@ -340,6 +340,7 @@
 
 sub run_report {
     my $self = shift;
+    $ENV{LSMB_ALWAYS_MONEY} = 1;
     my @rows = $self->exec_method({funcname => 'report__aa_transactions'});
     for my $r(@rows){
         my $script;

Modified: trunk/LedgerSMB/Report.pm
===================================================================
--- trunk/LedgerSMB/Report.pm	2014-01-25 16:07:34 UTC (rev 6640)
+++ trunk/LedgerSMB/Report.pm	2014-01-25 16:17:08 UTC (rev 6641)
@@ -215,7 +215,7 @@
         @$rows = reverse @$rows;
     }
     $self->rows($rows);
-    my $total_row = {html_class => 'listtotal'};
+    my $total_row = {html_class => 'listtotal', NOINPUT => 1};
     my $col_val = undef;
     my $old_subtotal = {};
     my @newrows;
@@ -230,7 +230,7 @@
         if ($self->show_subtotals and defined $col_val and 
             ($col_val ne $r->{$self->order_by})
          ){
-            my $subtotals = {html_class => 'listsubtotal'};
+            my $subtotals = {html_class => 'listsubtotal', NOINPUT => 1};
             for my $k (keys %$total_row){
                 $subtotals->{$k} = $total_row->{$k}->copy 
                         unless $subtotals->{k};

Modified: trunk/UI/lib/dynatable.html
===================================================================
--- trunk/UI/lib/dynatable.html	2014-01-25 16:07:34 UTC (rev 6640)
+++ trunk/UI/lib/dynatable.html	2014-01-25 16:17:08 UTC (rev 6641)
@@ -29,21 +29,25 @@
       <input type="hidden" name="row_<?lsmb ROWCOUNT ?>" 
              value="<?lsmb ROW.row_id ?>" />
       <?lsmb- FOREACH COL IN columns;
-          IF COL.type == 'hidden';
+            TYPE = COL.type;
+            IF ROW.NOINPUT AND TYPE != 'href';
+            TYPE = 'text';
+            END;
+          IF TYPE == 'hidden';
       NAME = PFX _ COL.col_id _ '_' _ ROW.row_id; ?>
       <input type="hidden" 
              name="<?lsmb NAME ?>" 
             value="<?lsmb  ROW.${COL.col_id} ?>" />
       <?lsmb- ELSE - ?>
       <td class="<?lsmb COL.col_id _ ' ' _ COL.class _ ' ' _ COL.type ?>">
-          <?lsmb- IF COL.type == 'input_text' -?>
+          <?lsmb- IF TYPE == 'input_text' -?>
           <input id="<?lsmb COL.col_id _ '-' _ ROWCOUNT ?>"
                type="text"
               class="<?lsmb COL.class ?>"
                name="<?lsmb PFX _ COL.col_id _ '_' _ ROW.row_id ?>"
               value="<?lsmb ROW.${COL.col_id} ?>"
          />
-         <?lsmb- ELSIF COL.type == 'checkbox';
+         <?lsmb- ELSIF TYPE == 'checkbox';
                    IF ROW.${COL.col_id};
                       CHECKED = "checked='CHECKED'";
                    ELSE; 
@@ -56,14 +60,14 @@
               class="<?lsmb COL.class ?>"
               value="<?lsmb ROW.row_id ?>"
                <?lsmb CHECKED ?> />
-         <?lsmb- ELSIF COL.type == 'radio' ?> 
+         <?lsmb- ELSIF TYPE == 'radio' ?> 
          <input id="<?lsmb COL.col_id _ '-' _ ROWCOUNT ?>"
                type="radio"
                name="<?lsmb PFX _ COL.col_id ?>"
               class="<?lsmb COL.class ?>"
               value="<?lsmb ROW.row_id ?>"
                <?lsmb CHECKED ?> />
-         <?lsmb- ELSIF COL.type == 'href'; 
+         <?lsmb- ELSIF TYPE == 'href'; 
                    HREF_SFX = COL.col_id _ "_href_suffix";
                    IF ROW.$HREF_SFX;
                       HREF = COL.href_base _ ROW.$HREF_SFX;
@@ -71,7 +75,7 @@
                       HREF = COL.href_base _ ROW.row_id;
                    END
           ?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
-         <?lsmb ELSIF COL.type == 'mirrored';
+         <?lsmb ELSIF TYPE == 'mirrored';
          NAME = PFX _ COL.col_id _ '_' _ ROW.row_id;
          ROW.${COL.col_id} ?>
          <input type="hidden" 

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


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits