X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdn.pl;h=e9df309444a5e377cbfdc52fb3920f87f0d6c7be;hb=37cb653c8bef030af04998cf384b4bb2fe8d0404;hp=4b6210ba4bb0427b78e41f4fe2ad465be60724ee;hpb=854a9820edf79b7fdea4890f8802039836ab94c8;p=kivitendo-erp.git diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 4b6210ba4..e9df30944 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -106,7 +106,7 @@ sub add { $form->{title} = $locale->text('Start Dunning Process'); $form->{jsscript} = 1; - $form->{fokus} = "search.customer"; + $::request->{layout}->focus('#customer'); $form->header(); print $form->parse_html_template("dunning/add"); @@ -135,7 +135,7 @@ sub show_invoices { map { $row->{$_} = $form->format_amount(\%myconfig, $row->{$_} * 1, -2) } qw(amount open_amount fee interest); if ($row->{'language_id'}) { - $row->{language} = SL::DB::Manager::Language->find_by('id' => $row->{'language_id'})->{'description'}; + $row->{language} = SL::DB::Manager::Language->find_by_or_create('id' => $row->{'language_id'})->{'description'}; } } @@ -154,8 +154,6 @@ sub show_invoices { 'no_opendocument' => 1,); $form->header(); - $form->{onload} = "document.getElementsByName('language_id')[0].disabled = - !document.getElementsByName('force_lang')[0].checked;"; print $form->parse_html_template("dunning/show_invoices"); $main::lxdebug->leave_sub(); @@ -285,7 +283,7 @@ sub set_email { $main::auth->assert('dunning_edit'); $form->{"title"} = $locale->text("Set eMail text"); - $form->header(); + $form->header(no_layout => 1); print($form->parse_html_template("dunning/set_email")); $main::lxdebug->leave_sub(); @@ -301,8 +299,8 @@ sub search { $main::auth->assert('dunning_edit'); $form->get_lists("customers" => "ALL_CUSTOMERS", - "departments" => "ALL_DEPARTMENTS", - "salesmen" => "ALL_SALESMEN"); + "departments" => "ALL_DEPARTMENTS"); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); DN->get_config(\%myconfig, \%$form); @@ -312,15 +310,10 @@ sub search { $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); - $form->{fokus} = "search.customer"; - $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; + $::request->{layout}->focus('#customer'); $form->header(); - $form->{onload} = qq|focus()| - . qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')| - . qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; - print $form->parse_html_template("dunning/search"); $main::lxdebug->leave_sub(); @@ -461,8 +454,6 @@ sub show_dunning { $report->set_options_from_form(); - $form->{onload} = "document.getElementsByName('language_id')[0].disabled = - !document.getElementsByName('force_lang')[0].checked;"; $report->generate_with_headers(); $main::lxdebug->leave_sub();