- $ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
-
- $debit = $form->format_amount(\%myconfig, $ref->{debit}, 2, " ");
- $credit = $form->format_amount(\%myconfig, $ref->{credit}, 2, " ");
- $begbalance =
- $form->format_amount(\%myconfig, $ref->{balance} * $ml, 2, " ");
- $endbalance =
- $form->format_amount(\%myconfig,
- ($ref->{balance} + $ref->{amount}) * $ml,
- 2, " ");
-
- # next if ($ref->{debit} == 0 && $ref->{credit} == 0);
-
- if ($ref->{charttype} eq "H" && $subtotal && $form->{l_subtotal}) {
- map { $column_data{$_} = "<th> </th>" }
- qw(accno begbalance endbalance);
-
- $subtotalbegbalance =
- $form->format_amount(\%myconfig, $subtotalbegbalance, 2, " ");
- $subtotalendbalance =
- $form->format_amount(\%myconfig, $subtotalendbalance, 2, " ");
- $subtotaldebit =
- $form->format_amount(\%myconfig, $subtotaldebit, 2, " ");
- $subtotalcredit =
- $form->format_amount(\%myconfig, $subtotalcredit, 2, " ");
-
- $column_data{description} = "<th>$subtotaldescription</th>";
- $column_data{begbalance} = "<th align=right>$subtotalbegbalance</th>";
- $column_data{endbalance} = "<th align=right>$subtotalendbalance</th>";
- $column_data{debit} = "<th align=right>$subtotaldebit</th>";
- $column_data{credit} = "<th align=right>$subtotalcredit</th>";
-
- print qq|
- <tr class=listsubtotal>
-|;
- map { print "$column_data{$_}\n" } @column_index;