]> wagnertech.de Git - mfinanz.git/blobdiff - SL/OE.pm
Angebots-Position mit Auftragsposition verknüpft (orderitems -> orderitems)
[mfinanz.git] / SL / OE.pm
index a60b86c5a75c0addf9dd239509410228cd987295..9d6f8496207e924c084da41ef04b62b6f652ee02 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -578,6 +578,16 @@ SQL
                                   name_prefix  => 'ic_',
                                   name_postfix => "_$i",
                                   dbh          => $dbh);
+      # link quotation items with order items
+      if ($form->{"converted_from_quotation_orderitems_id_$i"}) {
+        RecordLinks->create_links('dbh'        => $dbh,
+                                  'mode'       => 'ids',
+                                  'from_table' => 'orderitems',
+                                  'from_ids'   => $form->{"converted_from_quotation_orderitems_id_$i"},
+                                  'to_table'   => 'orderitems',
+                                  'to_id'      => $orderitems_id,
+        );
+      }
     }
   }
   # search for orphaned ids