<?php
namespace App\Form\Billing;
use App\Entity\Billing;
use App\Entity\CancelReason;
use App\Entity\Client;
use App\Entity\Company;
use App\Entity\Contract;
use App\Entity\Intervenant;
use App\Entity\Product;
use App\Entity\RDV;
use App\Entity\RDVProduct;
use App\Entity\Salon;
use App\Entity\Site;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class LotType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('start', TextType::class, [
'label' => 'Choisir une date de début',
'required' => true,
'attr' => [
'placeholder' => 'Choisir une date de début',
'class' => 'flatpicker',
],
'label_attr' => array('class' => ''),
])
->add('end', TextType::class, [
'label' => 'Choisir une date de fin',
'required' => true,
'attr' => [
'placeholder' => 'Choisir une date de fin',
'class' => 'flatpicker',
],
'label_attr' => array('class' => ''),
])
->add('modeEnvoi', ChoiceType::class, [
'label' => 'Choisir un mode envoi',
'choices'=> [
'Par mail' => 'mail',
'Par courrier' => 'courrier',
],
'attr' => [
'placeholder' => 'Choisir un mode d\'envoi',
],
'label_attr' => array('class' => ''),
])
->add('status', ChoiceType::class, [
'label' => 'Choisir un statut',
'choices'=> [
'Validée' => Billing::STATUS_VALIDE,
'Envoyée' => Billing::STATUS_SENT,
'Reglée' => Billing::STATUS_REGLEE,
'Soldée' => Billing::STATUS_SOLDE,
'En cours' => Billing::STATUS_EN_COURS,
'Contentieux' => Billing::STATUS_CONTENTIEUX,
],
'attr' => [
'placeholder' => 'Choisir un statut',
],
'required' => false,
'placeholder' => 'Choisir un statut',
'label_attr' => array('class' => ''),
])
->add('site', EntityType::class, [
'label' => 'Choisir un site',
'class' => Site::class,
'placeholder' => 'Choisir un site',
'attr' => [
'placeholder' => 'Choisir un site',
],
'label_attr' => array('class' => ''),
'required' => false
])
->add('client', EntityType::class, [
'label' => 'Choisir un client',
'class' => Client::class,
'placeholder' => 'Choisir un client',
'attr' => [
'placeholder' => 'Choisir un client',
],
'label_attr' => array('class' => ''),
'required' => false
])
->add('company', EntityType::class, [
'label' => 'Société emettrice des factures',
'class' => Company::class,
'placeholder' => 'Choisir une société',
'attr' => [
'placeholder' => 'Choisir une société',
],
'label_attr' => array('class' => ''),
'required' => false
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
]);
}
}