@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $this->request = $this->requestStack->getCurrentRequest(); |
33 | 33 | } |
34 | 34 | |
35 | - public function addOrderProduct(Order $order, Product $product, $quantity, $price, ?ProductGroup $productGroup = null, ?Product $parentProduct = null, ?OrderProduct $orderProductParent = null): OrderProduct |
|
35 | + public function addOrderProduct(Order $order, Product $product, $quantity, $price, ?ProductGroup $productGroup = null, ?Product $parentProduct = null, ?OrderProduct $orderProductParent = null): OrderProduct |
|
36 | 36 | { |
37 | 37 | $OProduct = new OrderProduct(); |
38 | 38 | $OProduct->setOrder($order); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | $this->orderProductQueueService->addProductToQueue($OProduct); |
75 | 75 | } |
76 | 76 | |
77 | - private function checkInventory(OrderProduct &$orderProduct) |
|
77 | + private function checkInventory(OrderProduct & $orderProduct) |
|
78 | 78 | { |
79 | 79 | $order = $orderProduct->getOrder(); |
80 | - $product = $orderProduct->getProduct(); |
|
80 | + $product = $orderProduct->getProduct(); |
|
81 | 81 | |
82 | 82 | if ($order->getOrderType() == 'sale' && !$orderProduct->getOutInventory()) |
83 | 83 | $orderProduct->setOutInventory($product->getDefaultOutInventory()); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->checkInventory($orderProduct); |
98 | 98 | foreach ($subProducts as $subproduct) { |
99 | 99 | $product = $this->manager->getRepository(Product::class)->find($subproduct['product']); |
100 | - $productGroup = $this->manager->getRepository(ProductGroup::class)->find($subproduct['productGroup']); |
|
100 | + $productGroup = $this->manager->getRepository(ProductGroup::class)->find($subproduct['productGroup']); |
|
101 | 101 | $this->addSubproduct($orderProduct, $product, $productGroup, $subproduct['quantity']); |
102 | 102 | } |
103 | 103 | $this->orderProductQueueService->addProductToQueue($orderProduct); |