X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=77f911d1694070298505aea6f906317d6a89aa77;hb=3da2dca2e601b311b6e464ffff02bfe98a7024d1;hp=541eb6c06b18980214c6c41ed8157e45d1ca3228;hpb=bd32b6070b6d73d60cb8df4a2425d0c711a96615;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 541eb6c06..77f911d16 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; @@ -43,6 +46,9 @@ require "$form->{path}/arap.pl"; sub add { $lxdebug->enter_sub(); + $form->{"Watchdog::invdate,duedate,vendor,vendor_id"} = 1; + + return $lxdebug->leave_sub() if (load_draft_maybe()); $form->{title} = $locale->text('Add Vendor Invoice'); @@ -55,7 +61,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 +79,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,22 +119,10 @@ 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} =~ /