diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 6fcbc3779ba..7cf02e2f0da 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -230,6 +230,13 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) $datefacture=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); $datedue=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); + if (! GETPOST('socid','int')<1) + { + $mesg='