X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdn.pl;h=52ed58b18dc67143ce90f68d109feabe99c270b9;hb=f087c3736d8c707c18cb3ea87692995940361057;hp=c9ce8a76e6933d59ef7757d3b0928925a9ffa80a;hpb=7ff0d2ab41abd45fa1d45e6401a3f33c1ebddecd;p=kivitendo-erp.git diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index c9ce8a76e..52ed58b18 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -105,8 +105,6 @@ sub add { $form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} || [] }; $form->{title} = $locale->text('Start Dunning Process'); - $form->{jsscript} = 1; - $::request->{layout}->focus('#customer'); $form->header(); print $form->parse_html_template("dunning/add"); @@ -144,7 +142,6 @@ sub show_invoices { $form->{type} = 'dunning'; $form->{rowcount} = scalar @{ $form->{DUNNINGS} }; - $form->{jsscript} = 1; $form->{callback} ||= build_std_url("action=show_invoices", qw(customer invnumber ordnumber groupinvoices minamount dunning_level notes)); $form->{PRINT_OPTIONS} = print_options('inline' => 1, @@ -153,7 +150,6 @@ sub show_invoices { 'no_html' => 1, 'no_opendocument' => 1,); - $::request->layout->use_javascript('jquery.checkall.js'); $form->header(); print $form->parse_html_template("dunning/show_invoices"); @@ -255,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}); } @@ -301,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); @@ -309,9 +306,7 @@ sub search { $form->{SHOW_DEPARTMENT_DDBOX} = scalar @{ $form->{ALL_CUSTOMERS} }; $form->{SHOW_DUNNING_LEVELS} = scalar @{ $form->{DUNNING} }; - $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); - $::request->{layout}->focus('#customer'); $form->header(); @@ -504,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++; @@ -511,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') {