X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Foe.pl;h=32fe7a11fb6d7402a5dd1dd248f435f13dab1b72;hb=f06a2509037f88f8361d989b1bc638665c367558;hp=5cc5418d6e4b74d3ed5fb7247fed470748190a47;hpb=52983c089cf1b4f1a4451e57ffa76f846c4791ba;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 5cc5418d6..32fe7a11f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -403,12 +403,13 @@ sub form_header { "all" => 0, "old_id" => \@old_project_ids }, - "employees" => "ALL_EMPLOYEES", - "salesmen" => "ALL_SALESMEN", - "taxzones" => "ALL_TAXZONES", - "payments" => "ALL_PAYMENTS", - "currencies" => "ALL_CURRENCIES", - $vc => "ALL_" . uc($vc)); + "employees" => "ALL_EMPLOYEES", + "salesmen" => "ALL_SALESMEN", + "taxzones" => "ALL_TAXZONES", + "payments" => "ALL_PAYMENTS", + "currencies" => "ALL_CURRENCIES", + $vc => "ALL_" . uc($vc), + "price_factors" => "ALL_PRICE_FACTORS"); my %labels; my @values = (undef); @@ -452,6 +453,10 @@ sub form_header { {vc}"}) . qq|">|; + if ($form->{vc} eq 'customer') { + $vc .= qq||; + } + %labels = (); @values = (""); foreach my $item (@{ $form->{"ALL_PAYMENTS"} }) { @@ -686,12 +691,6 @@ sub form_header { | if $form->{selectdepartment}; - if ($form->{type} eq 'sales_order') { - $employee .= qq|\n| if $form->{selectemployee}; - } else { - $employee .= qq|\n|; - } - $credittext = $locale->text('Credit Limit exceeded!!!'); $onload = ($form->{resubmit} && ($form->{format} eq "html")) ? "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';document.oe.submit()" @@ -1162,6 +1161,8 @@ sub update { map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] }; $form->{payment_id} = $form->{"part_payment_id_$i"} if $form->{"part_payment_id_$i"} ne ""; + $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor}; + ($sellprice || $form->{"sellprice_$i"}) =~ /\.(\d+)/; $decimalplaces = max 2, length $1; @@ -1304,10 +1305,12 @@ sub search { my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", - "all" => 1 }, + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + "all" => 1 }, "employees" => "ALL_EMPLOYEES", - $vc => "ALL_" . uc($vc)); + "salesmen" => "ALL_SALESMEN", + $vc => "ALL_" . uc($vc) + ); my %labels = (); my @values = (""); @@ -1326,6 +1329,14 @@ sub search { push(@values, $item->{"id"}); $labels{$item->{"id"}} = $item->{"name"} ne "" ? $item->{"name"} : $item->{"login"}; } + + #salesmen + my %labels_salesmen = (); + my @values_salesmen = (''); + foreach my $item (@{ $form->{"ALL_SALESMEN"} }) { + push(@values_salesmen, $item->{"id"}); + $labels_salesmen{$item->{"id"}} = $item->{"name"} ne "" ? $item->{"name"} : $item->{"login"}; + } my $employee_block = qq| @@ -1335,6 +1346,14 @@ sub search { '-values' => \@values, '-labels' => \%labels)) . qq| + + + | . $locale->text('Salesman') . qq| + | . + NTI($cgi->popup_menu('-name' => 'salesman_id', + '-values' => \@values_salesmen, + '-labels' => \%labels_salesmen)) . qq| + |; %labels = (); @@ -1417,6 +1436,7 @@ sub search { $vc_label $employee + | . $locale->text('Ship via') . qq| @@ -1443,6 +1463,8 @@ sub search { | . $locale->text('Subtotal') . qq| + | + . $locale->text('Salesman') . qq| @@ -1510,6 +1532,7 @@ sub orders { "name", "netamount", "tax", "amount", "curr", "employee", + "salesman", "shipvia", "globalprojectnumber", "transaction_description", "open", "delivered", "marge_total", "marge_percent" @@ -1548,7 +1571,7 @@ sub orders { my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber - transaction_description transdatefrom transdateto type vc employee_id); + transaction_description transdatefrom transdateto type vc employee_id salesman_id); my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); @@ -1564,7 +1587,8 @@ sub orders { 'tax' => { 'text' => $locale->text('Tax'), }, 'amount' => { 'text' => $locale->text('Total'), }, 'curr' => { 'text' => $locale->text('Curr'), }, - 'employee' => { 'text' => $locale->text('Salesperson'), }, + 'employee' => { 'text' => $locale->text('Employee'), }, + 'salesman' => { 'text' => $locale->text('Salesman'), }, 'shipvia' => { 'text' => $locale->text('Ship via'), }, 'globalprojectnumber' => { 'text' => $locale->text('Project Number'), }, 'transaction_description' => { 'text' => $locale->text('Transaction description'), }, @@ -1574,7 +1598,7 @@ sub orders { 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), } ); - foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee shipvia)) { + foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia)) { $column_defs{$name}->{link} = $href . "&sort=$name"; }