From f0700a89a17aced8f866c7f7d7427a60c2548408 Mon Sep 17 00:00:00 2001 From: vgreb Date: Mon, 10 Aug 2026 17:47:26 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20incoh=C3=A9rence=20entre=20produit?= =?UTF-8?q?s=20et=20devis/facture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...000_increase_quotation_reference_length.php | 18 ++++++++++++++++++ ...0120100_reduce_produit_reference_length.php | 18 ++++++++++++++++++ .../AppBundle/Accounting/Entity/Produit.php | 2 +- .../Accounting/Form/InvoicingRowType.php | 2 +- .../AppBundle/Accounting/Form/ProduitType.php | 2 +- 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 db/migrations/20260810120000_increase_quotation_reference_length.php create mode 100644 db/migrations/20260810120100_reduce_produit_reference_length.php diff --git a/db/migrations/20260810120000_increase_quotation_reference_length.php b/db/migrations/20260810120000_increase_quotation_reference_length.php new file mode 100644 index 000000000..8adba767e --- /dev/null +++ b/db/migrations/20260810120000_increase_quotation_reference_length.php @@ -0,0 +1,18 @@ +table('afup_compta_facture_details') + ->changeColumn('ref', 'string', [ + 'limit' => 50, + 'null' => false, + ]) + ->update(); + } +} diff --git a/db/migrations/20260810120100_reduce_produit_reference_length.php b/db/migrations/20260810120100_reduce_produit_reference_length.php new file mode 100644 index 000000000..01d63ff29 --- /dev/null +++ b/db/migrations/20260810120100_reduce_produit_reference_length.php @@ -0,0 +1,18 @@ +table('compta_produit') + ->changeColumn('reference', 'string', [ + 'limit' => 50, + 'null' => false, + ]) + ->update(); + } +} diff --git a/sources/AppBundle/Accounting/Entity/Produit.php b/sources/AppBundle/Accounting/Entity/Produit.php index 6748582e4..25b865efe 100644 --- a/sources/AppBundle/Accounting/Entity/Produit.php +++ b/sources/AppBundle/Accounting/Entity/Produit.php @@ -16,7 +16,7 @@ class Produit #[ORM\Column] public ?int $id = null; - #[ORM\Column(length: 255, nullable: false)] + #[ORM\Column(length: 50, nullable: false)] public string $reference; #[ORM\Column(length: 255, nullable: false)] diff --git a/sources/AppBundle/Accounting/Form/InvoicingRowType.php b/sources/AppBundle/Accounting/Form/InvoicingRowType.php index ee55eb94a..2d0dcea81 100644 --- a/sources/AppBundle/Accounting/Form/InvoicingRowType.php +++ b/sources/AppBundle/Accounting/Form/InvoicingRowType.php @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'constraints' => [ new Assert\NotBlank(), new Assert\Type(type: 'string'), - new Assert\Length(max: 20), + new Assert\Length(max: 50), ], ])->add('designation', TextareaType::class, [ 'label' => 'Désignation', diff --git a/sources/AppBundle/Accounting/Form/ProduitType.php b/sources/AppBundle/Accounting/Form/ProduitType.php index 592962c6b..16fb29e1b 100644 --- a/sources/AppBundle/Accounting/Form/ProduitType.php +++ b/sources/AppBundle/Accounting/Form/ProduitType.php @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'constraints' => [ new Assert\NotBlank(), new Assert\Type('string'), - new Assert\Length(max: 20), + new Assert\Length(max: 50), ], ])->add('designation', TextareaType::class, [ 'label' => 'Désignation',