Bei Hauptlager setzen nicht onhand überschreiben.
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 22 Jul 2013 14:52:32 +0000 (16:52 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 22 Jul 2013 14:52:32 +0000 (16:52 +0200)
SL/Controller/Inventory.pm

index 10f01f8..2a5b8de 100644 (file)
@@ -58,6 +58,7 @@ sub action_stock {
   });
 
   if ($::form->{write_default_bin}) {
+    $self->part->load;   # onhand is calculated in between. don't mess that up
     $self->part->bin($self->bin);
     $self->part->warehouse($self->warehouse);
     $self->part->save;