X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdn.pl;h=52ed58b18dc67143ce90f68d109feabe99c270b9;hb=eebe8e90991eacadb6fbd20a648c152017a620c7;hp=01658ab10edf0dc9b0b56868ee5f6768707e4425;hpb=891f62176912eb5c1e8864a1140635e4ad533d08;p=kivitendo-erp.git diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 01658ab10..52ed58b18 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -251,7 +251,8 @@ sub save_dunning { $form->{language_id} = $saved_language_id; - if($form->{DUNNING_PDFS}) { + if (scalar @{ $form->{DUNNING_PDFS} }) { + $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1; DN->melt_pdfs(\%myconfig, $form, $form->{copies}); } @@ -297,7 +298,7 @@ sub search { $form->get_lists("customers" => "ALL_CUSTOMERS", "departments" => "ALL_DEPARTMENTS"); - $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); DN->get_config(\%myconfig, \%$form); @@ -498,6 +499,7 @@ sub print_multiple { if (!$form->{force_lang}) { $form->{language_id} = $language_ids[$i]; } + $form->{dunning_id} = $dunning_id; DN->print_invoice_for_fees(\%myconfig, $form, $dunning_id); DN->print_dunning(\%myconfig, $form, $dunning_id); $i++; @@ -505,7 +507,7 @@ sub print_multiple { $form->{language_id} = $saved_language_id; if (scalar @{ $form->{DUNNING_PDFS} }) { - $form->{dunning_id} = strftime("%Y%m%d", localtime time); + $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1; DN->melt_pdfs(\%myconfig, $form, $form->{copies}); if ($form->{media} eq 'printer') {