X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=1c1135c2f66384ffbbea382c86bb56bfa4d8ca05;hb=4ea30430310b49dac2c5a02dfeb3ec0f88f9cdee;hp=dc47d27faa6dcc7c6592dee1c2402e316d568431;hpb=fd46658a84285780440f56f3a4cd3dbd3fa25c7c;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index dc47d27fa..1c1135c2f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -48,6 +48,7 @@ use List::Util qw(min max reduce sum); use Data::Dumper; use SL::DB::Customer; +use SL::DB::TaxZone; require "bin/mozilla/io.pl"; require "bin/mozilla/arap.pl"; @@ -442,7 +443,7 @@ sub form_header { shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus), @custom_hiddens, - map { $_.'_rate', $_.'_description' } split / /, $form->{taxaccounts} ]; # deleted: discount + map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ]; # deleted: discount %TMPL_VAR = ( %TMPL_VAR, @@ -722,7 +723,8 @@ sub search { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, "departments" => "ALL_DEPARTMENTS", "$form->{vc}s" => "ALL_VC", - "business_types" => "ALL_BUSINESS_TYPES"); + "taxzones" => "ALL_TAXZONES", + "business_types" => "ALL_BUSINESS_TYPES",); $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); # constants and subs for template @@ -792,7 +794,8 @@ sub orders { "delivered", "periodic_invoices", "marge_total", "marge_percent", "vcnumber", "ustid", - "country", + "country", "shippingpoint", + "taxzone", ); # only show checkboxes if gotten here via sales_order form. @@ -831,9 +834,12 @@ sub orders { 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 salesman_id reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive - business_id); + business_id shippingpoint taxzone_id); - my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); + my @keys_for_url = grep { $form->{$_} } @hidden_variables; + push @keys_for_url, 'taxzone_id' if $form->{taxzone_id} ne ''; # taxzone_id could be 0 + + my $href = build_std_url('action=orders', @keys_for_url); my %column_defs = ( 'ids' => { 'text' => '', }, @@ -861,9 +867,11 @@ sub orders { 'country' => { 'text' => $locale->text('Country'), }, 'ustid' => { 'text' => $locale->text('USt-IdNr.'), }, 'periodic_invoices' => { 'text' => $locale->text('Per. Inv.'), }, + 'shippingpoint' => { 'text' => $locale->text('Shipping Point'), }, + 'taxzone' => { 'text' => $locale->text('Steuersatz'), }, ); - foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description)) { + foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } @@ -888,6 +896,7 @@ sub orders { push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes}; push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; + push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}" if $form->{shippingpoint}; if ( $form->{transdatefrom} or $form->{transdateto} ) { push @options, $locale->text('Order Date'); push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom}; @@ -902,12 +911,15 @@ sub orders { push @options, $locale->text('Closed') if $form->{closed}; push @options, $locale->text('Delivery Order created') if $form->{delivered}; push @options, $locale->text('Not delivered') if $form->{notdelivered}; - push @options, $locale->text('Periodic invoices active') if $form->{periodic_invoices_actibe}; + push @options, $locale->text('Periodic invoices active') if $form->{periodic_invoices_active}; if ($form->{business_id}) { my $vc_type_label = $form->{vc} eq 'customer' ? $locale->text('Customer type') : $locale->text('Vendor type'); push @options, $vc_type_label . " : " . SL::DB::Business->new(id => $form->{business_id})->load->description; } + if ($form->{taxzone_id} ne '') { # taxzone_id could be 0 + push @options, $locale->text('Steuersatz') . " : " . SL::DB::TaxZone->new(id => $form->{taxzone_id})->load->description; + } $report->set_options('top_info_text' => join("\n", @options), 'raw_top_info_text' => $form->parse_html_template('oe/orders_top'),