summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-10-20 19:22:39 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-10-20 19:22:39 +0000
commit7a3fecc9998b03b6d463cea508cee7824942589b (patch)
treeccb5463a7de3b35de9d567388e66951745ea4632
parentc440a20c234d4fa586ae30edd77377d08238eb6d (diff)
Scoping and formatting fixes to GL Reports interface.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2376 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/GL.pm1
-rw-r--r--bin/gl.pl6
2 files changed, 3 insertions, 4 deletions
diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm
index 9d30d604..22976c2d 100644
--- a/LedgerSMB/GL.pm
+++ b/LedgerSMB/GL.pm
@@ -538,7 +538,6 @@ sub all_transactions {
}
$sth->finish;
- $dbh->commit;
}
sub transaction {
diff --git a/bin/gl.pl b/bin/gl.pl
index 95e9a438..5581259c 100644
--- a/bin/gl.pl
+++ b/bin/gl.pl
@@ -451,6 +451,7 @@ sub generate_report {
$form->{sort} = "transdate" unless $form->{sort};
$form->{amountfrom} = $form->parse_amount(\%myconfig, $form->{amountfrom});
$form->{amountto} = $form->parse_amount(\%myconfig, $form->{amountto});
+ my ($totaldebit, $totalcredit) = (0, 0);
GL->all_transactions( \%myconfig, \%$form );
@@ -698,9 +699,9 @@ sub generate_report {
$totalcredit += $ref->{credit};
$ref->{debit} =
- $form->format_amount( \%myconfig, $ref->{debit}, 2, " " );
+ $form->format_amount( \%myconfig, $ref->{debit}, 2);
$ref->{credit} =
- $form->format_amount( \%myconfig, $ref->{credit}, 2, " " );
+ $form->format_amount( \%myconfig, $ref->{credit}, 2);
for (qw(id transdate)) { $column_data{$_} = "$ref->{$_}" }
@@ -740,7 +741,6 @@ sub generate_report {
push @rows, &gl_subtotal_tt() if ( $form->{l_subtotal} eq 'Y' );
for (@column_index) { $column_data{$_} = " " }
-
$column_data{debit} = $form->format_amount( \%myconfig, $totaldebit, 2, " " );
$column_data{credit} = $form->format_amount( \%myconfig, $totalcredit, 2, " " );
$column_data{balance} = $form->format_amount( \%myconfig, $form->{balance} * $ml * $cml, 2, 0 );