Ajout divers champs pour facture/devis
This commit is contained in:
parent
950a6b8b2c
commit
aff20099aa
7 changed files with 93 additions and 28 deletions
|
|
@ -30,7 +30,10 @@ class Facture
|
|||
'archivee',
|
||||
'moyen_paiement',
|
||||
'contenu',
|
||||
'total'
|
||||
'total',
|
||||
'nom_contact',
|
||||
'numero_commande',
|
||||
'reference_acheteur'
|
||||
];
|
||||
|
||||
public $types = [
|
||||
|
|
@ -65,7 +68,7 @@ class Facture
|
|||
if(!is_array($data) && null !== $data){
|
||||
$datas[$k] = trim($data);
|
||||
}
|
||||
if ($datas[$k] === '' && $k != 'numero')
|
||||
if ($datas[$k] === '' && ! in_array($k, ['numero', 'nom_contact', 'numero_commande', 'reference_acheteur']))
|
||||
{
|
||||
throw new UserException("La valeur de $k est vide");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue