X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcustomer-table.html;h=090623ff90d0844ca5b5dac29280d46cfd05ca46;hb=b6260b4f39cf34b9e0e5b8560ef88c8881ba0766;hp=9968ee9aa81ee3e142e1a000b265114a62378cbb;hpb=b3d54360bd93798a6454e69cca8e6e4a834c7140;p=freeside.git diff --git a/httemplate/elements/customer-table.html b/httemplate/elements/customer-table.html index 9968ee9aa..090623ff9 100644 --- a/httemplate/elements/customer-table.html +++ b/httemplate/elements/customer-table.html @@ -41,6 +41,8 @@ Example: + function update_status_text(rownum, newval) { + document.getElementById('status'+rownum).value = newval; + document.getElementById('status'+rownum+'_text').innerHTML = newval; + } -
Inv # | -Cust # | -Status | -Customer | -Balance | -% foreach my $header ( @{$opt{header}} ) { -<% $header %> | -% } -|
---|---|---|---|---|---|---|
- " - rownum = "<% $row %>" - > - - | - -- " - rownum = "<% $row %>" - > - - | - -- - - | - -- " rownum="<% $row %>"> - - - - | + function update_balance_text(rownum, newval) { + document.getElementById('balance'+rownum).value = newval; + document.getElementById('balance'+rownum+'_text').innerHTML = newval; + } -% my $col = 0; -% foreach my $field ( @{$opt{fields}} ) { -% my $value; -% if ( ref($field) eq 'CODE' ) { -% $value = &{$field}($row,$param); -% } else { -% $value = $param->{"$field$row"}; -% } -% my $name = (ref($field) eq 'CODE') ? "column${col}_$row" : "$field$row"; -% my $align = $align{ $opt{align}->[$col] || 'l' }; -% my $size = $sizes->[$col] || 10; -% my $color = $opt{color}->[$col]; -% my $font = $color ? qq() : ''; -% my $onchange = ''; -% if ( $opt{footer}->[$col] eq '_TOTAL' ) { -% $total[$col] += $value; -% $onchange = $opt{prefix}. "calc_total$col();"; -% $onchange = qq(onchange="$onchange" onkeyup="$onchange"); -% } --% if (! $types->[$col] || $types->[$col] eq 'text') { - - > -% } elsif ($types->[$col] eq 'immutable') { - <% $font %><% $value %><% $font ? '' : '' %> - -% } else { - Cannot represent unknown type: <% $types->[$col] %> -% } - | -% $col++; -% } -- <% $money_char %> - - - - | -|
- Total <% $row ? $row-1 : 0 %> - <% PL($opt{name_singular} || 'customer', ( $row ? $row-1 : 0 ) ) %> - | -% my $col = 0; -% foreach my $footer ( @{$opt{footer}} ) { -% my $align = $align{ $opt{'footer_align'}->[$col] || 'c' }; -% if ($footer eq '_TOTAL' ) { -% my $id = $opt{'fields'}->[$col]; -% $id = ref($id) ? "column${col}_TOTAL" : "${id}_TOTAL"; -<% sprintf('%.2f', $total[$col] ) %> | -% } else { -<% $footer %> | -% } -% $col++; -% } -
Inv # | +Cust # | +Status | +Customer | +Balance | +% foreach my $header ( @{$opt{header}} ) { +<% $header %> | +% } +|
---|---|---|---|---|---|---|
+ Total <% @rownums || 0 %> + <% PL($opt{name_singular} || 'customer', ( @rownums || 0 ) ) %> + | +% my $col = 0; +% foreach my $footer ( @{$opt{footer}} ) { +% my $align = $align{ $opt{'footer_align'}->[$col] || 'c' }; +% if ($footer eq '_TOTAL' ) { +% my $id = $opt{'fields'}->[$col]; +% $id = ref($id) ? "column${col}_TOTAL" : "${id}_TOTAL"; +<% sprintf('%.2f', $total[$col] ) %> | +% } else { +<% $footer %> | +% } +% $col++; +% } +