From: Moritz Bunkus Date: Thu, 14 Dec 2006 15:16:22 +0000 (+0000) Subject: An einigen Stellen (z.B. beim Erfassen von Zahlungsausgängen und -eingängen) wird... X-Git-Tag: release-2.4.0^2~29 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=04a2f2e779fabb1faa836937504d4ce8bf906a06;p=kivitendo-erp.git An einigen Stellen (z.B. beim Erfassen von Zahlungsausgängen und -eingängen) wird überprüft, ob eine Zeile leer ist, indem der Betrag überprüft wird. Das muss aber mit "$form->parse_amount() geschehen, weil ein simples "if ($form->{feldname})" auch dann wahr ist, wenn die Zahl "0,00" ist. Fix für Bugzilla #457. --- diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 4f1712b26..9cc84e7fe 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -844,7 +844,7 @@ sub update { ($form->{taxincluded}) ? $form->{invtotal} : $form->{invtotal} + $totaltax; for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) @@ -892,7 +892,7 @@ sub post { delete($form->{AP}); for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); $form->isblank("datepaid_$i", $locale->text('Payment date missing!')); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e867d8916..e2fcac3a6 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -868,7 +868,7 @@ sub update { ($form->{taxincluded}) ? $form->{invtotal} : $form->{invtotal} + $totaltax; for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) @@ -917,7 +917,7 @@ sub post { delete($form->{AR}); for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); $form->isblank("datepaid_$i", $locale->text('Payment date missing!')); diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index ce4174742..f5e2805a3 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -762,7 +762,7 @@ sub check_form { $form->{amount} = $amount; for $i (1 .. $form->{rowcount}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { $amount -= $form->parse_amount($myconfig, $form->{"paid_$i"}); push(@{ $form->{paid} }, $form->{"paid_$i"}); diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 1f7d34682..401f56af9 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -927,7 +927,7 @@ sub storno { sub post_payment { $lxdebug->enter_sub(); for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $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 1be623fe8..6b0041853 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1179,7 +1179,7 @@ sub update { ))); for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) @@ -1323,7 +1323,7 @@ sub update { sub post_payment { $lxdebug->enter_sub(); for $i (1 .. $form->{paidaccounts}) { - if ($form->{"paid_$i"}) { + if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); $form->isblank("datepaid_$i", $locale->text('Payment date missing!'));