Parcourir la source

Modèle Section

feature/module_traiteur_v1
Fab il y a 3 ans
Parent
révision
34ea600618
1 fichiers modifiés avec 17 ajouts et 17 suppressions
  1. +17
    -17
      ShopBundle/Form/Backend/ProductFamily/ProductType.php

+ 17
- 17
ShopBundle/Form/Backend/ProductFamily/ProductType.php Voir le fichier

@@ -29,6 +29,7 @@ class ProductType extends AbstractType
$this->em = $entityManager;
$this->utils = $utils;
}

public function buildForm(FormBuilderInterface $builder, array $options)
{

@@ -36,12 +37,11 @@ class ProductType extends AbstractType

$builder->add('title', TextType::class, array(
"required" => false
)) ;

));

$builder->add('quantity', NumberType::class, array(
'label' => 'Quantité',
'required'=>false,
'required' => false,
'attr' => [
'append_html' => 'g'
]
@@ -50,9 +50,9 @@ class ProductType extends AbstractType
$unitClass = $this->em->getClassMetadata(UnitInterface::class)->getName();

$builder->add('unit', EntityType::class, array(
'class'=> $unitClass,
'class' => $unitClass,
'data' => 0,
'required'=>false,
'required' => false,
'choice_attr' => function ($choice) {
return [
'data-unit-reference' => $choice->getUnitReference(),
@@ -75,7 +75,7 @@ class ProductType extends AbstractType

$builder->add('buyingPrice', NumberType::class, array(
'label' => 'Prix d\'achat',
'required'=>false
'required' => false
));

$builder->add('buyingPriceWithTax', NumberType::class, array(
@@ -86,7 +86,7 @@ class ProductType extends AbstractType

$builder->add('buyingPriceByRefUnit', NumberType::class, array(
'label' => 'Prix d\'achat',
'required'=>false
'required' => false
));

$builder->add('buyingPriceByRefUnitWithTax', NumberType::class, array(
@@ -96,12 +96,12 @@ class ProductType extends AbstractType
));
$builder->add('multiplyingFactor', NumberType::class, array(
'label' => 'Coefficiant de multiplication',
'mapped'=>false,
'required'=>false
'mapped' => false,
'required' => false
));

$builder->add('priceByRefUnit', NumberType::class, array(
'required'=>false
'required' => false
));

$builder->add('priceByRefUnitWithTax', NumberType::class, array(
@@ -126,19 +126,19 @@ class ProductType extends AbstractType
$builder->add('position', HiddenType::class);
$builder->add('status', HiddenType::class);
$builder->add('exportTitle', TextType::class, array(
'required' =>false
'required' => false
));
$builder->add('exportNote', TextType::class, array(
'required' =>false
'required' => false
));
$reductionCartClass = $this->em->getClassMetadata(ReductionCartInterface::class)->getName();
$reductionCartRepo = $this->em->getRepository(ReductionCartInterface::class);

/* $builder->add('giftVoucherReductionCart', EntityType::class, array(
'required' =>false,
'class'=> $reductionCartClass,
'choices' => $reductionCartRepo->getOnlineReductionCart(),
));*/
/* $builder->add('giftVoucherReductionCart', EntityType::class, array(
'required' =>false,
'class'=> $reductionCartClass,
'choices' => $reductionCartRepo->getOnlineReductionCart(),
));*/

}


Chargement…
Annuler
Enregistrer