Skip to content

Commit 5b6fb89

Browse files
committed
fix(phase-8): guard stock movement creation when warehouse_id is null on MO
1 parent cdf44e8 commit 5b6fb89

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

erp/app/Listeners/Manufacturing/UpdateInventoryForManufacturingOrder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public function handle(ManufacturingOrderCompleted $event): void
1111
{
1212
$order = $event->order;
1313

14+
if (! $order->warehouse_id) {
15+
return;
16+
}
17+
1418
StockMovement::create([
1519
'tenant_id' => $order->tenant_id,
1620
'product_id' => $order->product_id,

0 commit comments

Comments
 (0)