Skip to content

Commit

Permalink
handle serial number when creating new inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Trexology committed Feb 13, 2018
1 parent 7a9d0ec commit 4c94608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/InventoryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 4c94608

Please sign in to comment.