Fixing style errors.
This commit is contained in:
parent
cc0be635dc
commit
2f1eff2881
@ -73,18 +73,17 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) {
|
if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) {
|
||||||
$object->fetchObjectLinked();
|
$object->fetchObjectLinked();
|
||||||
if (!empty($object->linkedObjectsIds['commande'])){
|
if (!empty($object->linkedObjectsIds['commande'])) {
|
||||||
setEventMessages($langs->trans("OrderExists"), null, 'warnings');
|
setEventMessages($langs->trans("OrderExists"), null, 'warnings');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
$newobject = new Commande($this->db);
|
$newobject = new Commande($this->db);
|
||||||
|
|
||||||
$newobject->context['createfrompropal'] = 'createfrompropal';
|
$newobject->context['createfrompropal'] = 'createfrompropal';
|
||||||
$newobject->context['origin'] = $object->element;
|
$newobject->context['origin'] = $object->element;
|
||||||
$newobject->context['origin_id'] = $object->id;
|
$newobject->context['origin_id'] = $object->id;
|
||||||
|
|
||||||
$ret = $newobject->createFromProposal($object, $user);
|
$ret = $newobject->createFromProposal($object, $user);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
$this->error = $newobject->error;
|
$this->error = $newobject->error;
|
||||||
@ -92,8 +91,8 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Order to invoice
|
// Order to invoice
|
||||||
if ($action == 'ORDER_CLOSE') {
|
if ($action == 'ORDER_CLOSE') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user