Revision a5419c17
Von Werner Hahn vor 22 Tagen hinzugefügt
- ID a5419c17b2553d59cd1369ca322115015ac05252
- Vorgänger 86d460a0
SL/Controller/Part.pm | ||
---|---|---|
502 | 502 |
$search_term ||= $self->models->filtered->laundered->{all_with_customer_partnumber_substr_multi__ilike}; |
503 | 503 |
|
504 | 504 |
$_[0]->render('part/_multi_items_dialog', { layout => 0 }, |
505 |
all_partsgroups => SL::DB::Manager::PartsGroup->get_all,
|
|
505 |
all_partsgroups => SL::DB::Manager::PartsGroup->data_partsgroup_dropdown,
|
|
506 | 506 |
search_term => $search_term |
507 | 507 |
); |
508 | 508 |
} |
... | ... | |
1420 | 1420 |
|
1421 | 1421 |
sub init_all_partsgroups { |
1422 | 1422 |
my ($self) = @_; |
1423 |
SL::DB::Manager::PartsGroup->get_all_sorted(query => [ or => [ id => $self->part->partsgroup_id, obsolete => 0 ] ]);
|
|
1423 |
SL::DB::Manager::PartsGroup->data_partsgroup_dropdown;
|
|
1424 | 1424 |
} |
1425 | 1425 |
|
1426 | 1426 |
sub init_all_buchungsgruppen { |
SL/DB/Manager/PartsGroup.pm | ||
---|---|---|
45 | 45 |
return \@list; |
46 | 46 |
} |
47 | 47 |
|
48 |
sub data_partsgroup_dropdown { |
|
49 |
my ($name, %params); |
|
50 |
my $partsgroup = get_hierarchy; |
|
51 |
my $partsgroup_hierarchie; |
|
52 |
foreach my $pg (@{$partsgroup}) { |
|
53 |
next if $pg->{obsolete}; |
|
54 |
$pg->{partsgroup} = "| " x $pg->{level} . $pg->{partsgroup}; |
|
55 |
push @{$partsgroup_hierarchie}, $pg; |
|
56 |
} |
|
57 |
return $partsgroup_hierarchie; |
|
58 |
} |
|
48 | 59 |
1; |
Auch abrufbar als: Unified diff
PartGroup: auch in deiversen Dropdown Partsgroup hierarchisch darstellen