X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fedfc383692d2cb07d68244b31e2b08b450329d4..a97574b881103cc09a48152a4f29f8a2cc1c38a3:/SL/Controller/Inventory.pm diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index b2dccb159..866c15353 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -13,7 +13,7 @@ use SL::DB::Unit; 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; @@ -21,7 +21,7 @@ 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) ], ); @@ -367,7 +367,7 @@ sub action_usage { $report->set_options('raw_bottom_info_text' => $self->render('inventory/report_bottom', { output => 0 }) ); } - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); @@ -505,10 +505,6 @@ sub init_units { SL::DB::Manager::Unit->get_all; } -sub init_p { - SL::Presenter->get; -} - sub set_target_from_part { my ($self) = @_; @@ -554,7 +550,7 @@ sub set_layout { } 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()', @@ -562,7 +558,7 @@ sub build_warehouse_select { } 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, ); @@ -570,11 +566,11 @@ sub build_bin_select { 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', ) } @@ -704,7 +700,7 @@ the format is adapted to this only for C and C: -pMartin Helmling Emartin.helmling@opendynamic.deE +Martin Helmling Emartin.helmling@opendynamic.deE =cut