@@ -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 | } |
@@ -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 | /** |
@@ -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; |
@@ -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('AppBundle: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(); |
@@ -36,10 +36,10 @@ |
||
36 | 36 | { |
37 | 37 | $builder |
38 | 38 | ->remove('status') |
39 | - ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesType::class,]) |
|
39 | + ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesType::class, ]) |
|
40 | 40 | ->add('amount', MoneyType::class, ['scale' => 3, 'grouping' => true, 'currency' => 'EUR', |
41 | 41 | 'label' => 'seizure.totals', 'translation_domain' => 'gs_inventories', |
42 | - 'attr'=> ['class' => 'inventory form-control', 'readonly' => true,],]); |
|
42 | + 'attr'=> ['class' => 'inventory form-control', 'readonly' => true, ], ]); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -37,28 +37,28 @@ |
||
37 | 37 | $builder |
38 | 38 | ->add('inventory', EntityType::class, ['class' => 'AppBundle:Stocks\Inventory', 'choice_label' => 'id', |
39 | 39 | 'label' => 'gestock.id', 'translation_domain' => 'messages', 'empty_data' => null, |
40 | - 'attr'=> ['class' => 'form-control', 'readonly' => true,],]) |
|
40 | + 'attr'=> ['class' => 'form-control', 'readonly' => true, ], ]) |
|
41 | 41 | ->add('article', EntityType::class, ['class' => 'AppBundle:Settings\Article', 'choice_label' => 'name', |
42 | 42 | 'label' => 'title', 'translation_domain' => 'gs_articles', 'empty_data' => null, |
43 | - 'attr'=> ['class' => 'form-control', 'readonly' => true,],]) |
|
43 | + 'attr'=> ['class' => 'form-control', 'readonly' => true, ], ]) |
|
44 | 44 | ->add('quantity', NumberType::class, ['scale' => 3, 'grouping' => true, 'empty_data' => '0,000', |
45 | 45 | 'label' => 'settings.quantity', 'translation_domain' => 'gs_articles', |
46 | - 'attr'=> ['class' => 'inventory form-control', 'readonly' => true,],]) |
|
46 | + 'attr'=> ['class' => 'inventory form-control', 'readonly' => true, ], ]) |
|
47 | 47 | ->add('realstock', NumberType::class, ['scale' => 3, 'grouping' => true, 'empty_data' => '0,000', |
48 | 48 | 'label' => 'seizure.realstock', 'translation_domain' => 'gs_inventories', |
49 | - 'attr'=> ['class' => 'inventory form-control',],]) |
|
49 | + 'attr'=> ['class' => 'inventory form-control', ], ]) |
|
50 | 50 | ->add('unitStorage', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\Unit', |
51 | 51 | 'choice_label' => 'abbr', 'label' => 'gestock.settings.diverse.unitstorage', 'empty_data' => null, |
52 | - 'attr'=> ['class' => 'form-control', 'readonly' => true,],]) |
|
52 | + 'attr'=> ['class' => 'form-control', 'readonly' => true, ], ]) |
|
53 | 53 | ->add('price', MoneyType::class, ['scale' => 3, 'grouping' => true, 'currency' => 'EUR', |
54 | 54 | 'label' => 'settings.price', 'translation_domain' => 'gs_articles', |
55 | - 'attr'=> ['class' => 'inventory form-control', 'readonly' => true,],]) |
|
55 | + 'attr'=> ['class' => 'inventory form-control', 'readonly' => true, ], ]) |
|
56 | 56 | ->add('total', MoneyType::class, ['scale' => 3, 'grouping' => true, 'currency' => 'EUR', |
57 | 57 | 'label' => 'seizure.total', 'translation_domain' => 'gs_inventories', 'mapped' => false, |
58 | - 'attr'=> ['class' => 'inventory form-control', 'readonly' => true,],]) |
|
58 | + 'attr'=> ['class' => 'inventory form-control', 'readonly' => true, ], ]) |
|
59 | 59 | ->add('gap', NumberType::class, ['scale' => 3, 'grouping' => true, 'label' => 'seizure.gap', |
60 | 60 | 'translation_domain' => 'gs_inventories', 'mapped' => false, |
61 | - 'attr'=> ['class' => 'inventory form-control', 'readonly' =>true,],]); |
|
61 | + 'attr'=> ['class' => 'inventory form-control', 'readonly' =>true, ], ]); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -43,42 +43,42 @@ discard block |
||
43 | 43 | public function buildForm(FormBuilderInterface $builder, array $options) |
44 | 44 | { |
45 | 45 | $builder |
46 | - ->add('name', TextType::class, ['label' => 'gestock.title_item', 'attr' => ['class' => 'form-control',],]) |
|
46 | + ->add('name', TextType::class, ['label' => 'gestock.title_item', 'attr' => ['class' => 'form-control', ], ]) |
|
47 | 47 | ->add('packaging', NumberType::class, ['scale' => 3, 'grouping' => true, 'label' => 'settings.packaging', |
48 | - 'translation_domain' => 'gs_articles', 'attr' => ['class' => 'form-control',],]) |
|
48 | + 'translation_domain' => 'gs_articles', 'attr' => ['class' => 'form-control', ], ]) |
|
49 | 49 | ->add('price', MoneyType::class, ['scale' => 3, 'grouping' => true, 'currency' => 'EUR', |
50 | 50 | 'label' => 'settings.price', 'translation_domain' => 'gs_articles', |
51 | - 'attr' => ['class' => 'form-control',],]) |
|
51 | + 'attr' => ['class' => 'form-control', ], ]) |
|
52 | 52 | ->add('tva', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\Tva', 'choice_label' => 'name', |
53 | 53 | 'multiple' => false, 'label' => 'gestock.settings.diverse.vat', |
54 | - 'attr' => ['class' => 'form-control',],]) |
|
54 | + 'attr' => ['class' => 'form-control', ], ]) |
|
55 | 55 | ->add('quantity', HiddenType::class) |
56 | 56 | ->add('minstock', NumberType::class, ['scale' => 3, 'grouping' => true, 'label' => 'settings.stock_alert', |
57 | - 'translation_domain' => 'gs_articles', 'attr' => ['class' => 'form-control',],]) |
|
58 | - ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif',]) |
|
57 | + 'translation_domain' => 'gs_articles', 'attr' => ['class' => 'form-control', ], ]) |
|
58 | + ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif', ]) |
|
59 | 59 | ->add('supplier', EntityType::class, ['class' => 'AppBundle:Settings\Supplier', |
60 | - 'query_builder' => function (EntityRepository $er) { |
|
60 | + 'query_builder' => function(EntityRepository $er) { |
|
61 | 61 | return $er->createQueryBuilder('s') |
62 | 62 | ->where('s.active = 1'); |
63 | 63 | }, 'choice_label' => 'name', 'multiple' => false, 'placeholder' => 'form.choice_supplier', |
64 | 64 | 'label' => 'title', 'translation_domain' => 'gs_suppliers', 'empty_data' => null, |
65 | - 'attr' => ['class' => 'form-control',],]) |
|
65 | + 'attr' => ['class' => 'form-control', ], ]) |
|
66 | 66 | ->add('unitStorage', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\Unit', |
67 | 67 | 'choice_label' => 'name', 'multiple' => false, 'label' => 'gestock.settings.diverse.unitstorage', |
68 | - 'attr' => ['class' => 'form-control',],]) |
|
68 | + 'attr' => ['class' => 'form-control', ], ]) |
|
69 | 69 | ->add('unitWorking', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\Unit', |
70 | 70 | 'choice_label' => 'name', 'multiple' => false, 'label' => 'gestock.settings.diverse.unitworking', |
71 | - 'attr' => ['class' => 'form-control',],]) |
|
71 | + 'attr' => ['class' => 'form-control', ], ]) |
|
72 | 72 | ->add('zoneStorages', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\ZoneStorage', |
73 | 73 | 'choice_label' => 'name', 'multiple' => true, 'expanded' => true, |
74 | - 'label' => 'gestock.settings.diverse.zonestorage', 'attr' => ['class' => 'form-control',],]) |
|
74 | + 'label' => 'gestock.settings.diverse.zonestorage', 'attr' => ['class' => 'form-control', ], ]) |
|
75 | 75 | ->add('familyLog', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\FamilyLog', |
76 | - 'query_builder' => function (EntityRepository $er) { |
|
76 | + 'query_builder' => function(EntityRepository $er) { |
|
77 | 77 | return $er->createQueryBuilder('f') |
78 | 78 | ->orderBy('f.path', 'ASC'); |
79 | 79 | }, 'choice_label' => 'indentedName', 'multiple' => false, |
80 | 80 | 'placeholder' => 'gestock.settings.diverse.choice_family', 'empty_data' => null, |
81 | - 'label' => 'gestock.settings.diverse.familylog', 'attr' => ['class' => 'form-control',],]) |
|
81 | + 'label' => 'gestock.settings.diverse.familylog', 'attr' => ['class' => 'form-control', ], ]) |
|
82 | 82 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()) |
83 | 83 | ; |
84 | 84 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function configureOptions(OptionsResolver $resolver) |
90 | 90 | { |
91 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Article',]); |
|
91 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Article', ]); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | { |
37 | 37 | $builder |
38 | 38 | ->add('name', TextType::class, ['label' => 'gestock.settings.diverse.unitstorage', |
39 | - 'attr' => ['class' => 'half',],]) |
|
40 | - ->add('abbr', TextType::class, ['label' => 'gestock.abbr', 'attr' => ['class' => 'half',],]) |
|
39 | + 'attr' => ['class' => 'half', ], ]) |
|
40 | + ->add('abbr', TextType::class, ['label' => 'gestock.abbr', 'attr' => ['class' => 'half', ], ]) |
|
41 | 41 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()); |
42 | 42 | } |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function configureOptions(OptionsResolver $resolver) |
48 | 48 | { |
49 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Diverse\Unit',]); |
|
49 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Diverse\Unit', ]); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function configureOptions(OptionsResolver $resolver) |
45 | 45 | { |
46 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Orders\Orders',]); |
|
46 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Orders\Orders', ]); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |