X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5f8a4fc5783f6533add3015efc446574d9d8e96d..53d15b75d74b5db63bd41be18be774ecd26d9451:/SL/DN.pm diff --git a/SL/DN.pm b/SL/DN.pm index 5dd6fe918..69db0053f 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -292,6 +292,10 @@ sub save_dunning { $main::lxdebug->enter_sub(); my $rc = SL::DB->client->with_transaction(\&_save_dunning, $self, $myconfig, $form, $rows); + + if (!$rc) { + die SL::DB->client->error + } $::lxdebug->leave_sub; return $rc; @@ -471,11 +475,11 @@ sub set_template_options { # prepare meta information for template introspection $form->{template_meta} = { formname => $form->{formname}, - language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id}), + language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id} || undef), format => $form->{format}, media => $form->{media}, extension => $extension, - printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id}), + printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id} || undef), today => DateTime->today, };