X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fwh.pl;h=92cfcb69be70140f737ae5703dfeca55a1e1e6be;hb=980dc53321ae6c2d3e448b6ca2a0c7d11a65ee8c;hp=fee9ff9d109d9c41f327a436ec1c335befaf36eb;hpb=e14cb525c640cb15bb6b2dfb62ccebbe78cb45cd;p=kivitendo-erp.git diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index fee9ff9d1..92cfcb69b 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -44,6 +44,8 @@ use SL::WH; use SL::OE; use SL::ReportGenerator; +use SL::DB::Part; + use Data::Dumper; require "bin/mozilla/common.pl"; @@ -85,8 +87,16 @@ sub transfer_warehouse_selection { show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); my $units = AM->retrieve_units(\%myconfig, $form); + + my $part = 0; + if ( $form->{parts_id} ) { + $part = SL::DB::Part->new(); + $part->id($form->{parts_id}); + $part->load(); + } + # der zweite Parameter von unit_select_data gibt den default-Namen (selected) vor - $form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $form->{unit}); + $form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $part ? $part->unit : 0); if (scalar @{ $form->{WAREHOUSES} }) { $form->{warehouse_id} ||= $form->{WAREHOUSES}->[0]->{id}; @@ -438,7 +448,7 @@ sub create_assembly { $form->error($locale->text('The warehouse or the bin is missing.')); } - if (!$::lx_office_conf{features}->{show_best_before}) { + if (!$::instance_conf->get_show_bestbefore) { $form->{bestbefore} = ''; } @@ -794,7 +804,6 @@ sub report { $form->{jsscript} = 1; -# $form->{fokus} = "partnumber"; $form->{title} = $locale->text("Report about warehouse contents"); $form->header();