X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIS.pm;h=43303e894b2c0ceb21099622a9c23aa4335dbb03;hb=b8125c17c8add08c9b84fb054f797547a853dd3a;hp=7522bd24843678d2b25417d9a755b95b4d3c46a8;hpb=be42a45043cab936e86e91aa895c6fc25bab079f;p=kivitendo-erp.git diff --git a/SL/IS.pm b/SL/IS.pm index 7522bd248..43303e894 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -812,7 +812,7 @@ SQL } # link previous items with invoice items foreach (qw(delivery_order_items orderitems invoice)) { - if ($form->{"converted_from_${_}_id_$i"}) { + if (!$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}) { RecordLinks->create_links('dbh' => $dbh, 'mode' => 'ids', 'from_table' => $_, @@ -820,8 +820,8 @@ SQL 'to_table' => 'invoice', 'to_id' => $form->{"invoice_id_$i"}, ); - delete $form->{"converted_from_${_}_id_$i"}; } + delete $form->{"converted_from_${_}_id_$i"}; } }