Ajout divers champs pour facture/devis
This commit is contained in:
parent
950a6b8b2c
commit
aff20099aa
7 changed files with 93 additions and 28 deletions
|
|
@ -89,6 +89,7 @@ $form->runIf(f('save') && !$form->hasErrors(),
|
|||
'reglee' => f('reglee') == 1?1:0,
|
||||
'archivee' => f('archivee') == 1?1:0,
|
||||
'moyen_paiement' => f('moyen_paiement'),
|
||||
'nom_contact' => f('nom_contact'),
|
||||
'toto' => 0
|
||||
];
|
||||
$data['type_facture'] = f('type');
|
||||
|
|
@ -113,8 +114,12 @@ $form->runIf(f('save') && !$form->hasErrors(),
|
|||
unset($data['toto']);
|
||||
if (! isset($data['contenu'])) {
|
||||
throw new UserException("Aucune désignation ni aucun prix saisi !!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (f('type') == FACT) {
|
||||
$data['numero_commande'] = f('numero_commande');
|
||||
$data['reference_acheteur'] = f('reference_acheteur');
|
||||
}
|
||||
}
|
||||
elseif ( f('type') == CERFA )
|
||||
{
|
||||
$data['moyen_paiement'] = f('moyen_paiement_cerfa');
|
||||
|
|
@ -276,6 +281,9 @@ else
|
|||
|
||||
$doc['date_emission'] = f('date_emission') ?: $f->date_emission;
|
||||
$doc['date_echeance'] = f('date_echeance')?: $f->date_echeance; // Smarty m'a saoulé pour utiliser form_field|date_fr:---
|
||||
$doc['nom_contact'] = $f->nom_contact;
|
||||
$doc['numero_commande'] = $f->numero_commande;
|
||||
$doc['reference_acheteur'] = $f->reference_acheteur;
|
||||
/* modif DD -- CERFA -------------------------------------- */
|
||||
if ( $f->type_facture == CERFA ) {
|
||||
$doc['total'] = $f->total;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue