From ff9c4ef29ca43ca9c6be533a86600b8ca59c31a8 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Wed, 21 Feb 2007 00:06:31 +0000 Subject: [PATCH] Unbalanced Ledger Fehlermeldung im Buchungsjournal wieder hinzugefuegt. Das Buchungsjournal wird immer dargestellt. Im Falle eines Fehlers (soll+vst) - (haben+ust) > 0.001 wird im Tabellenfuss die Unbalanced Ledger Meldung ausgegeben mit dem Bilanzfehler. --- bin/mozilla/gl.pl | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 449120611..2d8d31d3a 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -494,10 +494,14 @@ sub generate_report { . $locale->date(\%myconfig, $form->{dateto}, 1); } - @columns = - qw(transdate id reference description notes source debit debit_accno credit - credit_accno debit_tax debit_tax_accno credit_tax credit_tax_accno accno - gifi_accno projectnumbers); + @columns = $form->sort_columns( qw( + transdate id reference description + notes source debit debit_accno + credit credit_accno debit_tax debit_tax_accno + credit_tax credit_tax_accno accno gifi_accno + projectnumbers + ) + ); if ($form->{accno} || $form->{gifi_accno}) { @columns = grep !/(accno|gifi_accno)/, @columns; @@ -833,6 +837,12 @@ sub generate_report { map { $column_data{$_} = " " } @column_index; + my $balanced_ledger = $totaldebit + + $totaldebittax + - $totalcredit + - $totalcredittax; + # = 0 for balanced ledger + $column_data{debit} = "" . $form->format_amount(\%myconfig, $totaldebit, 2, " ") . ""; @@ -857,6 +867,27 @@ sub generate_report { print qq| + |; + + + if ( abs($balanced_ledger) > 0.001 ) { + + print qq|| + . $locale->text('Unbalanced Ledger') + . ": " + . $form->format_amount(\%myconfig, $balanced_ledger, 3, " ") + + } elsif ( abs($balanced_ledger) <= 0.001 ) { + + print qq|| + . $locale->text('Balanced Ledger') + + } + + + print qq| + + -- 2.20.1