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',