Ajout champ note à la fiche client

This commit is contained in:
Jean-Christophe Engel 2025-03-22 18:21:00 +01:00
parent 4ee3f65d0a
commit 950a6b8b2c
8 changed files with 86 additions and 35 deletions

View file

@ -17,27 +17,28 @@ if (!$c)
}
$form->runIf(f('save') && !$form->hasErrors(),
function () use ($client, $id, $form)
{
try
{
$r = $client->edit($id,[
'nom' => f('nom'),
'adresse' => f('adresse'),
'code_postal' => f('code_postal'),
'ville' => f('ville'),
'siret' => f('siret'),
'telephone' => f('telephone'),
'email' => f('email')
]);
function () use ($client, $id, $form)
{
try
{
$r = $client->edit($id,[
'nom' => f('nom'),
'adresse' => f('adresse'),
'code_postal' => f('code_postal'),
'ville' => f('ville'),
'siret' => f('siret'),
'telephone' => f('telephone'),
'email' => f('email'),
'note' => f('note')
]);
$r ? Utils::redirect(PLUGIN_ADMIN_URL . 'client.php?id='.(int)$id):'';
}
catch (UserException $e)
{
$form->addError($e->getMessage());
}
}, 'edit_client');
$r ? Utils::redirect(PLUGIN_ADMIN_URL . 'client.php?id='.(int)$id):'';
}
catch (UserException $e)
{
$form->addError($e->getMessage());
}
}, 'edit_client');
$tpl->assign('client', $c);