Revision 4e9adbf7
Von Thomas Heck vor etwa 12 Jahren hinzugefügt
bin/mozilla/wh.pl | ||
---|---|---|
44 | 44 |
use SL::OE; |
45 | 45 |
use SL::ReportGenerator; |
46 | 46 |
|
47 |
use SL::DB::Part; |
|
48 |
|
|
47 | 49 |
use Data::Dumper; |
48 | 50 |
|
49 | 51 |
require "bin/mozilla/common.pl"; |
... | ... | |
85 | 87 |
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); |
86 | 88 |
|
87 | 89 |
my $units = AM->retrieve_units(\%myconfig, $form); |
90 |
|
|
91 |
my $part = 0; |
|
92 |
if ( $form->{parts_id} ) { |
|
93 |
$part = SL::DB::Part->new(); |
|
94 |
$part->id($form->{parts_id}); |
|
95 |
$part->load(); |
|
96 |
} |
|
97 |
|
|
88 | 98 |
# der zweite Parameter von unit_select_data gibt den default-Namen (selected) vor |
89 |
$form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $form->{unit});
|
|
99 |
$form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $part ? $part->unit : 0);
|
|
90 | 100 |
|
91 | 101 |
if (scalar @{ $form->{WAREHOUSES} }) { |
92 | 102 |
$form->{warehouse_id} ||= $form->{WAREHOUSES}->[0]->{id}; |
Auch abrufbar als: Unified diff
Unter "Lager > Erzeugnis fertigen" die Mengeneinheiten richtig auflisten.