WH->transfer gibt jetzt eine liste der erzeugten trans_ids zurück.
authorSven Schöling <s.schoeling@linet-services.de>
Sun, 27 Feb 2011 13:15:53 +0000 (14:15 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 27 Oct 2011 15:03:05 +0000 (17:03 +0200)
SL/WH.pm

index e983216..352ca1a 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -73,6 +73,8 @@ sub transfer {
     return;
   };
 
+  my @trans_ids;
+
   my $db = SL::DB::Inventory->new->db;
   $db->do_transaction(sub{
     while (my $transfer = shift @args) {
@@ -130,12 +132,16 @@ sub transfer {
           qty       => $qty,
         )->save;
       }
+
+      push @trans_ids, $trans_id;
     }
   }) or do {
     $::form->error("Warehouse transfer error: " . join("\n", (split(/\n/, $db->error))[0..2]));
   };
 
   $::lxdebug->leave_sub;
+
+  return @trans_ids;
 }
 
 sub transfer_assembly {