X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=d218ff6abced12df33ae5033f82973d887b42de8;hb=f5ab83507b71d551147835d84ec8317afd2842e9;hp=e7b36efc04d6b0e78e967128adca147350c0ded1;hpb=547401680ef809e57fcf15e66cf8430c0bdd4cfe;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e7b36efc0..d218ff6ab 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -471,7 +471,7 @@ selectcustomer}| $form->{fokus} = "arledger.customer"; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -500,6 +500,10 @@ selectcustomer}| qq|
| . $locale->text('Customer') . qq| | -$customer | +$customer | @@ -1015,7 +1019,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!')); @@ -1052,9 +1056,17 @@ sub post { $closedto = $form->datetonum($form->{closedto}, \%myconfig); $transdate = $form->datetonum($form->{transdate}, \%myconfig); + $form->error($locale->text('Cannot post transaction for a closed period!')) if ($transdate <= $closedto); - $form->error($locale->text('Cannot post transaction for a closed period!')) - if ($transdate <= $closedto); + my $zero_amount_posting = 1; + for $i (1 .. $form->{rowcount}) { + if ($form->parse_amount(\%myconfig, $form->{"amount_$i"})) { + $zero_amount_posting = 0; + last; + } + } + + $form->error($locale->text('Zero amount posting!')) if $zero_amount_posting; $form->isblank("exchangerate", $locale->text('Exchangerate missing!')) if ($form->{currency} ne $form->{defaultcurrency}); @@ -1224,7 +1236,7 @@ sub search { $form->{javascript} .= qq||; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -1295,6 +1307,10 @@ sub search {| . $locale->text('Order Number') . qq| | |||||||
---|---|---|---|---|---|---|---|---|---|---|
| . $locale->text('Transaction description') . qq| | ++ | |||||||||
| . $locale->text('Notes') . qq| | @@ -1371,6 +1387,8 @@ sub search { | | . $locale->text('Subtotal') . qq| | | . $locale->text('Project Number') . qq| | ++ | | . $locale->text('Transaction description') . qq| |