<?php
namespace App\Form;
use App\Entity\Stock;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class StockType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('piece', null, ['label' => 'Nom'])
->add('quantite', null, ['label' => 'Quantité'])
->add('montant_HTVA', null, ['label' => 'Montant HTVA'])
->add('num_bl', null, ['label' => 'Numéro BL'])
->add('immatriculation', null, ['label' => 'Immatriculation'])
->add('reference', null, ['label' => 'Référence'])
->add('code_barre', null, ['label' => 'Code-barre'])
->add('id_produit', null, ['label' => 'ID du produit'])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Stock::class,
]);
}
}