Skip to content

Commit

Permalink
- Added fix for logging inventory movement while nothing has changed.…
Browse files Browse the repository at this point in the history
… Now no InventoryLogRecord is created when both quantities (inventoryAlteration and allocatedInventoryAlteration) are 0
  • Loading branch information
24198 committed Jan 17, 2019
1 parent 5981c65 commit ab3ed91
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ private function createLogRecord(
$allocatedInventoryAlt = 0;
}

// no inventory level has changed, so logging it is pointless...
if ($inventoryAlt === 0 && $allocatedInventoryAlt === 0) {
return;
}

$record = new InventoryLevelLogRecord(
$level,
$inventoryAlt,
Expand Down

0 comments on commit ab3ed91

Please sign in to comment.