Revision fe3e0ed3
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
1013 | 1013 |
dbh => $dbh); |
1014 | 1014 |
} |
1015 | 1015 |
# link previous items with invoice items |
1016 |
foreach (qw(delivery_order_items orderitems invoice)) { |
|
1016 |
foreach (qw(delivery_order_items orderitems invoice reclamation_items)) {
|
|
1017 | 1017 |
if (!$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}) { |
1018 | 1018 |
RecordLinks->create_links('dbh' => $dbh, |
1019 | 1019 |
'mode' => 'ids', |
... | ... | |
1578 | 1578 |
|
1579 | 1579 |
Common::webdav_folder($form); |
1580 | 1580 |
|
1581 |
if ($form->{convert_from_ar_ids}) { |
|
1582 |
RecordLinks->create_links('dbh' => $dbh, |
|
1583 |
'mode' => 'ids', |
|
1584 |
'from_table' => 'ar', |
|
1585 |
'from_ids' => $form->{convert_from_ar_ids}, |
|
1586 |
'to_table' => 'ar', |
|
1587 |
'to_id' => $form->{id}, |
|
1588 |
); |
|
1589 |
delete $form->{convert_from_ar_ids}; |
|
1590 |
} |
|
1591 |
|
|
1592 | 1581 |
# Link this record to the records it was created from. |
1593 |
if ($form->{convert_from_oe_ids}) { |
|
1594 |
RecordLinks->create_links('dbh' => $dbh, |
|
1595 |
'mode' => 'ids', |
|
1596 |
'from_table' => 'oe', |
|
1597 |
'from_ids' => $form->{convert_from_oe_ids}, |
|
1598 |
'to_table' => 'ar', |
|
1599 |
'to_id' => $form->{id}, |
|
1582 |
foreach (qw(oe ar reclamations)) { |
|
1583 |
if ($form->{"convert_from_${_}_ids"}) { |
|
1584 |
RecordLinks->create_links('dbh' => $dbh, |
|
1585 |
'mode' => 'ids', |
|
1586 |
'from_table' => $_, |
|
1587 |
'from_ids' => $form->{"convert_from_${_}_ids"}, |
|
1588 |
'to_table' => 'ar', |
|
1589 |
'to_id' => $form->{id}, |
|
1600 | 1590 |
); |
1601 |
delete $form->{convert_from_oe_ids}; |
|
1591 |
delete $form->{"convert_from_${_}_ids"}; |
|
1592 |
} |
|
1602 | 1593 |
} |
1603 | 1594 |
|
1604 | 1595 |
my @convert_from_do_ids = map { $_ * 1 } grep { $_ } split m/\s+/, $form->{convert_from_do_ids}; |
Auch abrufbar als: Unified diff
Workflow: sales_reclamation → credit_note