Fix: Date is mandatory into adding customer orders
This commit is contained in:
parent
9732a2f336
commit
f05176dc8a
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user