Revision b8125c17
Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
568 | 568 |
name_prefix => 'ic_', |
569 | 569 |
name_postfix => "_$i", |
570 | 570 |
dbh => $dbh); |
571 |
|
|
571 | 572 |
# link previous items with orderitems |
572 | 573 |
foreach (qw(orderitems invoice)) { |
573 |
if ($form->{"converted_from_${_}_id_$i"}) { |
|
574 |
if (!$form->{saveasnew} && $form->{"converted_from_${_}_id_$i"}) {
|
|
574 | 575 |
RecordLinks->create_links('dbh' => $dbh, |
575 | 576 |
'mode' => 'ids', |
576 | 577 |
'from_table' => $_, |
... | ... | |
578 | 579 |
'to_table' => 'orderitems', |
579 | 580 |
'to_id' => $orderitems_id, |
580 | 581 |
); |
581 |
delete $form->{"converted_from_${_}_id_$i"}; |
|
582 | 582 |
} |
583 |
delete $form->{"converted_from_${_}_id_$i"}; |
|
583 | 584 |
} |
584 | 585 |
} |
585 | 586 |
} |
587 |
|
|
586 | 588 |
# search for orphaned ids |
587 | 589 |
$query = sprintf 'SELECT id FROM orderitems WHERE trans_id = ? AND NOT id IN (%s)', join ', ', ("?") x scalar @processed_orderitems; |
588 | 590 |
@values = (conv_i($form->{id}), map { conv_i($_) } @processed_orderitems); |
Auch abrufbar als: Unified diff
Nicht-editierbare CVars bei "als neu speichern/verwenden" richtig setzen.