$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;
</thead>
<tbody>
<tr valign="top" class="listrow">
- <td>[% P.part.picker('add_item.parts_id', '', fat_set_item=1, style='width: 300px', class="add_item_input") %]</td>
+ <td>
+ [%- 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) %]</td>
<td>[% L.input_tag('add_item.description', '', class="add_item_input") %]</td>
<td>
[% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %]