@@ -70,7 +70,7 @@ |
||
70 | 70 | ->where($query->expr()->neq('s.name', ':idname')) |
71 | 71 | ->andWhere('s.familyLog = :flname') |
72 | 72 | ->andWhere('s.active = true') |
73 | - ->setParameters(['idname' => $supplier->getName(), 'flname' => $supplier->getFamilyLog(),]) |
|
73 | + ->setParameters(['idname' => $supplier->getName(), 'flname' => $supplier->getFamilyLog(), ]) |
|
74 | 74 | ->orderBy('s.name', 'ASC'); |
75 | 75 | |
76 | 76 | return $query; |
@@ -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('App:Settings\Company')->find(1); |
122 | 122 | // Create and save the PDF file to print |
123 | 123 | $html = $this->renderView( |
124 | - 'App:Orders/' . $from . ':print.pdf.twig', |
|
124 | + 'App: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 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $etm = $this->getDoctrine()->getManager(); |
43 | 43 | $item = $this->container->getParameter('knp_paginator.page_range'); |
44 | 44 | $qbd = $etm->getRepository('App:Orders\Orders')->createQueryBuilder('o'); |
45 | - $qbd->where('o.delivdate <= ' . date('Y-m-d')); |
|
45 | + $qbd->where('o.delivdate <= '.date('Y-m-d')); |
|
46 | 46 | $qbd->andWhere('o.status = 1'); |
47 | 47 | |
48 | 48 | $paginator = $this->get('knp_paginator')->paginate($qbd, $request->query->get('page', 1), $item); |
@@ -110,7 +110,7 @@ discard block |
||
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('App:Settings\Article')->getArticleFromSupplier($supplier->getId()); |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | public function editAction(Orders $orders) |
149 | 149 | { |
150 | 150 | $editForm = $this->createForm(OrdersEditType::class, $orders, ['action' => $this |
151 | - ->generateUrl('orders_update', ['id' => $orders->getId()]), 'method' => 'PUT',]); |
|
151 | + ->generateUrl('orders_update', ['id' => $orders->getId()]), 'method' => 'PUT', ]); |
|
152 | 152 | $deleteForm = $this->createDeleteForm($orders->getId(), 'orders_delete'); |
153 | 153 | |
154 | 154 | return ['orders' => $orders, 'edit_form' => $editForm->createView(), |
155 | - 'delete_form' => $deleteForm->createView(),]; |
|
155 | + 'delete_form' => $deleteForm->createView(), ]; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | public function updateAction(Orders $orders, Request $request) |
166 | 166 | { |
167 | 167 | $editForm = $this->createForm(OrdersEditType::class, $orders, ['action' => $this |
168 | - ->generateUrl('orders_update', ['id' => $orders->getId()]), 'method' => 'PUT',]); |
|
168 | + ->generateUrl('orders_update', ['id' => $orders->getId()]), 'method' => 'PUT', ]); |
|
169 | 169 | $deleteForm = $this->createDeleteForm($orders->getId(), 'orders_delete'); |
170 | 170 | $editForm->handleRequest($request); |
171 | 171 | |
172 | 172 | $return = ['orders' => $orders, 'edit_form' => $editForm->createView(), |
173 | - 'delete_form' => $deleteForm->createView(),]; |
|
173 | + 'delete_form' => $deleteForm->createView(), ]; |
|
174 | 174 | |
175 | 175 | if ($editForm->isValid()) { |
176 | 176 | $this->getDoctrine()->getManager()->flush(); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | // Récupérer les articles du fournisseur. |
68 | 68 | $articles = $etm->getRepository('App:Settings\Article')->getArticleFromSupplier($supplier); |
69 | - return ['supplier' => $supplier, 'articles' => $articles, 'delete_form' => $deleteForm->createView(),]; |
|
69 | + return ['supplier' => $supplier, 'articles' => $articles, 'delete_form' => $deleteForm->createView(), ]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | public function createAction(Request $request) |
100 | 100 | { |
101 | 101 | $user = new User(); |
102 | - $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'),]); |
|
102 | + $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'), ]); |
|
103 | 103 | $form->handleRequest($request); |
104 | - $return = ['user' => $user, 'form' => $form->createView(),]; |
|
104 | + $return = ['user' => $user, 'form' => $form->createView(), ]; |
|
105 | 105 | |
106 | 106 | if ($form->isValid()) { |
107 | 107 | $return = $this->validUser($user, 'create'); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $editForm->handleRequest($request); |
162 | 162 | $return = ['user' => $user, |
163 | 163 | 'edit_form' => $editForm->createView(), |
164 | - 'delete_form' => $deleteForm->createView(),]; |
|
164 | + 'delete_form' => $deleteForm->createView(), ]; |
|
165 | 165 | |
166 | 166 | if ($editForm->isValid()) { |
167 | 167 | $return = $this->validUser($user, 'edit'); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | } |
241 | 241 | $userManager = $this->get('fos_user.user_manager'); |
242 | 242 | $userManager->updateUser($user); |
243 | - $this->addFlash('info', 'gestock.' . $action . '.ok'); |
|
243 | + $this->addFlash('info', 'gestock.'.$action.'.ok'); |
|
244 | 244 | |
245 | 245 | if ($action === 'create') { |
246 | 246 | $return = $this->redirectToRoute('user_show', ['id' => $user->getId()]); |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $form = $this->createForm(GroupType::class, $group); |
101 | 101 | AbstractController::addRolesAction($form, $group); |
102 | 102 | $form->handleRequest($request); |
103 | - $return = ['group' => $group, 'form' => $form->createView(),]; |
|
103 | + $return = ['group' => $group, 'form' => $form->createView(), ]; |
|
104 | 104 | |
105 | 105 | if ($form->isValid()) { |
106 | 106 | $etm = $this->getDoctrine()->getManager(); |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | $typeClass, |
51 | 51 | $inventory, |
52 | 52 | ['action' => $this->generateUrl('inventory_update', ['id' => $inventory->getId()]), |
53 | - 'method' => 'PUT',] |
|
53 | + 'method' => 'PUT', ] |
|
54 | 54 | ); |
55 | 55 | $deleteForm = $this->createDeleteForm($inventory->getId(), 'inventory_delete'); |
56 | 56 | |
57 | 57 | $return = ['editForm' => $editForm, 'inventory' => $inventory, '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 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | ['6', 'App:Settings\Supplier'], |
54 | 54 | ['7', 'App:Settings\Article'], |
55 | 55 | ['8', 'App:Settings\Diverse\Material'], |
56 | - ['9', 'App:Stocks\Inventory'], ); |
|
56 | + ['9', 'App:Stocks\Inventory'],); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |