Fix: Supplier is mandatory into adding invoice suppliers

This commit is contained in:
simnandez 2012-12-30 10:24:20 +01:00
parent b8303bdd5f
commit f0f45b70da

View File

@ -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='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Supplier')).'</div>';
$action='create';
$error++;
}
if ($datefacture == '')
{
$mesg='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('DateInvoice')).'</div>';