Revision a97574b8
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/Controller/Inventory.pm | ||
---|---|---|
use SL::WH;
|
||
use SL::ReportGenerator;
|
||
use SL::Locale::String qw(t8);
|
||
use SL::Presenter;
|
||
use SL::Presenter::Tag qw(select_tag);
|
||
use SL::DBUtils;
|
||
use SL::Helper::Flash;
|
||
use SL::Controller::Helper::ReportGenerator;
|
||
... | ... | |
use English qw(-no_match_vars);
|
||
|
||
use Rose::Object::MakeMethods::Generic (
|
||
'scalar --get_set_init' => [ qw(warehouses units p) ],
|
||
'scalar --get_set_init' => [ qw(warehouses units) ],
|
||
'scalar' => [ qw(warehouse bin unit part) ],
|
||
);
|
||
|
||
... | ... | |
SL::DB::Manager::Unit->get_all;
|
||
}
|
||
|
||
sub init_p {
|
||
SL::Presenter->get;
|
||
}
|
||
|
||
sub set_target_from_part {
|
||
my ($self) = @_;
|
||
|
||
... | ... | |
}
|
||
|
||
sub build_warehouse_select {
|
||
$_[0]->p->select_tag('warehouse_id', $_[0]->warehouses,
|
||
select_tag('warehouse_id', $_[0]->warehouses,
|
||
title_key => 'description',
|
||
default => $_[0]->warehouse->id,
|
||
onchange => 'reload_bin_selection()',
|
||
... | ... | |
}
|
||
|
||
sub build_bin_select {
|
||
$_[0]->p->select_tag('bin_id', [ $_[0]->warehouse->bins ],
|
||
select_tag('bin_id', [ $_[0]->warehouse->bins ],
|
||
title_key => 'description',
|
||
default => $_[0]->bin->id,
|
||
);
|
||
... | ... | |
|
||
sub build_unit_select {
|
||
$_[0]->part->id
|
||
? $_[0]->p->select_tag('unit_id', $_[0]->part->available_units,
|
||
? select_tag('unit_id', $_[0]->part->available_units,
|
||
title_key => 'name',
|
||
default => $_[0]->part->unit_obj->id,
|
||
)
|
||
: $_[0]->p->select_tag('unit_id', $_[0]->units,
|
||
: select_tag('unit_id', $_[0]->units,
|
||
title_key => 'name',
|
||
)
|
||
}
|
Auch abrufbar als: Unified diff
Presenter: Neue Struktur in den restlichen Bereichen umgesetzt