Fix: Date is mandatory into adding customer orders

This commit is contained in:
simnandez 2012-12-30 10:49:11 +01:00
parent 9732a2f336
commit f05176dc8a

View File

@ -198,6 +198,15 @@ else if ($action == 'add' && $user->rights->commande->creer)
$datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'),GETPOST('liv_day'),GETPOST('liv_year')); $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'),GETPOST('liv_day'),GETPOST('liv_year'));
if ($datecommande == '')
{
$mesg='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')).'</div>';
$action='create';
$error++;
}
if (! $error)
{
$object->socid=$socid; $object->socid=$socid;
$object->fetch_thirdparty(); $object->fetch_thirdparty();
@ -393,6 +402,7 @@ else if ($action == 'add' && $user->rights->commande->creer)
if (! $mesg) $mesg='<div class="error">'.$object->error.'</div>'; if (! $mesg) $mesg='<div class="error">'.$object->error.'</div>';
} }
} }
}
else if ($action == 'classifybilled' && $user->rights->commande->creer) else if ($action == 'classifybilled' && $user->rights->commande->creer)
{ {