Revision 6934a717
Von Jan Büren vor fast 10 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
387 | 387 |
conv_i($form->{"delivery_order_items_id_$i"}), $sinfo->{qty}, $sinfo->{unit}, conv_i($sinfo->{warehouse_id}), |
388 | 388 |
conv_i($sinfo->{bin_id})); |
389 | 389 |
$h_item_stock_id->finish(); |
390 |
# write back the id to the form (important if only transfer was clicked (id fk for invoice) |
|
391 |
$form->{"stock_${in_out}_$i"} = YAML::Dump($stock_info); |
|
390 | 392 |
} |
391 | 393 |
@values = ($form->{"delivery_order_items_id_$i"}, $sinfo->{qty}, $sinfo->{unit}, conv_i($sinfo->{warehouse_id}), |
392 | 394 |
conv_i($sinfo->{bin_id}), $sinfo->{chargenumber}, conv_date($sinfo->{bestbefore}), |
... | ... | |
403 | 405 |
name_prefix => 'ic_', |
404 | 406 |
name_postfix => "_$i", |
405 | 407 |
dbh => $dbh); |
406 |
# link order items with doi |
|
408 |
# link order items with doi, for future extension look at foreach IS.pm
|
|
407 | 409 |
if ($form->{"converted_from_orderitems_id_$i"}) { |
408 | 410 |
RecordLinks->create_links('dbh' => $dbh, |
409 | 411 |
'mode' => 'ids', |
... | ... | |
1197 | 1199 |
|
1198 | 1200 |
foreach my $request (@{ $params{requests} }) { |
1199 | 1201 |
push @transfers, { |
1200 |
'parts_id' => $request->{parts_id}, |
|
1201 |
"${prefix}_warehouse_id" => $request->{warehouse_id}, |
|
1202 |
"${prefix}_bin_id" => $request->{bin_id}, |
|
1203 |
'chargenumber' => $request->{chargenumber}, |
|
1204 |
'bestbefore' => $request->{bestbefore}, |
|
1205 |
'qty' => $request->{qty}, |
|
1206 |
'unit' => $request->{unit}, |
|
1207 |
'oe_id' => $form->{id}, |
|
1208 |
'shippingdate' => 'current_date', |
|
1209 |
'transfer_type' => $params{direction} eq 'in' ? 'stock' : 'shipped', |
|
1210 |
'project_id' => $request->{project_id}, |
|
1202 |
'parts_id' => $request->{parts_id}, |
|
1203 |
"${prefix}_warehouse_id" => $request->{warehouse_id}, |
|
1204 |
"${prefix}_bin_id" => $request->{bin_id}, |
|
1205 |
'chargenumber' => $request->{chargenumber}, |
|
1206 |
'bestbefore' => $request->{bestbefore}, |
|
1207 |
'qty' => $request->{qty}, |
|
1208 |
'unit' => $request->{unit}, |
|
1209 |
'oe_id' => $form->{id}, |
|
1210 |
'shippingdate' => 'current_date', |
|
1211 |
'transfer_type' => $params{direction} eq 'in' ? 'stock' : 'shipped', |
|
1212 |
'project_id' => $request->{project_id}, |
|
1213 |
'delivery_order_items_stock_id' => $request->{delivery_order_items_stock_id}, |
|
1211 | 1214 |
}; |
1212 | 1215 |
} |
1213 | 1216 |
|
Auch abrufbar als: Unified diff
deliver_order_items_id mit inventory verknüpft