X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=e94bb386e11dc1f8fd65baf04aeb870b6910a8ab;hb=fec0904532e2136a1a769f568c351f4875257d56;hp=6ecad007837f259eac22ab135fea1396136b7a33;hpb=01a6bf1b55f003fb6f15a70acf51d3e921af7244;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 6ecad0078..e94bb386e 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -170,9 +170,8 @@ sub invoice_links { $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; if (@{ $form->{all_customer} }) { - $form->{customer} = "$form->{customer}--$form->{customer_id}"; - map { $form->{selectcustomer} .= "\n" } - (@{ $form->{all_customer} }); + $form->{customer} = "$form->{customer}--$form->{customer_id}"; + $form->{selectcustomer} = "$form->{customer}--$form->{customer_id}"; } # departments @@ -188,13 +187,6 @@ sub invoice_links { $form->{employee} = "$form->{employee}--$form->{employee_id}"; - # sales staff - if ($form->{all_employees}) { - $form->{selectemployee} = ""; - map { $form->{selectemployee} .= "\n" } - (@{ $form->{all_employees} }); - } - # forex $form->{forex} = $form->{exchangerate}; $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1; @@ -338,7 +330,8 @@ sub form_header { "old_id" => \@old_project_ids }, "employees" => "ALL_SALESMEN", "taxzones" => "ALL_TAXZONES", - "currencies" => "ALL_CURRENCIES"); + "currencies" => "ALL_CURRENCIES", + "customers" => "ALL_CUSTOMERS"); my %labels; my @values = (undef); @@ -351,6 +344,40 @@ sub form_header { NTI($cgi->popup_menu('-name' => 'cp_id', '-values' => \@values, '-labels' => \%labels, '-default' => $form->{"cp_id"})); + %labels = (); + @values = (); + 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_id"}, + '-values' => \@values, '-labels' => \%labels)) . qq| + + |; + + + %labels = (); + @values = (); + foreach my $item (@{ $form->{"ALL_CUSTOMERS"} }) { + push(@values, $item->{name}.qq|--|.$item->{"id"}); + $labels{$item->{"id"}} = $item->{name}.qq|--|.$item->{"id"}; + } + + my $customers = qq| + | . $locale->text('Customer') . qq| + | . + (($myconfig{vclimit} == 1 ) + ? qq|| + : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, + '-onChange' => 'document.getElementById(\'update_button\').click();', + '-values' => \@values, '-labels' => \%labels)))) . qq| + |; + %labels = (); @values = (""); foreach my $item (@{ $form->{"ALL_SHIPTO"} }) { @@ -483,14 +510,6 @@ sub form_header { |; - $customer = - ($form->{selectcustomer}) - ? qq|\n| - : qq||; - $department = qq| | . $locale->text('Department') . qq| @@ -653,11 +672,11 @@ print qq| - - + $customers - + + @@ -700,7 +719,11 @@ print qq| - |; + + + + + |; # #
| . $locale->text('Customer') . qq|$customer | . $locale->text('Contact Person') . qq| $contact
| . $locale->text('Ship via') . qq|
| . $locale->text('Transaction description') . qq|| . $cgi->textfield("-name" => "transaction_description", "-size" => 35, "-value" => $form->{transaction_description}) . qq|
# @@ -725,12 +748,7 @@ print qq|
- - - - - - + $employees $salesman |; if ($form->{type} eq "credit_note") { @@ -831,13 +849,13 @@ sub form_footer { qq||; $intnotes = qq||; - - $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; + + $form->{taxincluded} = ($form->{taxincluded} ? "checked" : ""); $taxincluded = ""; if ($form->{taxaccounts}) { $taxincluded = qq| - {taxincluded}> | + {taxincluded}> | . $locale->text('Tax Included') . qq|

|; } @@ -1194,10 +1212,19 @@ sub update { $form->{print_and_post} = 0; } + + if($form->{taxincluded}) { + $taxincluded = "checked"; + } $form->{update} = 1; &check_name(customer); + if(!$form->{taxincluded}) { + $form->{taxincluded} = $taxincluded; + } + + $form->{exchangerate} = $exchangerate if ( $form->{forex} = (
| . $locale->text('Employee') . qq|