removed the new option and enhanced the old one
This commit is contained in:
parent
03de870751
commit
cc0be635dc
@ -65,12 +65,6 @@ $workflowcodes = array(
|
|||||||
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
|
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
|
||||||
'picto'=>'order'
|
'picto'=>'order'
|
||||||
),
|
),
|
||||||
'WORKFLOW_PROPAL_NOTCREATE_ORDER_IFEXISTS'=>array(
|
|
||||||
'family'=>'create',
|
|
||||||
'position'=>15,
|
|
||||||
'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)),
|
|
||||||
'picto'=>'order'
|
|
||||||
),
|
|
||||||
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
|
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
|
||||||
'family'=>'create',
|
'family'=>'create',
|
||||||
'position'=>20,
|
'position'=>20,
|
||||||
|
|||||||
@ -72,6 +72,12 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
if ($action == 'PROPAL_CLOSE_SIGNED') {
|
if ($action == 'PROPAL_CLOSE_SIGNED') {
|
||||||
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();
|
||||||
|
if (!empty($object->linkedObjectsIds['commande'])){
|
||||||
|
setEventMessages($langs->trans("OrderExists"), null, 'warnings');
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
|
||||||
@ -86,14 +92,9 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->WORKFLOW_PROPAL_NOTCREATE_ORDER_IFEXISTS)) {
|
|
||||||
$object->fetchObjectLinked();
|
|
||||||
if (!empty($object->linkedObjectsIds['commande']))
|
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Order to invoice
|
// Order to invoice
|
||||||
if ($action == 'ORDER_CLOSE') {
|
if ($action == 'ORDER_CLOSE') {
|
||||||
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);
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
# Dolibarr language file - Source file is en_US - orders
|
# Dolibarr language file - Source file is en_US - orders
|
||||||
|
OrderExists=An order was already open linked to this proposal, so no other order was created automatically
|
||||||
OrdersArea=Customers orders area
|
OrdersArea=Customers orders area
|
||||||
SuppliersOrdersArea=Purchase orders area
|
SuppliersOrdersArea=Purchase orders area
|
||||||
OrderCard=Order card
|
OrderCard=Order card
|
||||||
|
|||||||
@ -3,7 +3,6 @@ WorkflowSetup=Workflow module setup
|
|||||||
WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions.
|
WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions.
|
||||||
ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules.
|
ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules.
|
||||||
# Autocreate
|
# Autocreate
|
||||||
descWORKFLOW_PROPAL_NOTCREATE_ORDER_IFEXISTS=Do not Automatically create a sales order after a commercial proposal is signed if it already exists
|
|
||||||
descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal)
|
descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal)
|
||||||
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal)
|
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal)
|
||||||
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated
|
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user