- if ($subtotal) {
- $c0subtotal = $form->format_amount(\%myconfig, $c0subtotal, 2, " ");
- $c30subtotal = $form->format_amount(\%myconfig, $c30subtotal, 2, " ");
- $c60subtotal = $form->format_amount(\%myconfig, $c60subtotal, 2, " ");
- $c90subtotal = $form->format_amount(\%myconfig, $c90subtotal, 2, " ");
- }
-
- $column_data{ct} = qq|<th> </th>|;
- $column_data{invnumber} = qq|<th> </th>|;
- $column_data{transdate} = qq|<th> </th>|;
- $column_data{duedate} = qq|<th> </th>|;
- $column_data{c0} = qq|<th align=right class=listsubtotal>$c0subtotal</th>|;
- $column_data{c30} = qq|<th align=right class=listsubtotal>$c30subtotal</th>|;
- $column_data{c60} = qq|<th align=right class=listsubtotal>$c60subtotal</th>|;
- $column_data{c90} = qq|<th align=right class=listsubtotal>$c90subtotal</th>|;
-
- if ($subtotal) {
- # print subtotals
- print qq|
- <tr class=listsubtotal>
-|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- $column_data{statement} = qq|<td> </td>|;
-
- print qq|
- </tr>
-|;
- }
-
- $subtotal = 1;
-
- $c0subtotal = 0;
- $c30subtotal = 0;
- $c60subtotal = 0;
- $c90subtotal = 0;
-
- $column_data{ct} = qq|<td>$ref->{name}</td>|;
- $column_data{statement} = qq|<td><input name="statement_$i" type=checkbox class=checkbox value=1 $ref->{checked}>
- <input type=hidden name="$form->{ct}_id_$i" value=$ref->{ctid}>
- </td>|;
- }
-
- $c0subtotal += $ref->{c0};
- $c30subtotal += $ref->{c30};
- $c60subtotal += $ref->{c60};
- $c90subtotal += $ref->{c90};
-
- $c0total += $ref->{c0};
- $c30total += $ref->{c30};
- $c60total += $ref->{c60};
- $c90total += $ref->{c90};
-
- $ref->{c0} = $form->format_amount(\%myconfig, $ref->{c0}, 2, " ");
- $ref->{c30} = $form->format_amount(\%myconfig, $ref->{c30}, 2, " ");
- $ref->{c60} = $form->format_amount(\%myconfig, $ref->{c60}, 2, " ");
- $ref->{c90} = $form->format_amount(\%myconfig, $ref->{c90}, 2, " ");
-
- $href = qq|$ref->{module}.pl?path=$form->{path}&action=edit&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=|.$form->escape($form->{callback});
-
- $column_data{invnumber} = qq|<td><a href=$href>$ref->{invnumber}</a></td>|;
- $column_data{transdate} = qq|<td>$ref->{transdate}</td>|;
- $column_data{duedate} = qq|<td>$ref->{duedate} </td>|;
- $column_data{c0} = qq|<td align=right>$ref->{c0}</td>|;
- $column_data{c30} = qq|<td align=right>$ref->{c30}</td>|;
- $column_data{c60} = qq|<td align=right>$ref->{c60}</td>|;
- $column_data{c90} = qq|<td align=right>$ref->{c90}</td>|;
-
- $j++; $j %= 2;
- print qq|
- <tr class=listrow$j>
-|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- print qq|
- </tr>
-|;
-
- $column_data{ct} = qq|<td> </td>|;
- $column_data{statement} = qq|<td> </td>|;
-
- $ctid = $ref->{ctid};
-
- }
-
- # print subtotals
- $c0subtotal = $form->format_amount(\%myconfig, $c0subtotal, 2, " ");
- $c30subtotal = $form->format_amount(\%myconfig, $c30subtotal, 2, " ");
- $c60subtotal = $form->format_amount(\%myconfig, $c60subtotal, 2, " ");
- $c90subtotal = $form->format_amount(\%myconfig, $c90subtotal, 2, " ");
-
- print qq|
- <tr class=listsubtotal>
-|;
-
- map { $column_data{$_} = qq|<th> </th>| } @column_index;
-
- $column_data{c0} = qq|<th align=right class=listsubtotal>$c0subtotal</th>|;
- $column_data{c30} = qq|<th align=right class=listsubtotal>$c30subtotal</th>|;
- $column_data{c60} = qq|<th align=right class=listsubtotal>$c60subtotal</th>|;
- $column_data{c90} = qq|<th align=right class=listsubtotal>$c90subtotal</th>|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
-
- print qq|
- </tr>
- <tr class=listtotal>
-|;
-
- $c0total = $form->format_amount(\%myconfig, $c0total, 2, " ");
- $c30total = $form->format_amount(\%myconfig, $c30total, 2, " ");
- $c60total = $form->format_amount(\%myconfig, $c60total, 2, " ");
- $c90total = $form->format_amount(\%myconfig, $c90total, 2, " ");
-
- $column_data{c0} = qq|<th align=right class=listtotal>$c0total</th>|;
- $column_data{c30} = qq|<th align=right class=listtotal>$c30total</th>|;
- $column_data{c60} = qq|<th align=right class=listtotal>$c60total</th>|;
- $column_data{c90} = qq|<th align=right class=listtotal>$c90total</th>|;
-
-
- map { print "$column_data{$_}\n" } @column_index;
-
-
- print qq|
- <input type=hidden name=rowcount value=$i>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
-|;
-
- &print_options if ($form->{arap} eq 'ar');
-
- print qq|
- </td>
- </tr>
- <tr>
- <td><hr size=3 noshade></td>
- </tr>
-</table>
-|;