X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=141233d94c94735f3f1efbec418441508cfc4bcc;hb=0550e83adcd91851e9db324b4228d17a58895c26;hp=3c809b3026053f8591f568a6c3e17ac7ac2737e6;hpb=56f7991d4910ae12c7d16aab025a2ab242ca5eeb;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 3c809b302..141233d94 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -704,6 +704,14 @@ sub show_generic_error { return; } + if ($::request->is_ajax) { + $::lxdebug->message(0, "trying to render AJAX response..."); + SL::ClientJS->new + ->error($error) + ->render(SL::Controller::Base->new); + ::end_of_request(); + } + my $add_params = { 'title_error' => $params{title}, 'label_error' => $error, @@ -923,6 +931,11 @@ sub parse_amount { my ($self, $myconfig, $amount) = @_; + if (!defined($amount) || ($amount eq '')) { + $main::lxdebug->leave_sub(2); + return 0; + } + if ( ($myconfig->{numberformat} eq '1.000,00') || ($myconfig->{numberformat} eq '1000,00')) { $amount =~ s/\.//g;