allow chaining
This commit is contained in:
parent
becce332dd
commit
a597d6c379
@ -1837,6 +1837,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if ($resql)
|
||||
{
|
||||
$result = 0;
|
||||
$this->statut = $statut;
|
||||
$result=$this->log($user, $statut, $date, $comment);
|
||||
|
||||
$this->db->commit();
|
||||
@ -1851,6 +1852,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = 'Not Authorized';
|
||||
$this->errors[] = 'Not Authorized';
|
||||
dol_syslog(get_class($this)."::Livraison Not Authorized");
|
||||
$result = -3;
|
||||
}
|
||||
|
||||
@ -766,15 +766,15 @@ if (empty($reshook))
|
||||
{
|
||||
$date_liv = dol_mktime(GETPOST('rehour'),GETPOST('remin'),GETPOST('resec'),GETPOST("remonth"),GETPOST("reday"),GETPOST("reyear"));
|
||||
|
||||
$result = $object->Livraison($user, $date_liv, GETPOST("type"), GETPOST("comment"));
|
||||
$result = $object->Livraison($user, $date_liv, GETPOST("type"), GETPOST("comment"));
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
setEventMessages($langs->trans("DeliveryStateSaved"), null);
|
||||
$action = '';
|
||||
}
|
||||
else if($result == -3)
|
||||
{
|
||||
setEventMessage($langs->trans("NotAuthorized"), 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user