X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=d341ffdfc89855cc80c9f3f9e5b8622b32fad9b8;hb=f8138d1721521673da949aeac440011dfe0a22c8;hp=58c9a73aa77440df3fa150e96b7d468bce7f04a7;hpb=8c7e44938a661e035f62840e1e177353240ace5d;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 58c9a73aa..d341ffdfc 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -579,13 +579,8 @@ sub update { } } - $form->{exchangerate} = $exchangerate - if ( - $form->{forex} = ( - $exchangerate = - $form->check_exchangerate( - \%myconfig, $form->{currency}, $form->{datepaid}, $buysell - ))); + $form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{datepaid}, $buysell); + $form->{exchangerate} = $form->{forex} if $form->{forex}; $amount = $form->{amount} = $form->parse_amount(\%myconfig, $form->{amount}); @@ -784,7 +779,7 @@ sub check_form { $datepaid = $form->datetonum($form->{datepaid}, \%myconfig); $form->error($locale->text('Cannot process payment for a closed period!')) - if ($datepaid <= $closedto); + if ($form->date_closed($form->{"datepaid"}, \%myconfig)); $amount = $form->parse_amount(\%myconfig, $form->{amount}); $form->{amount} = $amount;