@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $builder |
| 40 | 40 | ->add('quantity', NumberType::class, ['required' => false, 'scale' => 3, 'grouping' => true, |
| 41 | 41 | 'empty_data' => '0,000', 'label' => 'settings.quantity', 'translation_domain' => 'gs_articles', |
| 42 | - 'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ],]) |
|
| 42 | + 'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ], ]) |
|
| 43 | 43 | ->add('price', MoneyType::class, ['required' => true, 'scale' => 3, 'grouping' => true, |
| 44 | 44 | 'currency' => 'EUR', 'label' => 'settings.price', 'translation_domain' => 'gs_articles', |
| 45 | 45 | 'attr'=> ['class' => 'form-control text-right', ]]) |
@@ -39,17 +39,17 @@ discard block |
||
| 39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 40 | 40 | { |
| 41 | 41 | $builder |
| 42 | - ->add('name', TextType::class, ['label' => 'gestock.name', 'attr' => ['class' => 'half'],]) |
|
| 42 | + ->add('name', TextType::class, ['label' => 'gestock.name', 'attr' => ['class' => 'half'], ]) |
|
| 43 | 43 | ->add('unitWorking', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\Unit', |
| 44 | 44 | 'choice_label' => 'name', 'multiple' => false, 'label' => 'gestock.settings.diverse.unitworking', |
| 45 | - 'attr' => ['class' => 'half',],]) |
|
| 46 | - ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif',]) |
|
| 47 | - ->add('multiple', CheckboxType::class, ['required' => false, 'label' => 'gestock.multiple',]) |
|
| 45 | + 'attr' => ['class' => 'half', ], ]) |
|
| 46 | + ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif', ]) |
|
| 47 | + ->add('multiple', CheckboxType::class, ['required' => false, 'label' => 'gestock.multiple', ]) |
|
| 48 | 48 | ->add('articles', EntityType::class, ['class' => 'AppBundle:Settings\Article', |
| 49 | - 'query_builder' => function (EntityRepository $er) { |
|
| 49 | + 'query_builder' => function(EntityRepository $er) { |
|
| 50 | 50 | return $er->createQueryBuilder('a')->orderBy('a.name', 'ASC'); |
| 51 | 51 | }, 'choice_label' => 'name', 'multiple' => true, 'expanded' => true, 'label' => 'title', |
| 52 | - 'translation_domain' => 'gs_articles',]) |
|
| 52 | + 'translation_domain' => 'gs_articles', ]) |
|
| 53 | 53 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()) |
| 54 | 54 | ; |
| 55 | 55 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | public function configureOptions(OptionsResolver $resolver) |
| 61 | 61 | { |
| 62 | 62 | $resolver->setDefaults( |
| 63 | - ['data_class' => 'AppBundle\Entity\Settings\Diverse\Material',] |
|
| 63 | + ['data_class' => 'AppBundle\Entity\Settings\Diverse\Material', ] |
|
| 64 | 64 | ); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $paginator = $this->get('knp_paginator')->paginate($entities, $request->query->get('page', 1), $item); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - return ['entities' => $entities, 'ctEntity' => count($entities), 'paginator' => $paginator,]; |
|
| 51 | + return ['entities' => $entities, 'ctEntity' => count($entities), 'paginator' => $paginator, ]; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $deleteForm = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete'); |
| 64 | 64 | |
| 65 | - return [$prefixRoute => $entity, 'delete_form' => $deleteForm->createView(),]; |
|
| 65 | + return [$prefixRoute => $entity, 'delete_form' => $deleteForm->createView(), ]; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | $this->addFlash('danger', 'gestock.settings.'.$prefixRoute.'.add2'); |
| 86 | 86 | } else { |
| 87 | 87 | $entityNew = $etm->getClassMetadata($entityPath)->newInstance(); |
| 88 | - $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl($prefixRoute.'_create'),]); |
|
| 88 | + $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl($prefixRoute.'_create'), ]); |
|
| 89 | 89 | |
| 90 | 90 | if ($entityName === 'Staff\Group') { |
| 91 | 91 | $this->addRolesAction($form, $entityNew); |
| 92 | 92 | } |
| 93 | - $return = [strtolower($entityName) => $entityNew, 'form' => $form->createView(),]; |
|
| 93 | + $return = [strtolower($entityName) => $entityNew, 'form' => $form->createView(), ]; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return $return; |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $etm = $this->getDoctrine()->getManager(); |
| 112 | 112 | $entityNew = $etm->getClassMetadata($entityPath)->newInstance(); |
| 113 | - $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl($prefixRoute.'_create'),]); |
|
| 113 | + $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl($prefixRoute.'_create'), ]); |
|
| 114 | 114 | if ($entityName === 'Staff\Group') { |
| 115 | 115 | $this->addRolesAction($form, $entityNew); |
| 116 | 116 | } |
| 117 | 117 | $form->handleRequest($request); |
| 118 | - $return = [$entityName => $entityNew, 'form' => $form->createView(),]; |
|
| 118 | + $return = [$entityName => $entityNew, 'form' => $form->createView(), ]; |
|
| 119 | 119 | |
| 120 | 120 | if ($form->isValid()) { |
| 121 | 121 | $etm = $this->getDoctrine()->getManager(); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $deleteForm = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete'); |
| 156 | 156 | |
| 157 | 157 | return [$prefixRoute => $entity, 'edit_form' => $editForm->createView(), |
| 158 | - 'delete_form' => $deleteForm->createView(),]; |
|
| 158 | + 'delete_form' => $deleteForm->createView(), ]; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $deleteForm = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete'); |
| 182 | 182 | |
| 183 | 183 | $return = [$prefixRoute => $entity, 'edit_form' => $editForm->createView(), |
| 184 | - 'delete_form' => $deleteForm->createView(),]; |
|
| 184 | + 'delete_form' => $deleteForm->createView(), ]; |
|
| 185 | 185 | |
| 186 | 186 | if ($editForm->isValid()) { |
| 187 | 187 | $this->getDoctrine()->getManager()->flush(); |
@@ -223,9 +223,9 @@ discard block |
||
| 223 | 223 | public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName, $prefixRoute) |
| 224 | 224 | { |
| 225 | 225 | $etm = $this->getDoctrine()->getManager(); |
| 226 | - $form = $this->createDeleteForm($entity->getId(), $prefixRoute . '_delete'); |
|
| 226 | + $form = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete'); |
|
| 227 | 227 | $entityArticles = $etm |
| 228 | - ->getRepository('AppBundle:' . $entityName . 'Articles') |
|
| 228 | + ->getRepository('AppBundle:'.$entityName.'Articles') |
|
| 229 | 229 | ->findBy([$prefixRoute => $entity->getId()]); |
| 230 | 230 | |
| 231 | 231 | if ($form->handleRequest($request)->isValid()) { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | } else { |
| 261 | 261 | $alias = current($qbd->getDQLPart('from'))->getAlias(); |
| 262 | 262 | } |
| 263 | - $qbd->orderBy($alias . '.' . $order['field'], $order['type']); |
|
| 263 | + $qbd->orderBy($alias.'.'.$order['field'], $order['type']); |
|
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | 266 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | protected function testReturnParam($entity, $prefixRoute) |
| 292 | 292 | { |
| 293 | - $entityArray = ['article', 'supplier', 'familylog', 'zonestorage', 'unit', 'material',]; |
|
| 293 | + $entityArray = ['article', 'supplier', 'familylog', 'zonestorage', 'unit', 'material', ]; |
|
| 294 | 294 | if (in_array($prefixRoute, $entityArray, true)) { |
| 295 | 295 | $param = ['slug' => $entity->getSlug()]; |
| 296 | 296 | } else { |
@@ -40,49 +40,49 @@ discard block |
||
| 40 | 40 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 41 | 41 | { |
| 42 | 42 | $builder |
| 43 | - ->add('name', TextType::class, ['label' => 'gestock.name', 'attr' => ['class' => 'form-control',],]) |
|
| 43 | + ->add('name', TextType::class, ['label' => 'gestock.name', 'attr' => ['class' => 'form-control', ], ]) |
|
| 44 | 44 | ->add('address', TextType::class, ['label' => 'gestock.address', |
| 45 | - 'attr' => ['placeholder' => 'gestock.address', 'class' => 'form-control',],]) |
|
| 45 | + 'attr' => ['placeholder' => 'gestock.address', 'class' => 'form-control', ], ]) |
|
| 46 | 46 | ->add('zipcode', TextType::class, ['attr' => ['placeholder' => 'gestock.zipcode', |
| 47 | - 'class' => 'form-control half',],]) |
|
| 47 | + 'class' => 'form-control half', ], ]) |
|
| 48 | 48 | ->add('town', TextType::class, ['attr' => ['placeholder' => 'gestock.town', |
| 49 | - 'class' => 'form-control half',],]) |
|
| 49 | + 'class' => 'form-control half', ], ]) |
|
| 50 | 50 | ->add('phone', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 51 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
| 52 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.phone',]) |
|
| 51 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
| 52 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.phone', ]) |
|
| 53 | 53 | ->add('fax', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 54 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
| 55 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.fax', |
|
| 56 | - 'attr' => ['class' => 'form-control',]]) |
|
| 57 | - ->add('mail', EmailType::class, ['label' => 'gestock.mail', 'attr' => ['class' => 'form-control',]]) |
|
| 58 | - ->add('contact', TextType::class, ['label' => 'gestock.contact', 'attr' => ['class' => 'form-control',],]) |
|
| 54 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
| 55 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.fax', |
|
| 56 | + 'attr' => ['class' => 'form-control', ]]) |
|
| 57 | + ->add('mail', EmailType::class, ['label' => 'gestock.mail', 'attr' => ['class' => 'form-control', ]]) |
|
| 58 | + ->add('contact', TextType::class, ['label' => 'gestock.contact', 'attr' => ['class' => 'form-control', ], ]) |
|
| 59 | 59 | ->add('gsm', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 60 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
| 61 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.gsm', |
|
| 62 | - 'attr' => ['class' => 'form-control',]]) |
|
| 60 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
| 61 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.gsm', |
|
| 62 | + 'attr' => ['class' => 'form-control', ]]) |
|
| 63 | 63 | /** |
| 64 | 64 | * Délai de livraison A = jour de Cmde, |
| 65 | 65 | * (B, C, D, E) = jour de livraison |
| 66 | 66 | */ |
| 67 | 67 | ->add('delaydeliv', ChoiceType::class, ['choices' => ['form.atob' => 1, 'form.atoc' => 2, |
| 68 | - 'form.atod' => 3, 'form.atoe' => 4,], 'choices_as_values' => true, 'label' => 'settings.delay', |
|
| 69 | - 'translation_domain' => 'gs_suppliers', 'attr' => ['class' => 'form-control half',]]) |
|
| 68 | + 'form.atod' => 3, 'form.atoe' => 4, ], 'choices_as_values' => true, 'label' => 'settings.delay', |
|
| 69 | + 'translation_domain' => 'gs_suppliers', 'attr' => ['class' => 'form-control half', ]]) |
|
| 70 | 70 | /** |
| 71 | 71 | * Choix du jour de la semaine pour les Cmdes |
| 72 | 72 | * Numérotation voir http://php.net/manual/fr/function.date.php format 'N' |
| 73 | 73 | */ |
| 74 | 74 | ->add('orderdate', ChoiceType::class, ['choices' => ['Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, |
| 75 | - 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7,], 'choices_as_values' => true, |
|
| 75 | + 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7, ], 'choices_as_values' => true, |
|
| 76 | 76 | 'choice_translation_domain' => true, 'translation_domain' => 'messages', 'label' => 'day_order', |
| 77 | - 'attr' => ['class' => 'form-control',], 'expanded' => true, 'multiple' => true,]) |
|
| 77 | + 'attr' => ['class' => 'form-control', ], 'expanded' => true, 'multiple' => true, ]) |
|
| 78 | 78 | ->add('familyLog', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\FamilyLog', |
| 79 | - 'query_builder' => function (EntityRepository $er) { |
|
| 79 | + 'query_builder' => function(EntityRepository $er) { |
|
| 80 | 80 | return $er->createQueryBuilder('f') |
| 81 | 81 | ->orderBy('f.path', 'ASC'); |
| 82 | 82 | }, 'choice_label' => 'indentedName', 'multiple' => false, |
| 83 | 83 | 'placeholder' => 'gestock.settings.diverse.choice_family', 'empty_data' => null, |
| 84 | - 'label' => 'gestock.settings.diverse.familylog', 'attr' => ['class' => 'form-control half',]]) |
|
| 85 | - ->add('active', HiddenType::class, ['data' => true,]); |
|
| 84 | + 'label' => 'gestock.settings.diverse.familylog', 'attr' => ['class' => 'form-control half', ]]) |
|
| 85 | + ->add('active', HiddenType::class, ['data' => true, ]); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function configureOptions(OptionsResolver $resolver) |
| 92 | 92 | { |
| 93 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Supplier',]); |
|
| 93 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Supplier', ]); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -36,15 +36,15 @@ |
||
| 36 | 36 | { |
| 37 | 37 | $builder |
| 38 | 38 | ->add('inventory_style', ChoiceType::class, ['choices' => ['gestock.settings.settings.global' => 'global', |
| 39 | - 'gestock.settings.settings.zone_storage' => 'zonestorage',], 'choices_as_values' => true, |
|
| 39 | + 'gestock.settings.settings.zone_storage' => 'zonestorage', ], 'choices_as_values' => true, |
|
| 40 | 40 | 'expanded' => true, 'multiple' => false, |
| 41 | - 'label' => 'gestock.settings.settings.style_inventory',]) |
|
| 41 | + 'label' => 'gestock.settings.settings.style_inventory', ]) |
|
| 42 | 42 | ->add('calculation', ChoiceType::class, ['choices' => ['gestock.settings.settings.fifo' => 'fifo', |
| 43 | - 'gestock.settings.settings.weighted' => 'weighted',], 'choices_as_values' => true, |
|
| 43 | + 'gestock.settings.settings.weighted' => 'weighted', ], 'choices_as_values' => true, |
|
| 44 | 44 | 'expanded' => true, 'multiple' => false, |
| 45 | - 'label' => 'gestock.settings.settings.calculation',]) |
|
| 45 | + 'label' => 'gestock.settings.settings.calculation', ]) |
|
| 46 | 46 | ->add('currency', CurrencyType::class, ['multiple' => false, 'expanded' => false, |
| 47 | - 'preferred_choices' => ['EUR'], 'label' => 'gestock.settings.settings.currency',]) |
|
| 47 | + 'preferred_choices' => ['EUR'], 'label' => 'gestock.settings.settings.currency', ]) |
|
| 48 | 48 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()) |
| 49 | 49 | ; |
| 50 | 50 | } |
@@ -47,16 +47,16 @@ |
||
| 47 | 47 | if ($ctEntity > 0 && $request->getMethod() == 'GET') { |
| 48 | 48 | $message = 'gestock.install.st'.$number.'.yet_exist'; |
| 49 | 49 | } |
| 50 | - $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number),]); |
|
| 50 | + $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number), ]); |
|
| 51 | 51 | if ($entityName === 'Staff\Group') { |
| 52 | 52 | $this->addRolesAction($form, $entityNew); |
| 53 | 53 | } |
| 54 | 54 | if (is_int($number)) { |
| 55 | - $return = ['message' => $message, 'form' => $form->createView(),]; |
|
| 55 | + $return = ['message' => $message, 'form' => $form->createView(), ]; |
|
| 56 | 56 | } else { |
| 57 | 57 | $return = ['message' => $message, |
| 58 | 58 | $this->nameToVariable($entityName) => $entityNew, |
| 59 | - 'form' => $form->createView(),]; |
|
| 59 | + 'form' => $form->createView(), ]; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if ($form->handleRequest($request)->isValid()) { |
@@ -36,20 +36,20 @@ |
||
| 36 | 36 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 37 | 37 | { |
| 38 | 38 | $builder |
| 39 | - ->add('name', TextType::class, ['label' => 'gestock.settings.company.name',]) |
|
| 40 | - ->add('status', TextType::class, ['label' => 'gestock.settings.company.status',]) |
|
| 41 | - ->add('address', TextType::class, ['label' => 'gestock.address',]) |
|
| 42 | - ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode',]) |
|
| 39 | + ->add('name', TextType::class, ['label' => 'gestock.settings.company.name', ]) |
|
| 40 | + ->add('status', TextType::class, ['label' => 'gestock.settings.company.status', ]) |
|
| 41 | + ->add('address', TextType::class, ['label' => 'gestock.address', ]) |
|
| 42 | + ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode', ]) |
|
| 43 | 43 | ->add('town', TextType::class, ['label' => 'gestock.town', 'attr' => [ |
| 44 | 44 | 'onBlur' => 'this.value=this.value.toUpperCase();', |
| 45 | 45 | 'onFocus' => 'this.value=this.value.toUpperCase();', |
| 46 | - 'onKeyup' => 'this.value=this.value.toUpperCase();',]]) |
|
| 46 | + 'onKeyup' => 'this.value=this.value.toUpperCase();', ]]) |
|
| 47 | 47 | ->add('phone', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 48 | - 'label' => 'gestock.phone',]) |
|
| 48 | + 'label' => 'gestock.phone', ]) |
|
| 49 | 49 | ->add('fax', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 50 | - 'label' => 'gestock.fax',]) |
|
| 51 | - ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail',]) |
|
| 52 | - ->add('contact', TextType::class, ['label' => 'gestock.contact',]) |
|
| 50 | + 'label' => 'gestock.fax', ]) |
|
| 51 | + ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail', ]) |
|
| 52 | + ->add('contact', TextType::class, ['label' => 'gestock.contact', ]) |
|
| 53 | 53 | ->add('gsm', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
| 54 | 54 | 'label' => 'gestock.gsm']); |
| 55 | 55 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 33 | 33 | { |
| 34 | 34 | $builder |
| 35 | - ->add('name', null, ['label' => 'form.group_name', 'translation_domain' => 'FOSUserBundle',]) |
|
| 35 | + ->add('name', null, ['label' => 'form.group_name', 'translation_domain' => 'FOSUserBundle', ]) |
|
| 36 | 36 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()) |
| 37 | 37 | ; |
| 38 | 38 | } |