Revision 1b7759ed
Von Moritz Bunkus vor fast 4 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
17 | 17 |
use SL::DB::Default; |
18 | 18 |
use SL::DB::Unit; |
19 | 19 |
use SL::DB::Part; |
20 |
use SL::DB::PartClassification; |
|
20 | 21 |
use SL::DB::PartsGroup; |
21 | 22 |
use SL::DB::Printer; |
22 | 23 |
use SL::DB::Language; |
... | ... | |
43 | 44 |
use Rose::Object::MakeMethods::Generic |
44 | 45 |
( |
45 | 46 |
scalar => [ qw(item_ids_to_delete is_custom_shipto_to_delete) ], |
46 |
'scalar --get_set_init' => [ qw(order valid_types type cv p all_price_factors search_cvpartnumber show_update_button) ], |
|
47 |
'scalar --get_set_init' => [ qw(order valid_types type cv p all_price_factors search_cvpartnumber show_update_button part_picker_classification_ids) ],
|
|
47 | 48 |
); |
48 | 49 |
|
49 | 50 |
|
... | ... | |
1170 | 1171 |
SL::DB::Manager::PriceFactor->get_all; |
1171 | 1172 |
} |
1172 | 1173 |
|
1174 |
sub init_part_picker_classification_ids { |
|
1175 |
my ($self) = @_; |
|
1176 |
my $attribute = 'used_for_' . ($self->type =~ m{sales} ? 'sale' : 'purchase'); |
|
1177 |
|
|
1178 |
return [ map { $_->id } @{ SL::DB::Manager::PartClassification->get_all(where => [ $attribute => 1 ]) } ]; |
|
1179 |
} |
|
1180 |
|
|
1173 | 1181 |
sub check_auth { |
1174 | 1182 |
my ($self) = @_; |
1175 | 1183 |
|
js/kivi.Part.js | ||
---|---|---|
349 | 349 |
data['filter.obsolete'] = 0; |
350 | 350 |
|
351 | 351 |
if (this.o.classification_id) |
352 |
data['filter.classification_id'] = this.o.classification_id.split(',');
|
|
352 |
data['filter.classification_id:any'] = this.o.classification_id.replaceAll(',', ' ');
|
|
353 | 353 |
|
354 | 354 |
if (this.o.unit) |
355 | 355 |
data['filter.unit'] = this.o.unit.split(','); |
templates/webpages/order/tabs/_item_input.html | ||
---|---|---|
23 | 23 |
fat_set_item=1, |
24 | 24 |
multiple_pos_input=1, |
25 | 25 |
action={set_multi_items='kivi.Order.add_multi_items'}, |
26 |
classification_id=SELF.part_picker_classification_ids.as_list.join(','), |
|
26 | 27 |
$PARAM_KEY=PARAM_VAL) %]</td> |
27 | 28 |
<td>[% L.input_tag('add_item.description', '', class="add_item_input") %]</td> |
28 | 29 |
<td> |
Auch abrufbar als: Unified diff
Order-Controller: Artikelklassifizierung berücksichtigen