From: Thomas Heck Date: Wed, 7 Nov 2012 16:31:45 +0000 (+0100) Subject: Unter "Lager > Erzeugnis fertigen" die Mengeneinheiten richtig auflisten. X-Git-Tag: release-3.0.0beta1~33^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4e9adbf7b6602f6b0524fa9a78804bfbfa89579d;p=kivitendo-erp.git Unter "Lager > Erzeugnis fertigen" die Mengeneinheiten richtig auflisten. --- diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 0315bb9dc..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};