From 4d20c18172f57d1cb809334683f5b844ca02a5e6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 4 Jun 2007 15:06:10 +0000 Subject: [PATCH] =?utf8?q?Bei=20Eingangs-,=20Ausgangs-,=20Kreditoren-=20un?= =?utf8?q?d=20Debitorenrechnungen=20unterhalb=20der=20Zahlungsein-=20bzw.?= =?utf8?q?=20-ausg=C3=A4nge=20die=20bisher=20gebuchte=20Summe=20und=20den?= =?utf8?q?=20noch=20offenen=20Betrag=20anzeigen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ap.pl | 25 +++++++++++++++++++++++-- bin/mozilla/ar.pl | 24 ++++++++++++++++++++++-- bin/mozilla/ir.pl | 21 ++++++++++++++++++++- bin/mozilla/is.pl | 20 +++++++++++++++++++- locale/de/all | 1 + locale/de/ap | 1 + locale/de/ar | 1 + locale/de/ir | 1 + locale/de/is | 1 + 9 files changed, 89 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index f69793b47..24c9f5943 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -672,6 +672,7 @@ $jsscript ? $locale->text('Tax Included') : $locale->text('Tax'); + $form->{invtotal_unformatted} = $form->{invtotal}; $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2); $APselected = @@ -741,7 +742,9 @@ $jsscript "; - my @triggers = (); + my @triggers = (); + my $totalpaid = 0; + $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { print " @@ -755,6 +758,8 @@ $jsscript '-labels' => \%AP_paid_labels, '-default' => $form->{"AP_paid_$i"})); + $totalpaid += $form->{"paid_$i"}; + # format amounts if ($form->{"paid_$i"}) { $form->{"paid_$i"} = @@ -805,7 +810,23 @@ $jsscript "; push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } - print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . + + my $paid_missing = $form->{invtotal_unformatted} - $totalpaid; + + print qq| + + + + | . $locale->text('Total') . qq| + | . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq| + + + + + | . $locale->text('Missing amount') . qq| + | . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq| + +| . $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . qq| {paidaccounts}> diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 8a01c1959..f3b319e29 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -685,6 +685,7 @@ $jsscript $project = ""; } + $form->{invtotal_unformatted} = $form->{invtotal}; $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2); $ARselected = @@ -756,7 +757,9 @@ $jsscript "; - my @triggers = (); + my @triggers = (); + my $totalpaid = 0; + $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { print " @@ -770,6 +773,8 @@ $jsscript '-labels' => \%AR_paid_labels, '-default' => $form->{"AR_paid_$i"})); + $totalpaid += $form->{"paid_$i"}; + # format amounts if ($form->{"paid_$i"}) { $form->{"paid_$i"} = @@ -822,7 +827,22 @@ $jsscript push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } - print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . + my $paid_missing = $form->{invtotal_unformatted} - $totalpaid; + + print qq| + + + + | . $locale->text('Total') . qq| + | . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq| + + + + + | . $locale->text('Missing amount') . qq| + | . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq| + +| . $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . qq| {paidaccounts}> diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 55a80faa2..158a4e46c 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -730,7 +730,9 @@ sub form_footer { |; - my @triggers = (); + my @triggers = (); + my $totalpaid = 0; + $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -742,6 +744,8 @@ sub form_footer { $form->{"selectAP_paid_$i"} =~ s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/; + $totalpaid += $form->{"paid_$i"}; + # format amounts if ($form->{"paid_$i"}) { $form->{"paid_$i"} = @@ -785,7 +789,22 @@ sub form_footer { push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } + my $paid_missing = $form->{oldinvtotal} - $totalpaid; + print qq| + + + + | . $locale->text('Total') . qq| + | . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq| + + + + + | . $locale->text('Missing amount') . qq| + | . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq| + + {oldinvtotal}> {paidaccounts}> diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index b8eb07479..78ee3d316 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1011,7 +1011,8 @@ if ($form->{type} eq "credit_note") { "; - my @triggers = (); + my @triggers = (); + my $totalpaid = 0; $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -1062,6 +1063,23 @@ if ($form->{type} eq "credit_note") { push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } + my $paid_missing = $form->{oldinvtotal} - $totalpaid; + + print qq| + + + + | . $locale->text('Total') . qq| + | . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq| + + + + + | . $locale->text('Missing amount') . qq| + | . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq| + +|; + map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); print qq| diff --git a/locale/de/all b/locale/de/all index 6eb2f3acc..8ac7c575f 100644 --- a/locale/de/all +++ b/locale/de/all @@ -688,6 +688,7 @@ aktualisieren wollen?', 'Missing Method!' => 'Fehlender Voranmeldungszeitraum', 'Missing Preferences: Outputroutine disabled' => 'Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!', 'Missing Tax Authoritys Preferences' => 'Fehlende Angaben zum Finanzamt!', + 'Missing amount' => 'Fehlbetrag', 'Mitarbeiter' => 'Mitarbeiter', 'Mobile1' => 'Mobile 1', 'Mobile2' => 'Mobile 2', diff --git a/locale/de/ap b/locale/de/ap index db0b8ffac..c892b5f55 100644 --- a/locale/de/ap +++ b/locale/de/ap @@ -85,6 +85,7 @@ $self->{texts} = { 'Memo' => 'Memo', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'Missing amount' => 'Fehlbetrag', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'Name' => 'Name', 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', diff --git a/locale/de/ar b/locale/de/ar index 2b8752fde..eb79d7199 100644 --- a/locale/de/ar +++ b/locale/de/ar @@ -90,6 +90,7 @@ $self->{texts} = { 'Memo' => 'Memo', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'Missing amount' => 'Fehlbetrag', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'Name' => 'Name', 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', diff --git a/locale/de/ir b/locale/de/ir index 15f8b0763..98834e51c 100644 --- a/locale/de/ir +++ b/locale/de/ir @@ -101,6 +101,7 @@ $self->{texts} = { 'Memo' => 'Memo', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'Missing amount' => 'Fehlbetrag', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'Name' => 'Name', 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', diff --git a/locale/de/is b/locale/de/is index eec545501..9bc49e2df 100644 --- a/locale/de/is +++ b/locale/de/is @@ -118,6 +118,7 @@ $self->{texts} = { 'Memo' => 'Memo', 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'Missing amount' => 'Fehlbetrag', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'Name' => 'Name', 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', -- 2.20.1