X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=284b2fe5d4fe2f105105d107371fa457d99877b5;hb=2fda509c7dc417aad28ed072e91e8ffe2396314d;hp=9f40930e8ed7255f2585fe0102d8b7fcc2f4868b;hpb=01a6bf1b55f003fb6f15a70acf51d3e921af7244;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 9f40930e8..284b2fe5d 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -223,7 +223,7 @@ sub form_header { $lxdebug->enter_sub(); # set option selected - foreach $item (qw(AP vendor currency department)) { + foreach $item (qw(AP vendor currency department employee)) { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; @@ -275,7 +275,9 @@ sub form_header { "all" => 0, "old_id" => \@old_project_ids }, "taxzones" => "ALL_TAXZONES", - "currencies" => "ALL_CURRENCIES"); + "employees" => "ALL_SALESMEN", + "currencies" => "ALL_CURRENCIES", + "vendors" => "ALL_VENDORS"); my %labels; my @values = (undef); @@ -316,7 +318,38 @@ sub form_header { '-values' => \@values, '-labels' => \%labels)) . qq| |; + + %labels = (); + @values = (); + my $i = 0; + foreach my $item (@{ $form->{"ALL_SALESMEN"} }) { + push(@values, $item->{"id"}); + $labels{$item->{"id"}} = $item->{"name"}; + } + my $employees = qq| + + | . $locale->text('Employee') . qq| + | . + NTI($cgi->popup_menu('-name' => 'employee', '-default' => $form->{"employee"}, + '-values' => \@values, '-labels' => \%labels)) . qq| + + |; + %labels = (); + @values = (); + my $i = 0; + foreach my $item (@{ $form->{"ALL_VENDORS"} }) { + push(@values, $item->{name}.qq|--|.$item->{"id"}); + $labels{$item->{"id"}} = $item->{"name"}.qq|--|.$item->{"id"}; + } + my $vendors = qq| + | . $locale->text('Vendor') . qq| + | . + NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{"vendor"}, + '-onChange' => 'document.getElementById(\'update_button\').click();', + '-values' => \@values, '-labels' => \%labels)) . qq| + |; + %labels = (); @values = (); foreach my $item (@{ $form->{"ALL_TAXZONES"} }) { @@ -345,19 +378,11 @@ sub form_header { |; } - $vendor = - ($form->{selectvendor}) - ? qq|\n| - : qq||; - $department = qq| | . $locale->text('Department') . qq| - - + + | if $form->{selectdepartment}; @@ -441,20 +466,18 @@ onchange="document.getElementById('update_button').click();">| . - - - + $vendors - {vendor_id}> - - + + + - + - - - + + + $taxzone $department @@ -480,7 +503,8 @@ onchange="document.getElementById('update_button').click();">| .
| . $locale->text('Vendor') . qq|$vendor| . $locale->text('Contact Person') . qq| $contact
+ @@ -464,11 +487,11 @@ onchange="document.getElementById('update_button').click();">| .
| . $locale->text('Credit Limit') . qq|$form->{creditremaining}
-
| . $locale->text('Record in') . qq|| . $locale->text('Record in') . qq|
- + $employees + @@ -663,7 +687,7 @@ sub form_footer {
| . $locale->text('Invoice Number') . qq|
$subtotal $tax - 0 +
| . $locale->text('Total') . qq| $form->{invtotal}