Ajout champ contact à la fiche client

This commit is contained in:
Jean-Christophe Engel 2025-03-25 20:49:24 +01:00
parent aff20099aa
commit 4aafa3f44f
12 changed files with 47 additions and 7 deletions

View file

@ -18,6 +18,7 @@ class Client
'siret',
'telephone',
'email',
'nom_contact',
'note'
];
@ -41,7 +42,7 @@ class Client
{
$data[$key] = trim($data[$key]);
if($data[$key] == '' && ($key != 'siret' && $key != 'telephone' && $key != 'email'))
if($data[$key] == '' && ! in_array($key, ['siret', 'telephone', 'email', 'nom_contact', 'note']))
{
throw new UserException('Le champs '.$key.' doit être renseigné.');
}
@ -137,6 +138,9 @@ class Client
'email' => [
'label' => 'E-Mail',
],
'nom_contact' => [
'label' => 'Contact',
],
'note' => [
'label' => 'Note',
],