Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d0943be80d
@ -83,6 +83,7 @@ $workflow=array(
|
|||||||
),
|
),
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER')
|
'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER')
|
||||||
|
,'invoice' => array('WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER')
|
||||||
),
|
),
|
||||||
'invoice' => array (
|
'invoice' => array (
|
||||||
'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')
|
'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')
|
||||||
|
|||||||
@ -1673,7 +1673,7 @@ abstract class CommonObject
|
|||||||
else if ($justtarget)
|
else if ($justtarget)
|
||||||
{
|
{
|
||||||
$sql.= "fk_target = '".$targetid."' AND targettype = '".$targettype."'";
|
$sql.= "fk_target = '".$targetid."' AND targettype = '".$targettype."'";
|
||||||
if ($withsourcetype) $sql.= "AND sourcetype = '".$sourcetype."'";
|
if ($withsourcetype) $sql.= " AND sourcetype = '".$sourcetype."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -148,6 +148,24 @@ class InterfaceWorkflowManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Invoice classify billed order
|
||||||
|
if ($action == 'BILL_PAYED')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
if (! empty($conf->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER))
|
||||||
|
{
|
||||||
|
$object->fetchObjectLinked('','commande',$object->id,$object->element);
|
||||||
|
if (! empty($object->linkedObjects))
|
||||||
|
{
|
||||||
|
foreach($object->linkedObjects['commande'] as $element)
|
||||||
|
{
|
||||||
|
$ret=$element->classifyBilled();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,4 +7,5 @@ descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Create a customer order automatically after
|
|||||||
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Create a customer invoice automatically after a commercial proposal is signed
|
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Create a customer invoice automatically after a commercial proposal is signed
|
||||||
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Create a customer invoice automatically after a contract is validated
|
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Create a customer invoice automatically after a contract is validated
|
||||||
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Create a customer invoice automatically after a customer order is closed
|
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Create a customer invoice automatically after a customer order is closed
|
||||||
descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify billed the original proposal along with a customer order
|
descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify billed the original proposal along with a customer order
|
||||||
|
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify billed originals customer orders along with a customer invoice
|
||||||
@ -7,4 +7,5 @@ descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Créer une commande client automatiquement
|
|||||||
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la signature d'une proposition commerciale
|
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la signature d'une proposition commerciale
|
||||||
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la validation d'un contrat
|
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la validation d'un contrat
|
||||||
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la cloture d'une commande client
|
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Créer une facture client automatiquement à la cloture d'une commande client
|
||||||
descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classer facturée la proposition commerciale d'origine en même temps que la commande
|
descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classer facturée la proposition commerciale d'origine en même temps que la commande
|
||||||
|
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classer facturée la ou les commandes clients d'origine en même temps que la facture
|
||||||
Loading…
Reference in New Issue
Block a user