@@ -22,7 +22,7 @@ |
||
22 | 22 | private StatusService $statusService, |
23 | 23 | RequestStack $requestStack |
24 | 24 | ) { |
25 | - $this->request = $requestStack->getCurrentRequest(); |
|
25 | + $this->request = $requestStack->getCurrentRequest(); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function calculateOrderPrice(Order $order) |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | |
64 | 64 | $quantity = $orderProduct->getQuantity(); |
65 | 65 | $this->printService->addLine( |
66 | - $indent . $quantity . ' X ' . $product->getProduct(), |
|
67 | - " R$ " . number_format($orderProduct->getTotal(), 2, ',', '.'), |
|
66 | + $indent.$quantity.' X '.$product->getProduct(), |
|
67 | + " R$ ".number_format($orderProduct->getTotal(), 2, ',', '.'), |
|
68 | 68 | '.' |
69 | 69 | ); |
70 | 70 | } |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | foreach ($groupedChildren as $groupName => $orderProductChildren) { |
85 | - $this->printService->addLine(strtoupper($groupName) . ":"); |
|
85 | + $this->printService->addLine(strtoupper($groupName).":"); |
|
86 | 86 | foreach ($orderProductChildren as $orderProductChild) { |
87 | 87 | $product = $orderProductChild->getProduct(); |
88 | - $this->printService->addLine(" - " . $product->getProduct()); |
|
88 | + $this->printService->addLine(" - ".$product->getProduct()); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | $this->printService->addLine('', '', '-'); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | foreach ($queues as $queueName => $orderProducts) { |
113 | 113 | $parentOrderProducts = array_filter($orderProducts, fn($orderProduct) => $orderProduct->getOrderProduct() === null); |
114 | 114 | if (!empty($parentOrderProducts)) { |
115 | - $this->printService->addLine(strtoupper($queueName) . ":"); |
|
115 | + $this->printService->addLine(strtoupper($queueName).":"); |
|
116 | 116 | $this->printQueueProducts($orderProducts); |
117 | 117 | $this->printService->addLine('', '', ' '); |
118 | 118 | } |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | public function generatePrintData(Order $order, Device $device, ?array $aditionalData = []): Spool |
123 | 123 | { |
124 | 124 | |
125 | - $this->printService->addLine("PEDIDO #" . $order->getId()); |
|
125 | + $this->printService->addLine("PEDIDO #".$order->getId()); |
|
126 | 126 | $this->printService->addLine($order->getOrderDate()->format('d/m/Y H:i')); |
127 | 127 | $client = $order->getClient(); |
128 | 128 | $this->printService->addLine(($client !== null ? $client->getName() : 'Não informado')); |
129 | - $this->printService->addLine("R$ " . number_format($order->getPrice(), 2, ',', '.')); |
|
129 | + $this->printService->addLine("R$ ".number_format($order->getPrice(), 2, ',', '.')); |
|
130 | 130 | $this->printService->addLine("", "", "-"); |
131 | 131 | $queues = $this->getQueues($order); |
132 | 132 |
@@ -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 | } |