@@ -22,7 +22,7 @@ |
||
| 22 | 22 | 'class' => 'AppBundle\Entity\Group', |
| 23 | 23 | 'expanded' => true, |
| 24 | 24 | 'multiple' => true, |
| 25 | - 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
|
| 25 | + 'apply_filter' => function(QueryInterface $filterQuery, $field, $values) { |
|
| 26 | 26 | $query = $filterQuery->getQueryBuilder(); |
| 27 | 27 | $query->leftJoin($field, 'm'); |
| 28 | 28 | // Filter results using orWhere matching ID |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ($item->getUri() === $request->getRequestUri()) { |
| 23 | 23 | // URL's completely match |
| 24 | 24 | return true; |
| 25 | - } elseif ($item->getUri() !== $request->getBaseUrl() . '/' && |
|
| 25 | + } elseif ($item->getUri() !== $request->getBaseUrl().'/' && |
|
| 26 | 26 | substr($request->getRequestUri(), 0, strlen($item->getUri())) |
| 27 | 27 | === $item->getUri()) { |
| 28 | 28 | // URL isn't just "/" and the first part of the URL match |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $typeClass, |
| 49 | 49 | $inventory, |
| 50 | 50 | ['action' => $this->generateUrl('inventory_update', ['id' => $inventory->getId()]), |
| 51 | - 'method' => 'PUT',] |
|
| 51 | + 'method' => 'PUT', ] |
|
| 52 | 52 | ); |
| 53 | 53 | $deleteForm = $this->createDeleteForm($inventory->getId(), 'inventory_delete'); |
| 54 | 54 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | 'inventory' => $inventory, |
| 57 | 57 | 'zoneStorages' => $zoneStorages, |
| 58 | 58 | 'edit_form' => $editForm->createView(), |
| 59 | - 'delete_form' => $deleteForm->createView(),]; |
|
| 59 | + 'delete_form' => $deleteForm->createView(), ]; |
|
| 60 | 60 | return $return; |
| 61 | 61 | } |
| 62 | 62 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | return $this->createForm( |
| 73 | 73 | InventoryType::class, |
| 74 | 74 | $inventory, |
| 75 | - ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'PUT',] |
|
| 75 | + ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'PUT', ] |
|
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'label' => 'gestock.id', |
| 45 | 45 | 'translation_domain' => 'messages', |
| 46 | 46 | 'empty_data' => null, |
| 47 | - 'attr'=> ['class' => 'form-control', 'readonly' => true,], |
|
| 47 | + 'attr'=> ['class' => 'form-control', 'readonly' => true, ], |
|
| 48 | 48 | ) |
| 49 | 49 | ) |
| 50 | 50 | ->add( |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | 'empty_data' => '0,000', |
| 81 | 81 | 'label' => 'seizure.realstock', |
| 82 | 82 | 'translation_domain' => 'gs_inventories', |
| 83 | - 'attr'=> ['class' => 'inventory form-control',] |
|
| 83 | + 'attr'=> ['class' => 'inventory form-control', ] |
|
| 84 | 84 | ) |
| 85 | 85 | ) |
| 86 | 86 | ->add( |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | parent::buildForm($builder, $options); |
| 38 | 38 | $builder |
| 39 | 39 | ->remove('articles') |
| 40 | - ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesZonesType::class,]); |
|
| 40 | + ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesZonesType::class, ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | * |
| 190 | 190 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
| 191 | 191 | * @param \AppBundle\Entity\Supplier $supplier Supplier to desactivate |
| 192 | - * @return array |
|
| 192 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 193 | 193 | */ |
| 194 | 194 | public function changeAction(Request $request, Supplier $supplier) |
| 195 | 195 | { |
@@ -269,7 +269,7 @@ |
||
| 269 | 269 | * @Method("GET") |
| 270 | 270 | * @Template() |
| 271 | 271 | * |
| 272 | - * @param \AppBundle\Entity\Inventory $orders Inventory item to print |
|
| 272 | + * @param Orders $orders Inventory item to print |
|
| 273 | 273 | * @return \Symfony\Component\HttpFoundation\Response |
| 274 | 274 | */ |
| 275 | 275 | public function printAction(Orders $orders) |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $em = $this->getDoctrine()->getManager(); |
| 47 | 47 | $item = $this->container->getParameter('knp_paginator.page_range'); |
| 48 | 48 | $qb = $em->getRepository('AppBundle:Orders')->createQueryBuilder('o'); |
| 49 | - $qb->where('o.orderdate < ' . date('Y-m-d')); |
|
| 49 | + $qb->where('o.orderdate < '.date('Y-m-d')); |
|
| 50 | 50 | |
| 51 | 51 | $createForm = $this->createCreateForm('orders_create'); |
| 52 | 52 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | $orders = new Orders(); |
| 116 | 116 | $form = $this->createForm(OrdersType::class, $orders); |
| 117 | - $return = ['orders' => $orders, 'form' => $form->createView(),]; |
|
| 117 | + $return = ['orders' => $orders, 'form' => $form->createView(), ]; |
|
| 118 | 118 | $form->handleRequest($request); |
| 119 | 119 | $supplier = $orders->getSupplier(); |
| 120 | 120 | $articles = $etm->getRepository('AppBundle:Article')->getArticleFromSupplier($supplier->getId()); |
@@ -230,8 +230,8 @@ discard block |
||
| 230 | 230 | if ($date >= date('w')) { |
| 231 | 231 | $diffOrder = $date - date('w'); |
| 232 | 232 | $diffDeliv = $diffOrder + $supplier->getDelaydeliv(); |
| 233 | - $dateOrder = date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date('j')+$diffOrder, date('Y'))); |
|
| 234 | - $delivDate = date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date('j')+$diffDeliv, date('Y'))); |
|
| 233 | + $dateOrder = date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date('j') + $diffOrder, date('Y'))); |
|
| 234 | + $delivDate = date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date('j') + $diffDeliv, date('Y'))); |
|
| 235 | 235 | $orders->setOrderDate(\DateTime::createFromFormat('Y-m-d H:i:s', $dateOrder)); |
| 236 | 236 | $orders->setDelivDate(\DateTime::createFromFormat('Y-m-d H:i:s', $delivDate)); |
| 237 | 237 | break; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | public function printAction(Orders $orders) |
| 277 | 277 | { |
| 278 | - $file = 'order-' . $orders->getId() . '.pdf'; |
|
| 278 | + $file = 'order-'.$orders->getId().'.pdf'; |
|
| 279 | 279 | $company = $this->getDoctrine()->getManager()->getRepository('AppBundle:Company')->find(1); |
| 280 | 280 | // Create and save the PDF file to print |
| 281 | 281 | $html = $this->renderView( |
@@ -285,12 +285,12 @@ discard block |
||
| 285 | 285 | return new Response( |
| 286 | 286 | $this->get('knp_snappy.pdf')->getOutputFromHtml( |
| 287 | 287 | $html, |
| 288 | - $this->getArray((string)date('d/m/y - H:i:s'), '') |
|
| 288 | + $this->getArray((string) date('d/m/y - H:i:s'), '') |
|
| 289 | 289 | ), |
| 290 | 290 | 200, |
| 291 | 291 | array( |
| 292 | 292 | 'Content-Type' => 'application/pdf', |
| 293 | - 'Content-Disposition' => 'attachment; filename="' . $file . '"' |
|
| 293 | + 'Content-Disposition' => 'attachment; filename="'.$file.'"' |
|
| 294 | 294 | ) |
| 295 | 295 | ); |
| 296 | 296 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | /** |
| 159 | 159 | * Get amount |
| 160 | 160 | * |
| 161 | - * @return string |
|
| 161 | + * @return double |
|
| 162 | 162 | */ |
| 163 | 163 | public function getAmount() |
| 164 | 164 | { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | /** |
| 182 | 182 | * Get tva |
| 183 | 183 | * |
| 184 | - * @return string |
|
| 184 | + * @return double |
|
| 185 | 185 | */ |
| 186 | 186 | public function getTva() |
| 187 | 187 | { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | return $this->createForm( |
| 38 | 38 | OrdersType::class, |
| 39 | 39 | $orders, |
| 40 | - ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST',] |
|
| 40 | + ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST', ] |
|
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | } |