From: Moritz Bunkus Date: Tue, 18 Feb 2014 14:11:50 +0000 (+0100) Subject: Berichte OE: Bestellnummer des Kunden anzeigen/danach filtern X-Git-Tag: release-3.2.0beta~490^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b96c67e59f27fc63fc38ce6aa38f174470803fcb;p=kivitendo-erp.git Berichte OE: Bestellnummer des Kunden anzeigen/danach filtern --- diff --git a/SL/OE.pm b/SL/OE.pm index 3d92746b5..a6b9a9c52 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -83,7 +83,7 @@ sub transactions { $query = qq|SELECT o.id, o.ordnumber, o.transdate, o.reqdate, | . qq| o.amount, ct.${vc}number, ct.name, o.netamount, o.${vc}_id, o.globalproject_id, | . - qq| o.closed, o.delivered, o.quonumber, o.shippingpoint, o.shipvia, | . + qq| o.closed, o.delivered, o.quonumber, o.cusordnumber, o.shippingpoint, o.shipvia, | . qq| o.transaction_description, | . qq| o.marge_total, o.marge_percent, | . qq| ex.$rate AS exchangerate, | . @@ -175,6 +175,11 @@ SQL push(@values, '%' . $form->{$ordnumber} . '%'); } + if ($form->{cusordnumber}) { + $query .= qq| AND o.cusordnumber ILIKE ?|; + push(@values, '%' . $form->{cusordnumber} . '%'); + } + if($form->{transdatefrom}) { $query .= qq| AND o.transdate >= ?|; push(@values, conv_date($form->{transdatefrom})); @@ -222,6 +227,7 @@ SQL "reqdate" => "o.reqdate", "id" => "o.id", "ordnumber" => "o.ordnumber", + "cusordnumber" => "o.cusordnumber", "quonumber" => "o.quonumber", "name" => "ct.name", "employee" => "e.name", diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ad6097ce4..619ae9f7d 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -787,7 +787,7 @@ sub orders { my @columns = ( "transdate", "reqdate", "id", $ordnumber, - "customernumber", + "cusordnumber", "customernumber", "name", "netamount", "tax", "amount", "curr", "employee", @@ -834,7 +834,7 @@ sub orders { my $report = SL::ReportGenerator->new(\%myconfig, $form); my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber + push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber cusordnumber transaction_description transdatefrom transdateto type vc employee_id salesman_id reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive business_id shippingpoint taxzone_id); @@ -851,6 +851,7 @@ sub orders { 'id' => { 'text' => $locale->text('ID'), }, 'ordnumber' => { 'text' => $locale->text('Order'), }, 'quonumber' => { 'text' => $form->{type} eq "request_quotation" ? $locale->text('RFQ') : $locale->text('Quotation'), }, + 'cusordnumber' => { 'text' => $locale->text('Customer Order Number'), }, 'name' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, 'customernumber' => { 'text' => $locale->text('Customer Number'), }, 'netamount' => { 'text' => $locale->text('Amount'), }, @@ -874,7 +875,7 @@ sub orders { 'taxzone' => { 'text' => $locale->text('Steuersatz'), }, ); - foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) { + foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber 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"; } @@ -897,6 +898,7 @@ sub orders { push @options, $locale->text('Vendor') . " : $form->{vendor}" if $form->{vendor}; push @options, $locale->text('Department') . " : $department" if $form->{department}; push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; + push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}" if $form->{cusordnumber}; 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}; diff --git a/templates/webpages/oe/search.html b/templates/webpages/oe/search.html index 8d76ecb59..66be6b4ea 100644 --- a/templates/webpages/oe/search.html +++ b/templates/webpages/oe/search.html @@ -53,6 +53,12 @@ [% HTML.escape(ordlabel) %] +[% IF is_order %] + + [% LxERP.t8("Customer Order Number") %] + [% L.input_tag("cusordnumber", '', style="width: 250px") %] + +[% END %] [% 'Employee' | $T8 %] [% L.select_tag('employee_id', ALL_EMPLOYEES, title_key='safe_name', with_empty=1, style='width:250px') %] @@ -161,6 +167,12 @@ +[% IF is_order %] + + + + +[% END %]