From 4c94608d90902e79377f930b49c589184695f22c Mon Sep 17 00:00:00 2001 From: Trex Lim Date: Tue, 13 Feb 2018 15:03:28 +0800 Subject: [PATCH] handle serial number when creating new inventory --- src/Traits/InventoryTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/InventoryTrait.php b/src/Traits/InventoryTrait.php index 53ac8290..fc712caa 100644 --- a/src/Traits/InventoryTrait.php +++ b/src/Traits/InventoryTrait.php @@ -212,7 +212,7 @@ public function isInStock() * * @return Model */ - public function createStockOnLocation($quantity, Model $location, $reason = '', $cost = 0, $aisle = null, $row = null, $bin = null) + public function createStockOnLocation($quantity, Model $location, $reason = '', $cost = 0, $serial = null, $aisle = null, $row = null, $bin = null) { try { // We want to make sure stock doesn't exist on the specified location already @@ -235,7 +235,7 @@ public function createStockOnLocation($quantity, Model $location, $reason = '', $stock->setAttribute('bin', $bin); if($stock->save()) { - return $stock->put($quantity, $reason, $cost); + return $stock->put($quantity, $reason, $cost, null, null, $serial); } }