X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=1515fa450dda1133dbb539fac95b397fc21d04a2;hb=1b3fe156b5ddfd588c1e55af5e21a36e84d9caf8;hp=b5df7f32df1c746554fa678a6f6f5c2fac933942;hpb=a14a3ff56b00e22c39a2cfb0e465f8c7764a4cd4;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index b5df7f32d..1515fa450 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -36,6 +36,8 @@ use SL::PE; require "$form->{path}/io.pl"; require "$form->{path}/arap.pl"; +require "$form->{path}/common.pl"; +require "bin/mozilla/drafts.pl"; 1; @@ -44,6 +46,8 @@ require "$form->{path}/arap.pl"; sub add { $lxdebug->enter_sub(); + return $lxdebug->leave_sub() if (load_draft_maybe()); + $form->{title} = $locale->text('Add Vendor Invoice'); &invoice_links; @@ -55,7 +59,11 @@ sub add { sub edit { $lxdebug->enter_sub(); - + + # show history button + $form->{javascript} = qq||; + #/show hhistory button + $form->{title} = $locale->text('Edit Vendor Invoice'); &invoice_links; @@ -219,7 +227,7 @@ sub form_header { $lxdebug->enter_sub(); # set option selected - foreach $item (qw(AP vendor currency department contact)) { + foreach $item (qw(AP vendor currency department)) { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; @@ -239,20 +247,6 @@ sub form_header { $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); - #build contacts - if ($form->{all_contacts}) { - - $form->{selectcontact} = ""; - foreach $item (@{ $form->{all_contacts} }) { - if ($form->{cp_id} == $item->{cp_id}) { - $form->{selectcontact} .= - "