From bd32b6070b6d73d60cb8df4a2425d0c711a96615 Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Thu, 14 Dec 2006 16:03:00 +0000
Subject: [PATCH] =?utf8?q?Problem=20bei=20der=20Formatierung=20von=20Zahlu?=
=?utf8?q?ngseing=C3=A4ngen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
---
bin/mozilla/ir.pl | 8 +++++---
bin/mozilla/is.pl | 10 ++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index 401f56af9..541eb6c06 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -685,8 +685,10 @@ sub form_footer {
s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/;
# format amounts
- $form->{"paid_$i"} =
- $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ if ($form->{"paid_$i"}) {
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ }
$form->{"exchangerate_$i"} =
$form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
@@ -927,7 +929,7 @@ sub storno {
sub post_payment {
$lxdebug->enter_sub();
for $i (1 .. $form->{paidaccounts}) {
- if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
+ if ($form->{"paid_$i"}) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl
index 6b0041853..52e668233 100644
--- a/bin/mozilla/is.pl
+++ b/bin/mozilla/is.pl
@@ -1014,8 +1014,10 @@ if ($form->{type} eq "credit_note") {
# format amounts
$totalpaid += $form->{"paid_$i"};
- $form->{"paid_$i"} =
- $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ if ($form->{"paid_$i"}) {
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ }
$form->{"exchangerate_$i"} =
$form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
@@ -1179,7 +1181,7 @@ sub update {
)));
for $i (1 .. $form->{paidaccounts}) {
- if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
+ if ($form->{"paid_$i"}) {
map {
$form->{"${_}_$i"} =
$form->parse_amount(\%myconfig, $form->{"${_}_$i"})
@@ -1323,7 +1325,7 @@ sub update {
sub post_payment {
$lxdebug->enter_sub();
for $i (1 .. $form->{paidaccounts}) {
- if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
+ if ($form->{"paid_$i"}) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
--
2.20.1