X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FInventory.pm;h=b2dccb159aaf154aae41a21635796002ddde9c70;hb=fedfc383692d2cb07d68244b31e2b08b450329d4;hp=3306aa19cd526286883de67a34eccfb1dc3a2ef0;hpb=c9947d8e66c4d8694df20f5e5a705559002d8fd0;p=kivitendo-erp.git diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index 3306aa19c..b2dccb159 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -44,6 +44,7 @@ sub action_stock_in { $::request->layout->focus('#part_id_name'); my $transfer_types = WH->retrieve_transfer_types('in'); map { $_->{description} = $main::locale->text($_->{description}) } @{ $transfer_types }; + $self->setup_stock_in_action_bar; $self->render('inventory/warehouse_selection_stock', title => $::form->{title}, TRANSFER_TYPES => $transfer_types ); } @@ -56,6 +57,7 @@ sub action_stock_usage { 'bins' => 'BINS', }); $::request->layout->use_javascript("${_}.js") for qw(kivi.PartsWarehouse); + $self->setup_stock_usage_action_bar; $self->render('inventory/warehouse_usage', title => $::form->{title}, year => DateTime->today->year, @@ -365,7 +367,7 @@ sub action_usage { $report->set_options('raw_bottom_info_text' => $self->render('inventory/report_bottom', { output => 0 }) ); } - $report->generate_with_headers(); + $report->generate_with_headers(action_bar => 1); $main::lxdebug->leave_sub(); @@ -621,6 +623,35 @@ sub show_no_warehouses_error { $::form->show_generic_error($msg); } +sub setup_stock_in_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Stock'), + submit => [ '#form', { action => 'Inventory/stock' } ], + checks => [ 'check_part_selection_before_stocking' ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_stock_usage_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Show'), + submit => [ '#form', { action => 'Inventory/usage' } ], + accesskey => 'enter', + ], + ); + } +} + 1; __END__ @@ -673,8 +704,7 @@ the format is adapted to this only for C and C: -Martin Helmling Emartin.helmling@opendynamic.deE +pMartin Helmling Emartin.helmling@opendynamic.deE =cut -