From a809ab0a8e5c2f991ebbad1ccda9f31f1c009c7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 30 Sep 2013 13:09:59 +0200 Subject: [PATCH] =?utf8?q?Erfassungsdatum=20bei=20Autr=C3=A4gen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In der Maske anzeigen; im Bericht anzeigen und danach filtern. Conflicts: SL/OE.pm bin/mozilla/oe.pl locale/de/all templates/webpages/oe/search.html Übernahme aus Kundenprojekt. --- SL/OE.pm | 16 ++++++++++++++-- bin/mozilla/oe.pl | 12 +++++++++--- locale/de/all | 1 + locale/en/all | 1 + templates/webpages/oe/form_header.html | 6 ++++++ templates/webpages/oe/search.html | 20 ++++++++++++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index cfb48b5aa..870215479 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -109,6 +109,7 @@ sub transactions { 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| o.itime::DATE AS insertdate, | . qq| ex.$rate AS exchangerate, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee, s.name AS salesman, | . @@ -230,6 +231,16 @@ SQL push(@values, conv_date($form->{reqdateto})); } + if($form->{insertdatefrom}) { + $query .= qq| AND o.itime::DATE >= ?|; + push(@values, conv_date($form->{insertdatefrom})); + } + + if($form->{insertdateto}) { + $query .= qq| AND o.itime::DATE <= ?|; + push(@values, conv_date($form->{insertdateto})); + } + if ($form->{shippingpoint}) { $query .= qq| AND o.shippingpoint ILIKE ?|; push(@values, '%' . $form->{shippingpoint} . '%'); @@ -285,6 +296,7 @@ SQL "shipvia" => "o.shipvia", "transaction_description" => "o.transaction_description", "shippingpoint" => "o.shippingpoint", + "insertdate" => "o.itime", "taxzone" => "tz.description", ); if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) { @@ -889,8 +901,8 @@ sub retrieve { o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber, d.description AS department, o.payment_id, o.language_id, o.taxzone_id, o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id, - o.globalproject_id, o.delivered, o.transaction_description, o.delivery_term_id - , o.order_probability, o.expected_billing_date + o.globalproject_id, o.delivered, o.transaction_description, o.delivery_term_id, + o.itime::DATE AS insertdate, o.order_probability, o.expected_billing_date FROM oe o JOIN ${vc} cv ON (o.${vc}_id = cv.id) LEFT JOIN employee e ON (o.employee_id = e.id) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 7b6796bd4..8075bc6dd 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -847,7 +847,7 @@ sub orders { "marge_total", "marge_percent", "vcnumber", "ustid", "country", "shippingpoint", - "taxzone", + "taxzone", "insertdate", "order_probability", "expected_billing_date", "expected_netamount", ); @@ -889,7 +889,7 @@ sub orders { 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 reqdate_unset_or_old + business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to); my @keys_for_url = grep { $form->{$_} } @hidden_variables; @@ -928,12 +928,13 @@ sub orders { 'periodic_invoices' => { 'text' => $locale->text('Per. Inv.'), }, 'shippingpoint' => { 'text' => $locale->text('Shipping Point'), }, 'taxzone' => { 'text' => $locale->text('Steuersatz'), }, + 'insertdate' => { 'text' => $locale->text('Insert Date'), }, 'order_probability' => { 'text' => $locale->text('Order probability'), }, 'expected_billing_date' => { 'text' => $locale->text('Exp. bill. date'), }, 'expected_netamount' => { 'text' => $locale->text('Exp. netamount'), }, ); - foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber 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 insertdate)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } @@ -971,6 +972,11 @@ sub orders { push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1) if $form->{reqdatefrom}; push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{reqdateto}, 1) if $form->{reqdateto}; }; + if ( $form->{insertdatefrom} or $form->{insertdateto} ) { + push @options, $locale->text('Insert Date'); + push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1) if $form->{insertdatefrom}; + push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{insertdateto}, 1) if $form->{insertdateto}; + }; push @options, $locale->text('Open') if $form->{open}; push @options, $locale->text('Closed') if $form->{closed}; push @options, $locale->text('Delivery Order created') if $form->{delivered}; diff --git a/locale/de/all b/locale/de/all index f618bd82d..224bc2612 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1348,6 +1348,7 @@ $self->{texts} = { 'Information' => 'Information', 'Initial version.' => 'Initiale Version.', 'Insert' => 'Einfügen', + 'Insert Date' => 'Erfassungsdatum', 'Insert with new customer/vendor number' => 'Mit neuer Kunden-/Lieferantennummer anlegen', 'Insert with new database ID' => 'Neu anlegen mit neuer Datenbank-ID', 'Insert with new part number' => 'Mit neuer Artikelnummer einfügen', diff --git a/locale/en/all b/locale/en/all index 76f300989..ede0e2f54 100644 --- a/locale/en/all +++ b/locale/en/all @@ -1142,6 +1142,7 @@ $self->{texts} = { 'Increase' => '', 'Individual Items' => '', 'Information' => '', + 'Insert Date' => '', 'Insert with new customer/vendor number' => '', 'Insert with new database ID' => '', 'Insert with new part number' => '', diff --git a/templates/webpages/oe/form_header.html b/templates/webpages/oe/form_header.html index 81ed919af..773c0894a 100644 --- a/templates/webpages/oe/form_header.html +++ b/templates/webpages/oe/form_header.html @@ -233,6 +233,12 @@ [% L.date_tag('reqdate', reqdate, id='reqdate') %] + [%- IF is_sales_ord %] + + [% 'Insert Date' | $T8 %] + [% insertdate %] + + [%- END %] [% 'Project Number' | $T8 %] diff --git a/templates/webpages/oe/search.html b/templates/webpages/oe/search.html index 06f1429c7..c88121162 100644 --- a/templates/webpages/oe/search.html +++ b/templates/webpages/oe/search.html @@ -126,6 +126,20 @@ [% L.date_tag('reqdateto') %] + + [%- IF type == 'sales_order' %] + + [% 'Insert Date' | $T8 %] [% 'From' | $T8 %] + + [% L.date_tag('insertdatefrom') %] + + [% 'Bis' | $T8 %] + + [% L.date_tag('insertdateto') %] + + + [%- END %] + [%- IF type == 'sales_quotation' %] [% 'Expected billing date' | $T8 %] [% 'From' | $T8 %] @@ -206,6 +220,12 @@ + [%- IF type == 'sales_order' %] + + + + + [%- END %] -- 2.20.1