]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
RecordLinks: credit_notes verlinken, und Typ von Rechnungen anzeigen
[kivitendo-erp.git] / SL / IS.pm
index 1398ed872e68e3c98b81293c4ad79e951cb19fdc..29886a5bb189dead2d78f47b1733585434fe3cb1 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1174,6 +1174,17 @@ sub post_invoice {
 
   Common::webdav_folder($form);
 
+  if ($form->{convert_from_ar_ids}) {
+    RecordLinks->create_links('dbh'        => $dbh,
+                              'mode'       => 'ids',
+                              'from_table' => 'ar',
+                              'from_ids'   => $form->{convert_from_ar_ids},
+                              'to_table'   => 'ar',
+                              'to_id'      => $form->{id},
+    );
+    delete $form->{convert_from_ar_ids};
+  }
+
   # Link this record to the records it was created from.
   RecordLinks->create_links('dbh'        => $dbh,
                             'mode'       => 'ids',