Revision 2f9a5220
Von Jan Büren vor fast 10 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
407 | 407 |
name_prefix => 'ic_', |
408 | 408 |
name_postfix => "_$i", |
409 | 409 |
dbh => $dbh); |
410 |
# link oe items with invoice |
|
411 |
if ($form->{"converted_from_orderitems_id_$i"}) { |
|
412 |
RecordLinks->create_links('dbh' => $dbh, |
|
413 |
'mode' => 'ids', |
|
414 |
'from_table' => 'orderitems', |
|
415 |
'from_ids' => $form->{"converted_from_orderitems_id_$i"}, |
|
416 |
'to_table' => 'invoice', |
|
417 |
'to_id' => $form->{"invoice_id_$i"}, |
|
418 |
); |
|
419 |
delete $form->{"converted_from_orderitems_id_$i"}; |
|
420 |
} |
|
421 |
# link doi items with invoice |
|
422 |
if ($form->{"converted_from_delivery_order_items_id_$i"}) { |
|
423 |
RecordLinks->create_links('dbh' => $dbh, |
|
424 |
'mode' => 'ids', |
|
425 |
'from_table' => 'delivery_order_items', |
|
426 |
'from_ids' => $form->{"converted_from_delivery_order_items_id_$i"}, |
|
427 |
'to_table' => 'invoice', |
|
428 |
'to_id' => $form->{"invoice_id_$i"}, |
|
429 |
); |
|
430 |
delete $form->{"converted_from_delivery_order_items_id_$i"}; |
|
410 |
# link previous items with invoice items See IS.pm (no credit note -> no invoice item) |
|
411 |
foreach (qw(delivery_order_items orderitems)) { |
|
412 |
if ($form->{"converted_from_${_}_id_$i"}) { |
|
413 |
RecordLinks->create_links('dbh' => $dbh, |
|
414 |
'mode' => 'ids', |
|
415 |
'from_table' => $_, |
|
416 |
'from_ids' => $form->{"converted_from_${_}_id_$i"}, |
|
417 |
'to_table' => 'invoice', |
|
418 |
'to_id' => $form->{"invoice_id_$i"}, |
|
419 |
); |
|
420 |
delete $form->{"converted_from_${_}_id_$i"}; |
|
421 |
} |
|
431 | 422 |
} |
432 | 423 |
} |
433 | 424 |
|
Auch abrufbar als: Unified diff
Aufräumarbeiten verknüpfte Positionen