-</TR>
-% my $row = 0;
-% for ( $row = 0; exists($param->{"custnum$row"}); $row++ ) {
-
- <TR id="row<%$row%>" rownum="<%$row%>">
- <TD>
- <INPUT TYPE = "text"
- NAME = "invnum<% $row %>"
- ID = "invnum<% $row %>"
- SIZE = 8
- MAXLENGTH = 12
- STYLE = "text-align:right;"
- VALUE = "<% $param->{"invnum$row"} %>"
- rownum = "<% $row %>"
- >
- <SCRIPT TYPE="text/javascript">
- var invnum_input<% $row %> = document.getElementById("invnum<% $row %>");
- invnum_input<% $row %>.onfocus = clearhint_invnum;
- invnum_input<% $row %>.onchange = <% $opt{prefix} %>search_invnum;
- </SCRIPT>
- </TD>
-
- <TD>
- <INPUT TYPE = "text"
- NAME = "custnum<% $row %>"
- ID = "custnum<% $row %>"
- SIZE = 8
- MAXLENGTH = 12
- STYLE = "text-align:right;"
- VALUE = "<% $param->{"custnum$row"} %>"
- rownum = "<% $row %>"
- >
- <SCRIPT TYPE="text/javascript">
- var custnum_input<% $row %> = document.getElementById("custnum<% $row %>");
- custnum_input<% $row %>.onfocus = clearhint_custnum;
- custnum_input<% $row %>.onchange = <% $opt{prefix} %>search_custnum;
- </SCRIPT>
- </TD>
-
- <TD STYLE="text-align: center">
- <SPAN
- ID = "status<% $row %>_text"
- rownum = "<% $row %>"
- STYLE = "font-weight: bold;
- color: <%$param->{"statuscolor$row"} || '#000000'%>"
-
- ><% $param->{"status$row"} %></SPAN>
- <INPUT TYPE = "hidden"
- NAME = "status<% $row %>"
- ID = "status<% $row %>"
- VALUE = "<% $param->{"status$row"} %>"
- rownum = "<% $row %>"
- >
- <INPUT TYPE = "hidden"
- NAME = "statuscolor<% $row %>"
- ID = "statuscolor<% $row %>"
- VALUE = "<% $param->{"statuscolor$row"} %>"
- rownum = "<% $row %>"
- >
- </TD>
-
- <TD>
- <INPUT TYPE="text" NAME="customer<% $row %>" ID="customer<% $row %>" SIZE=64 VALUE="<% $param->{"customer$row"} %>" rownum="<% $row %>">
- <SCRIPT TYPE="text/javascript">
- var customer_input<% $row %> = document.getElementById("customer<% $row %>");
- customer_input<% $row %>.onfocus = clearhint_customer;
- customer_input<% $row %>.onclick = clearhint_customer;
- customer_input<% $row %>.onchange = <% $opt{prefix} %>search_customer;
- </SCRIPT>
- <SELECT NAME="cust_select<% $row %>" ID="cust_select<% $row %>" rownum="<% $row %>" STYLE="color:#ff0000; display:none">
- </SELECT>
- <SCRIPT TYPE="text/javascript">
- var customer_select<% $row %> = document.getElementById("cust_select<% $row %>");
- customer_select<% $row %>.onchange = select_customer;
- </SCRIPT>
- </TD>
-
- <TD STYLE="text-align:right">
- <% $money_char %>
- <SPAN
- ID = "balance<% $row %>_text"
- rownum = "<% $row %>"
- ><% $param->{"balance$row"} %></SPAN>
-
- <INPUT TYPE = "hidden"
- NAME = "balance<% $row %>"
- ID = "balance<% $row %>"
- VALUE = "<% $param->{"balance$row"} %>"
- rownum = "<% $row %>"
- >
- </TD>
-
-% 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(<FONT COLOR="$color">) : '';
-% my $onchange = '';
-% if ( $opt{onchange}->[$col] ) {
-% $onchange = 'onchange="'.$opt{onchange}->[$col].'"';
-% }
-% elsif ( $opt{footer}->[$col] eq '_TOTAL' ) {
-% $total[$col] += $value;
-% $onchange = $opt{prefix}. "calc_total$col();";
-% $onchange = qq(onchange="$onchange" onkeyup="$onchange");
-% }
- <TD ALIGN="<% $align %>">
-% my $type = $types->[$col] || 'text';
-% if ($type eq 'text' or $type eq 'checkbox') {
- <INPUT TYPE = "<% $type %>"
- NAME = "<% $name %>"
- ID = "<% $name %>"
- SIZE = "<% $size %>"
- STYLE = "text-align: <% $align %>;"
- VALUE = "<% $value %>"
- rownum = "<% $row %>"
- <% $onchange %>
- >
-% } elsif ($types->[$col] eq 'immutable') {
- <% $font %><% $value %><% $font ? '</FONT>' : '' %>
- <INPUT TYPE="hidden" ID="<% $name %>" NAME="<% $name %>" VALUE="<% $value %>" >
-% } else {
- Cannot represent unknown type: <% $types->[$col] %>
-% }
- </TD>
-% $col++;
-% }
- </TR>
-% }
-
-<TR id="row_total">
- <TH COLSPAN=5 ID="<% $opt{'prefix'} %>_TOTAL_TOTAL">
- Total <% $row ? $row-1 : 0 %>
- <% PL($opt{name_singular} || 'customer', ( $row ? $row-1 : 0 ) ) %>
- </TH>
-% 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";
- <TH ALIGN="<% $align %>" ID="<% $id %>"> <% sprintf('%.2f', $total[$col] ) %></TH>
-% } else {
- <TH ALIGN="<% $align %>"><% $footer %></TH>
-% }
-% $col++;
-% }
-</TR>
-
-</TABLE>
-
-<SCRIPT TYPE="text/javascript">