- $debittaxaccno = "";
- foreach $key (sort keys(%{ $ref->{debit_tax_accno} })) {
- if ($key == 0) {
- $debittaxaccno =
- "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
- } else {
- $debittaxaccno .=
- "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
- }
- }
-
- $credittaxaccno = "";
- foreach $key (sort keys(%{ $ref->{credit_tax_accno} })) {
- if ($key == 0) {
- $credittaxaccno =
- "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
- } else {
- $credittaxaccno .=
- "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
- }
- }
-
- # $ref->{debit} = $form->format_amount(\%myconfig, $ref->{debit}, 2, " ");
- # $ref->{credit} = $form->format_amount(\%myconfig, $ref->{credit}, 2, " ");
-
- $column_data{id} = "<td align=right> $ref->{id} </td>";
- $column_data{transdate} =
- "<td align=center> $ref->{transdate} </td>";
- $column_data{reference} =
- "<td align=center><a href=$ref->{module}.pl?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{reference}</td>";
- $column_data{description} =
- "<td align=center>$ref->{description} </td>";
- $column_data{source} = "<td align=center>$ref->{source} </td>";
- $column_data{notes} = "<td align=center>$ref->{notes} </td>";
- $column_data{debit} = "<td align=right>$debit</td>";
- $column_data{debit_accno} = "<td align=center>$debitaccno</td>";
- $column_data{credit} = "<td align=right>$credit</td>";
- $column_data{credit_accno} = "<td align=center>$creditaccno</td>";
- $column_data{debit_tax} =
- ($ref->{debit_tax_accno} ne "")
- ? "<td align=right>$debittax</td>"
- : "<td></td>";
- $column_data{debit_tax_accno} = "<td align=center>$debittaxaccno</td>";
- $column_data{gifi_accno} =
- "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
- $column_data{credit_tax} =
- ($ref->{credit_tax_accno} ne "")
- ? "<td align=right>$credittax</td>"
- : "<td></td>";
- $column_data{credit_tax_accno} = "<td align=center>$credittaxaccno</td>";
- $column_data{gifi_accno} =
- "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
- $column_data{balance} =
- "<td align=right>"
- . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
- . "</td>";
-
- $i++;
- $i %= 2;
- print "
- <tr class=listrow$i>";
- map { print "$column_data{$_}\n" } @column_index;
- print "</tr>";
-
- }
-
- &gl_subtotal if ($form->{l_subtotal} eq 'Y');
-
- map { $column_data{$_} = "<td> </td>" } @column_index;
-
- $column_data{debit} =
- "<th align=right class=listtotal>"
- . $form->format_amount(\%myconfig, $totaldebit, 2, " ") . "</th>";
- $column_data{credit} =
- "<th align=right class=listtotal>"
- . $form->format_amount(\%myconfig, $totalcredit, 2, " ") . "</th>";
- $column_data{debit_tax} =
- "<th align=right class=listtotal>"
- . $form->format_amount(\%myconfig, $totaldebittax, 2, " ") . "</th>";
- $column_data{credit_tax} =
- "<th align=right class=listtotal>"
- . $form->format_amount(\%myconfig, $totalcredittax, 2, " ") . "</th>";
- $column_data{balance} =
- "<th align=right class=listtotal>"
- . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0) . "</th>";
-
- print qq|
- <tr class=listtotal>
-|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- print qq|
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td><hr size=3 noshade></td>
- </tr>
-</table>
-
-<br>