@@ -35,20 +35,20 @@ |
||
35 | 35 | public function buildForm(FormBuilderInterface $builder, array $options) |
36 | 36 | { |
37 | 37 | $builder |
38 | - ->add('name', TextType::class, ['label' => 'gestock.settings.company.name',]) |
|
39 | - ->add('status', TextType::class, ['label' => 'gestock.settings.company.status',]) |
|
40 | - ->add('address', TextType::class, ['label' => 'gestock.address',]) |
|
41 | - ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode',]) |
|
38 | + ->add('name', TextType::class, ['label' => 'gestock.settings.company.name', ]) |
|
39 | + ->add('status', TextType::class, ['label' => 'gestock.settings.company.status', ]) |
|
40 | + ->add('address', TextType::class, ['label' => 'gestock.address', ]) |
|
41 | + ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode', ]) |
|
42 | 42 | ->add('town', TextType::class, ['label' => 'gestock.town', 'attr' => [ |
43 | 43 | 'onBlur' => 'this.value=this.value.toUpperCase();', |
44 | 44 | 'onFocus' => 'this.value=this.value.toUpperCase();', |
45 | - 'onKeyup' => 'this.value=this.value.toUpperCase();',]]) |
|
45 | + 'onKeyup' => 'this.value=this.value.toUpperCase();', ]]) |
|
46 | 46 | ->add('phone', 'tel', ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
47 | - 'label' => 'gestock.phone',]) |
|
47 | + 'label' => 'gestock.phone', ]) |
|
48 | 48 | ->add('fax', 'tel', ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
49 | - 'label' => 'gestock.fax',]) |
|
50 | - ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail',]) |
|
51 | - ->add('contact', TextType::class, ['label' => 'gestock.contact',]) |
|
49 | + 'label' => 'gestock.fax', ]) |
|
50 | + ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail', ]) |
|
51 | + ->add('contact', TextType::class, ['label' => 'gestock.contact', ]) |
|
52 | 52 | ->add('gsm', 'tel', ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
53 | 53 | 'label' => 'gestock.gsm']); |
54 | 54 | } |
@@ -37,14 +37,14 @@ |
||
37 | 37 | { |
38 | 38 | $builder->addEventListener( |
39 | 39 | FormEvents::PRE_SET_DATA, |
40 | - function (FormEvent $event) { |
|
40 | + function(FormEvent $event) { |
|
41 | 41 | $form = $event->getForm(); |
42 | 42 | $articles = $event->getData(); |
43 | 43 | |
44 | 44 | $formOptions = ['class' => 'AppBundle:Settings\Supplier', 'query_builder' => |
45 | - function (EntityRepository $er) use ($articles) { |
|
45 | + function(EntityRepository $er) use ($articles) { |
|
46 | 46 | return $er->getSupplierForReassign($articles[0]->getSupplier()); |
47 | - }, 'multiple' => false, 'empty_data' => null,]; |
|
47 | + }, 'multiple' => false, 'empty_data' => null, ]; |
|
48 | 48 | foreach ($articles as $article) { |
49 | 49 | $form->add('supplier-'.$article->getId(), EntityType::class, $formOptions); |
50 | 50 | } |
@@ -37,13 +37,13 @@ |
||
37 | 37 | public function buildForm(FormBuilderInterface $builder, array $options) |
38 | 38 | { |
39 | 39 | $builder |
40 | - ->add('name', TextType::class, ['label' => 'gestock.settings.diverse.family',]) |
|
40 | + ->add('name', TextType::class, ['label' => 'gestock.settings.diverse.family', ]) |
|
41 | 41 | ->add( |
42 | 42 | 'parent', |
43 | 43 | EntityType::class, |
44 | 44 | array( |
45 | 45 | 'class' => 'AppBundle:Settings\Diverse\FamilyLog', |
46 | - 'query_builder' => function (EntityRepository $er) { |
|
46 | + 'query_builder' => function(EntityRepository $er) { |
|
47 | 47 | return $er->createQueryBuilder('f') |
48 | 48 | ->orderBy('f.path', 'ASC'); |
49 | 49 | }, |
@@ -37,7 +37,7 @@ |
||
37 | 37 | ->add( |
38 | 38 | 'rate', |
39 | 39 | PercentType::class, |
40 | - ['scale' => 2, 'type' => 'fractional', 'label' => 'gestock.settings.diverse.vat',] |
|
40 | + ['scale' => 2, 'type' => 'fractional', 'label' => 'gestock.settings.diverse.vat', ] |
|
41 | 41 | ) |
42 | 42 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()); |
43 | 43 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | EntityType::class, |
43 | 43 | array( |
44 | 44 | 'class' => 'AppBundle:Supplier', |
45 | - 'query_builder' => function (EntityRepository $er) { |
|
45 | + 'query_builder' => function(EntityRepository $er) { |
|
46 | 46 | return $er->createQueryBuilder('s') |
47 | 47 | ->where('s.active = 1'); |
48 | 48 | }, |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'label' => 'title', |
54 | 54 | 'translation_domain' => 'gs_suppliers', |
55 | 55 | 'empty_data' => null, |
56 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
56 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
57 | 57 | ) |
58 | 58 | ) |
59 | 59 | ->add( |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'format' => 'EEEE dd MMMM yyyy', |
68 | 68 | 'html5' => false, |
69 | 69 | 'input' => 'datetime', |
70 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
70 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
71 | 71 | ) |
72 | 72 | ) |
73 | 73 | ->add( |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'format' => 'EEEE dd MMMM yyyy', |
82 | 82 | 'html5' => false, |
83 | 83 | 'input' => 'datetime', |
84 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
84 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
85 | 85 | ) |
86 | 86 | ) |
87 | 87 | ->add( |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function setAmount($amount) |
152 | 152 | { |
153 | - $this->amount = (double)$amount; |
|
153 | + $this->amount = (double) $amount; |
|
154 | 154 | |
155 | 155 | return $this; |
156 | 156 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function setTva($tva) |
175 | 175 | { |
176 | - $this->tva = (double)$tva; |
|
176 | + $this->tva = (double) $tva; |
|
177 | 177 | |
178 | 178 | return $this; |
179 | 179 | } |
@@ -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(); |