Revision be6eabfc
Von Thomas Heck vor fast 11 Jahren hinzugefügt
SL/WH.pm | ||
---|---|---|
38 | 38 |
use SL::DBUtils; |
39 | 39 |
use SL::Form; |
40 | 40 |
|
41 |
use SL::DB::Unit; |
|
42 |
use SL::DB::Assembly; |
|
43 |
|
|
41 | 44 |
use warnings; |
42 | 45 |
use strict; |
43 | 46 |
|
... | ... | |
158 | 161 |
my %params = @_; |
159 | 162 |
Common::check_params(\%params, qw(assembly_id dst_warehouse_id login qty unit dst_bin_id chargenumber bestbefore comment)); |
160 | 163 |
|
164 |
|
|
165 |
my $unit = SL::DB::Manager::Unit->find_by(name => $params{unit}); |
|
166 |
if ($unit) { |
|
167 |
my $assembly = SL::DB::Manager::Assembly->get_all( |
|
168 |
query => [ id => $params{assembly_id} ], |
|
169 |
with_objects => ['part'], |
|
170 |
limit => 1, |
|
171 |
)->[0]; |
|
172 |
$params{qty} = $unit->convert_to($params{qty}, $assembly->part->unit_obj); |
|
173 |
} |
|
174 |
|
|
161 | 175 |
# my $maxcreate=WH->check_assembly_max_create(assembly_id =>$params{'assembly_id'}, dbh => $my_dbh); |
162 | 176 |
|
163 | 177 |
my $myconfig = \%main::myconfig; |
Auch abrufbar als: Unified diff
Einheiten beim Fertigen beachten
fixt #2232