From 4db13ebb44454523e8fab2d1cfa034e28a059ec0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 19 Jul 2019 15:48:09 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20PartPicker=20filtert=20na?= =?utf8?q?ch=20Kunden-=20und=20Lieferanten-Art.-Nr.,=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … sofern das in den Benutzereinstellungen ausgewählt ist. --- SL/Controller/Order.pm | 4 ++++ templates/webpages/order/tabs/_item_input.html | 5 ++++- templates/webpages/order/tabs/basic_data.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index f6f6986a1..e27c10eea 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1564,6 +1564,10 @@ sub pre_render { $self->{order_probabilities} = [ map { { title => ($_ * 10) . '%', id => $_ * 10 } } (0..10) ]; $self->{positions_scrollbar_height} = SL::Helper::UserPreferences::PositionsScrollbar->new()->get_height(); + my $user_prefs = SL::Helper::UserPreferences::PartPickerSearch->new(); + $self->{search_cvpartnumber} = !!$user_prefs->get_sales_search_customer_partnumber() if $self->cv eq 'customer'; + $self->{search_cvpartnumber} = !!$user_prefs->get_purchase_search_makemodel() if $self->cv eq 'vendor'; + my $print_form = Form->new(''); $print_form->{type} = $self->type; $print_form->{printers} = SL::DB::Manager::Printer->get_all_sorted; diff --git a/templates/webpages/order/tabs/_item_input.html b/templates/webpages/order/tabs/_item_input.html index 9c6b5725f..80ba16393 100644 --- a/templates/webpages/order/tabs/_item_input.html +++ b/templates/webpages/order/tabs/_item_input.html @@ -14,7 +14,10 @@ - [% P.part.picker('add_item.parts_id', '', fat_set_item=1, style='width: 300px', class="add_item_input") %] + + [%- SET PARAM_KEY = SELF.cv == "customer" ? 'with_customer_partnumber' : 'with_makemodel' -%] + [%- SET PARAM_VAL = SELF.search_cvpartnumber -%] + [% P.part.picker('add_item.parts_id', '', fat_set_item=1, style='width: 300px', class="add_item_input", $PARAM_KEY=PARAM_VAL) %] [% L.input_tag('add_item.description', '', class="add_item_input") %] [% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %] diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index 7966271a4..cad409f97 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -187,7 +187,7 @@ - [%- PROCESS order/tabs/_item_input.html %] + [%- PROCESS order/tabs/_item_input.html SELF=SELF %] [% L.button_tag('kivi.Order.show_multi_items_dialog()', LxERP.t8('Add multiple items')) %] -- 2.20.1