You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
41 lines
1.3 KiB
<?php |
|
|
|
namespace App\Form; |
|
|
|
use App\Entity\Facture; |
|
use Symfony\Component\Form\AbstractType; |
|
use Symfony\Component\Form\FormBuilderInterface; |
|
use Symfony\Component\OptionsResolver\OptionsResolver; |
|
use Symfony\Component\Form\Extension\Core\Type\DateType; |
|
use Symfony\Component\Form\Extension\Core\Type\TextType; |
|
use Symfony\Component\Form\Extension\Core\Type\MoneyType; |
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType; |
|
use Symfony\Component\Form\Extension\Core\Type\PercentType; |
|
|
|
class FactureType extends AbstractType |
|
{ |
|
public function buildForm(FormBuilderInterface $builder, array $options) |
|
{ |
|
$builder |
|
->add('client_id', IntegerType::class) |
|
->add('client_adresse_ip', TextType::class) |
|
->add('montant_ht', MoneyType::class, [ |
|
'currency' => false |
|
]) |
|
->add('montant_tva', PercentType::class, [ |
|
'scale' => 2, |
|
'symbol' => false |
|
]) |
|
->add('facture_createAt', DateType::class, [ |
|
'widget' => 'single_text', |
|
'html5' => true |
|
]); |
|
} |
|
|
|
public function configureOptions(OptionsResolver $resolver) |
|
{ |
|
$resolver->setDefaults([ |
|
'data_class' => Facture::class, |
|
]); |
|
} |
|
}
|
|
|