Revision 0598db02
Von Werner Hahn vor mehr als 7 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
6 | 6 |
use Clone qw(clone); |
7 | 7 |
use SL::DB::Part; |
8 | 8 |
use SL::DB::PartsGroup; |
9 |
use SL::DB::Shop; |
|
9 | 10 |
use SL::Controller::Helper::GetModels; |
10 | 11 |
use SL::Locale::String qw(t8); |
11 | 12 |
use SL::JSON; |
... | ... | |
21 | 22 |
|
22 | 23 |
use Rose::Object::MakeMethods::Generic ( |
23 | 24 |
'scalar --get_set_init' => [ qw(parts models part p warehouses multi_items_models |
24 |
makemodels |
|
25 |
makemodels shops_not_assigned
|
|
25 | 26 |
orphaned |
26 | 27 |
assortment assortment_items assembly assembly_items |
27 | 28 |
all_pricegroups all_translations all_partsgroups all_units |
... | ... | |
932 | 933 |
} |
933 | 934 |
} |
934 | 935 |
|
936 |
sub init_shops_not_assigned { |
|
937 |
my ($self) = @_; |
|
938 |
|
|
939 |
my @used_shop_ids = map { $_->shop->id } @{ $self->part->shop_parts }; |
|
940 |
if ( @used_shop_ids ) { |
|
941 |
return SL::DB::Manager::Shop->get_all( query => [ obsolete => 0, '!id' => \@used_shop_ids ], sort_by => 'sortkey' ); |
|
942 |
} |
|
943 |
else { |
|
944 |
return SL::DB::Manager::Shop->get_all( query => [ obsolete => 0 ], sort_by => 'sortkey' ); |
|
945 |
} |
|
946 |
} |
|
947 |
|
|
935 | 948 |
sub init_all_units { |
936 | 949 |
my ($self) = @_; |
937 | 950 |
if ( $self->part->orphaned ) { |
Auch abrufbar als: Unified diff
Shopmodul: Shopartikel erfassen funktioniert mit dem PartController
Conflicts:
SL/Controller/Part.pm