Revision 96ab68a3
Von Jan Büren vor mehr als 8 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
418 | 418 |
dbh => $dbh); |
419 | 419 |
|
420 | 420 |
# link previous items with invoice items See IS.pm (no credit note -> no invoice item) |
421 |
foreach (qw(delivery_order_items orderitems)) { |
|
421 |
foreach (qw(delivery_order_items orderitems invoice)) {
|
|
422 | 422 |
if (!$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}) { |
423 | 423 |
RecordLinks->create_links('dbh' => $dbh, |
424 | 424 |
'mode' => 'ids', |
... | ... | |
758 | 758 |
|
759 | 759 |
Common::webdav_folder($form); |
760 | 760 |
|
761 |
# Link this record to the records it was created from. |
|
762 |
if ($form->{convert_from_oe_ids}) { |
|
763 |
RecordLinks->create_links('dbh' => $dbh, |
|
764 |
'mode' => 'ids', |
|
765 |
'from_table' => 'oe', |
|
766 |
'from_ids' => $form->{convert_from_oe_ids}, |
|
767 |
'to_table' => 'ap', |
|
768 |
'to_id' => $form->{id}, |
|
761 |
# Link this record to the records it was created from order or invoice (storno) |
|
762 |
foreach (qw(oe ap)) { |
|
763 |
if ($form->{"convert_from_${_}_ids"}) { |
|
764 |
RecordLinks->create_links('dbh' => $dbh, |
|
765 |
'mode' => 'ids', |
|
766 |
'from_table' => $_, |
|
767 |
'from_ids' => $form->{"convert_from_${_}_ids"}, |
|
768 |
'to_table' => 'ap', |
|
769 |
'to_id' => $form->{id}, |
|
769 | 770 |
); |
770 |
delete $form->{convert_from_oe_ids}; |
|
771 |
delete $form->{"convert_from_${_}_ids"}; |
|
772 |
} |
|
771 | 773 |
} |
772 | 774 |
|
773 | 775 |
my @convert_from_do_ids = map { $_ * 1 } grep { $_ } split m/\s+/, $form->{convert_from_do_ids}; |
Auch abrufbar als: Unified diff
Einkaufsstornos auch verknüpfen
Analog zur Verkaufs-Ansicht auch die Einkaufsrechnungen bei
Stornos verknüpfn