X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fwh.pl;h=5ffa3828931e74da994ba3a21476aa2029dac743;hb=56f92e7f079924263f2303ae1e01ff73c9a6aa06;hp=15f58fc5dc3a3a6264642d7e964f1d747f52f761;hpb=bea5a6c5fbb338f7baee3690c3403adb23a92a04;p=kivitendo-erp.git diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 15f58fc5d..5ffa38289 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -67,6 +67,7 @@ use strict; # $locale->text('used') # $locale->text('return_material') # $locale->text('release_material') +# $locale->text('assembled') # -------------------------------------------------------------------- # Transfer @@ -289,7 +290,7 @@ sub transfer_parts { if (!scalar @transfers) { $form->show_generic_information($locale->text('Nothing has been selected for transfer.')); - ::end_of_request(); + $::dispatcher->end_request; } WH->transfer(@transfers); @@ -455,7 +456,7 @@ sub create_assembly { # Anm. jb 18.3. vielleicht auch nur meine unwissenheit in perl-datenstrukturen my %TRANSFER = ( 'transfer_type' => 'assembly', - 'login' => $form->{login}, + 'login' => $::myconfig{login}, 'dst_warehouse_id' => $form->{warehouse_id}, 'dst_bin_id' => $form->{bin_id}, 'chargenumber' => $form->{chargenumber}, @@ -623,7 +624,7 @@ sub remove_parts { if (!scalar @transfers) { $form->show_generic_information($locale->text('Nothing has been selected for removal.')); - ::end_of_request(); + $::dispatcher->end_request; } WH->transfer(@transfers); @@ -833,15 +834,19 @@ sub generate_report { my @options; # dispatch all options my $dispatch_options = { - partnumber => sub { push @options, $locale->text('Partnumber') . " : $form->{partnumber}"}, - description => sub { push @options, $locale->text('Description') . " : $form->{description}"}, - chargenumber => sub { push @options, $locale->text('Charge Number') . " : $form->{chargenumber}"}, - bestbefore => sub { push @options, $locale->text('Best Before') . " : $form->{bestbefore}"}, - date => sub { push @options, $locale->text('Date') . " : $form->{date}"}, + warehouse_id => sub { push @options, $locale->text('Warehouse') . " : " . + SL::DB::Manager::Warehouse->find_by(id => $form->{warehouse_id})->description}, + bin_id => sub { push @options, $locale->text('Bin') . " : " . + SL::DB::Manager::Bin->find_by(id => $form->{bin_id})->description}, + partnumber => sub { push @options, $locale->text('Partnumber') . " : $form->{partnumber}"}, + description => sub { push @options, $locale->text('Description') . " : $form->{description}"}, + chargenumber => sub { push @options, $locale->text('Charge Number') . " : $form->{chargenumber}"}, + bestbefore => sub { push @options, $locale->text('Best Before') . " : $form->{bestbefore}"}, + date => sub { push @options, $locale->text('Date') . " : $form->{date}"}, include_invalid_warehouses => sub { push @options, $locale->text('Include invalid warehouses ')}, }; foreach (keys %filter) { - defined $dispatch_options->{$_} && $dispatch_options->{$_}->(); + $dispatch_options->{$_}->() if $dispatch_options->{$_}; } # / end show filter stuff also in report @@ -968,7 +973,7 @@ sub show_no_warehouses_error { my $msg = $locale->text('No warehouse has been created yet or the quantity of the bins is not configured yet.') . ' '; - if ($main::auth->check_right($form->{login}, 'config')) { + if ($main::auth->check_right($::myconfig{login}, 'config')) { $msg .= $locale->text('You can create warehouses and bins via the menu "System -> Warehouses".'); } else { $msg .= $locale->text('Please ask your administrator to create warehouses and bins.');