Skip to content

Commit cb57c0f

Browse files
Merge pull request #6901 from bakaphp/refact/order-editin-permission
PM: Order management mutation
2 parents 711efa5 + 6d64d35 commit cb57c0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Domains/Souk/Orders/Services/OrderItemService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function processOrderItems(array $orderItems, int $channelId): array
8888
$warehouse = $channel?->productVariantWarehouse()->first() ?? $variant->variantWarehouses()->first();
8989
$minimumOrderQuantity = $warehouse?->config['minimum_quantity'] ?? 0;
9090
$currentStock = $warehouse?->quantity ?? 0;
91-
$moq = $variant->getAttributeByName("minimum_order_quantity") ?? 0;
91+
$moq = $variant->getAttributeByName('minimum_order_quantity') ?? 0;
9292
/**
9393
* @todo validate overselling
9494
*/
@@ -100,7 +100,7 @@ public function processOrderItems(array $orderItems, int $channelId): array
100100
}
101101

102102
if ($moq > $orderItem['quantity']) {
103-
$errors[] = "$barcode: $variant->name requires a minimum order of $minimumOrderQuantity units.";
103+
$errors[] = "$barcode: $variant->name requires a minimum order of $moq units.";
104104

105105
continue;
106106
}

0 commit comments

Comments
 (0)