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