. $locale->text('All') . qq|
<input name="category" class=radio type=radio value=A> |
. $locale->text('Asset') . qq|
- <input name="category" class=radio type=radio value=C> |
- . $locale->text('Contra') . qq|
<input name="category" class=radio type=radio value=L> |
. $locale->text('Liability') . qq|
- <input name="category" class=radio type=radio value=Q> |
- . $locale->text('Equity') . qq|
<input name="category" class=radio type=radio value=I> |
. $locale->text('Revenue') . qq|
<input name="category" class=radio type=radio value=E> |
$form->{title} = $locale->text('General Ledger');
- $ml = ($form->{ml} =~ /(A|E)/) ? -1 : 1;
+ $ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1;
unless ($form->{category} eq 'X') {
$form->{title} .= " : " . $locale->text($acctype{ $form->{category} });
</tr>
|;
}
-
+ $form->{balance} *= $ml;
foreach $ref (@{ $form->{GL} }) {
-
+ $form->{balance} *= $ml;
# if item ne sort print subtotal
if ($form->{l_subtotal} eq 'Y') {
if ($sameitem ne $ref->{ $form->{sort} }) {
&gl_subtotal;
}
}
- foreach $key (sort keys(%{ $ref->{amount} })) {
- $form->{balance} += $ref->{amount}{$key};
- }
+ #foreach $key (sort keys(%{ $ref->{amount} })) {
+ # $form->{balance} += $ref->{amount}{$key};
+ #}
$debit = "";
foreach $key (sort keys(%{ $ref->{debit} })) {
$debit .=
"<br>" . $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0);
}
+ $form->{balance} = abs($form->{balance}) - abs($ref->{debit}{$key});
}
$credit = "";
$credit .= "<br>"
. $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
}
+ $form->{balance} = abs($form->{balance}) - abs( $ref->{credit}{$key});
}
$debittax = "";
$debittax .= "<br>"
. $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0);
}
+ $form->{balance} = abs($form->{balance}) - abs($ref->{debit_tax}{$key});
}
$credittax = "";
$credittax .= "<br>"
. $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0);
}
+ $form->{balance} = abs($form->{balance}) - abs($ref->{credit_tax}{$key});
}
$debitaccno = "";
foreach $key (sort keys(%{ $ref->{debit_accno} })) {
if ($key == 0) {
$debitaccno =
- "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
+ "<a href=$href&accno=$ref->{debit_accno}{$key}&callback=$callback>$ref->{debit_accno}{$key}</a>";
} else {
$debitaccno .=
- "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
+ "<br><a href=$href&accno=$ref->{debit_accno}{$key}&callback=$callback>$ref->{debit_accno}{$key}</a>";
}
if ($ref->{debit_taxkey}{$key} eq $debittaxkey) {
$ref->{debit_tax_accno}{$key} = $taxaccno;
foreach $key (sort keys(%{ $ref->{credit_accno} })) {
if ($key == 0) {
$creditaccno =
- "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
+ "<a href=$href&accno=$ref->{credit_accno}{$key}&callback=$callback>$ref->{credit_accno}{$key}</a>";
} else {
$creditaccno .=
- "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
+ "<br><a href=$href&accno=$ref->{credit_accno}{$key}&callback=$callback>$ref->{credit_accno}{$key}</a>";
}
if ($ref->{credit_taxkey}{$key} eq $credittaxkey) {
$ref->{credit_tax_accno}{$key} = $taxaccno;
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>";
+ "<a href=$href&accno=$ref->{debit_tax_accno}{$key}&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>";
+ "<br><a href=$href&accno=$ref->{debit_tax_accno}{$key}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
}
}
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>";
+ "<a href=$href&accno=$ref->{credit_tax_accno}{$key}&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>";
+ "<br><a href=$href&accno=$ref->{credit_tax_accno}{$key}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
}
}
"<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)
+ . $form->format_amount(\%myconfig, $form->{balance}, 2, 0)
. "</td>";
$i++;