Skip to content

Commit

Permalink
Set on hand to correct value
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Jun 27, 2024
1 parent 5f6cfdf commit 1c5aac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Message/CommandHandler/UpdateInventoryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __invoke(UpdateInventory $message): void
throw new UnrecoverableMessageHandlingException(sprintf('The product with id %s and variant id/code %s does not have an availableToSell value', $productCode, $variantCode));
}

$productVariant->setOnHand($peakProduct->availableToSell);
$productVariant->setOnHand($peakProduct->availableToSell + (int) $productVariant->getOnHold());

$this->productVariantRepository->add($productVariant);
}
Expand Down

0 comments on commit 1c5aac6

Please sign in to comment.