X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=844f694d93ae5b060307845ecb27d9b911df3559;hb=5f3f953a9ccd519fbe329d65a49239271b1b520d;hp=cd4591d26d152cc64adb58dc1be5666ca5bce3a0;hpb=43e56b936a7b6f799bac548de484b2881428f9f5;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index cd4591d26..844f694d9 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -283,8 +283,7 @@ sub form_header { my @old_project_ids = ($form->{"globalproject_id"}); map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; - $form->get_lists("shipto" => "ALL_SHIPTO", - "projects" => { "key" => "ALL_PROJECTS", + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, "taxzones" => "ALL_TAXZONES", @@ -317,7 +316,8 @@ sub form_header { my @values = map { $_ } @{ $form->{ALL_CURRENCIES} }; my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; - $TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; + # show_exchangerate is also later needed in another template + $form->{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; $TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, '-values' => \@values, '-labels' => \%labels, '-onchange' => "document.getElementById('update_button').click();" @@ -575,6 +575,9 @@ sub storno { $form->error($locale->text("Invoice has already been storno'd!")); } + $form->error($locale->text('Cannot post storno for a closed period!')) + if ( $form->date_closed($form->{invdate}, \%myconfig)); + my $employee_id = $form->{employee_id}; invoice_links(); prepare_invoice();