X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=c9624ccb3035b25ea14f1f0406e0195a006a8f68;hb=e06a7e08648363ef8c8ef14678ab853ae7bdd670;hp=1d3e1a248d5d41070466f96beeeb71e83abe72a7;hpb=a6b1f97a0c7a9a5c489aa24d1d91bca332f2b500;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 1d3e1a248..c9624ccb3 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -32,10 +32,13 @@ #====================================================================== use SL::IR; +use SL::IS; use SL::PE; -require "$form->{path}/io.pl"; -require "$form->{path}/arap.pl"; +require "bin/mozilla/io.pl"; +require "bin/mozilla/arap.pl"; +require "bin/mozilla/common.pl"; +require "bin/mozilla/drafts.pl"; 1; @@ -44,6 +47,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 +60,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; @@ -69,10 +78,8 @@ sub invoice_links { $lxdebug->enter_sub(); # create links - $form->{webdav} = $webdav; - - # set jscalendar - $form->{jscalendar} = $jscalendar; + $form->{webdav} = $webdav; + $form->{jsscript} = 1; $form->create_links("AP", \%myconfig, "vendor"); @@ -111,11 +118,6 @@ sub invoice_links { $form->{taxzone_id} = $taxzone_id; } - # currencies - @curr = split /:/, $form->{currencies}; - chomp $curr[0]; - $form->{defaultcurrency} = $curr[0]; - map { $form->{selectcurrency} .= ""; - } else { - $form->{selecttaxzone} .= - ""; - } + my $contact; + if (scalar @values > 1) { + $contact = qq| + + | . $locale->text('Contact Person') . qq| + | . + NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, '-style' => 'width: 250px', + '-labels' => \%labels, '-default' => $form->{"cp_id"})) + . qq| + + |; + } - } - } else { - $form->{selecttaxzone} =~ s/ selected//g; - if ($form->{taxzone_id} ne "") { - $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/; - } + %labels = (); + @values = (""); + foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { + push(@values, $item->{"id"}); + $labels{$item->{"id"}} = $item->{"projectnumber"}; } - if ($form->{rowcount} >1) { - $form->{selecttaxzone} =~ /