@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return $this->createForm( |
| 41 | 41 | OrdersType::class, |
| 42 | 42 | $orders, |
| 43 | - ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST',] |
|
| 43 | + ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST', ] |
|
| 44 | 44 | ); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->addRolesAction($editForm, $entity); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - return [$prefixRoute => $entity, 'edit_form' => $editForm->createView(),]; |
|
| 66 | + return [$prefixRoute => $entity, 'edit_form' => $editForm->createView(), ]; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -117,22 +117,22 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | protected function abstractPrintAction(Orders $orders, $from) |
| 119 | 119 | { |
| 120 | - $file = $from . '-' . $orders->getId() . '.pdf'; |
|
| 120 | + $file = $from.'-'.$orders->getId().'.pdf'; |
|
| 121 | 121 | $company = $this->getDoctrine()->getManager()->getRepository('AppBundle:Settings\Company')->find(1); |
| 122 | 122 | // Create and save the PDF file to print |
| 123 | 123 | $html = $this->renderView( |
| 124 | - 'AppBundle:Orders/' . $from . ':print.pdf.twig', |
|
| 124 | + 'AppBundle:Orders/'.$from.':print.pdf.twig', |
|
| 125 | 125 | ['articles' => $orders->getArticles(), 'orders' => $orders, 'company' => $company, ] |
| 126 | 126 | ); |
| 127 | 127 | return new Response( |
| 128 | 128 | $this->get('knp_snappy.pdf')->getOutputFromHtml( |
| 129 | 129 | $html, |
| 130 | - $this->get('app.helper.controller')->getArray((string)date('d/m/y - H:i:s'), '') |
|
| 130 | + $this->get('app.helper.controller')->getArray((string) date('d/m/y - H:i:s'), '') |
|
| 131 | 131 | ), |
| 132 | 132 | 200, |
| 133 | 133 | array( |
| 134 | 134 | 'Content-Type' => 'application/pdf', |
| 135 | - 'Content-Disposition' => 'attachment; filename="' . $file . '"' |
|
| 135 | + 'Content-Disposition' => 'attachment; filename="'.$file.'"' |
|
| 136 | 136 | ) |
| 137 | 137 | ); |
| 138 | 138 | } |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | |
| 111 | 111 | $orders = new Orders(); |
| 112 | 112 | $form = $this->createForm(OrdersType::class, $orders); |
| 113 | - $return = ['orders' => $orders, 'form' => $form->createView(),]; |
|
| 113 | + $return = ['orders' => $orders, 'form' => $form->createView(), ]; |
|
| 114 | 114 | $form->handleRequest($request); |
| 115 | 115 | $supplier = $orders->getSupplier(); |
| 116 | 116 | $articles = $etm->getRepository('AppBundle:Settings\Article')->getArticleFromSupplier($supplier->getId()); |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $builder |
| 37 | 37 | ->add('supplier', EntityType::class, ['class' => 'AppBundle:Settings\Supplier', |
| 38 | - 'query_builder' => function (EntityRepository $er) { |
|
| 38 | + 'query_builder' => function(EntityRepository $er) { |
|
| 39 | 39 | return $er->createQueryBuilder('s')->where('s.active = 1'); |
| 40 | 40 | }, 'required' => false, 'choice_label' => 'name', 'multiple' => false, |
| 41 | 41 | 'placeholder' => 'form.choice_supplier', 'label' => 'title', 'translation_domain' => 'gs_suppliers', |
| 42 | - 'empty_data' => null, 'attr' => ['class' => 'form-control',],]); |
|
| 42 | + 'empty_data' => null, 'attr' => ['class' => 'form-control', ], ]); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public function configureOptions(OptionsResolver $resolver) |
| 49 | 49 | { |
| 50 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Orders\Orders',]); |
|
| 50 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Orders\Orders', ]); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |