Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
31fa26c2be
@ -130,6 +130,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
if ($action == 'BILL_VALIDATE')
|
if ($action == 'BILL_VALIDATE')
|
||||||
{
|
{
|
||||||
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 );
|
||||||
|
$ret = 0;
|
||||||
|
|
||||||
// First classify billed the order to allow the proposal classify process
|
// First classify billed the order to allow the proposal classify process
|
||||||
if (! empty($conf->commande->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER))
|
if (! empty($conf->commande->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER))
|
||||||
@ -151,7 +152,6 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second classify billed the proposal.
|
// Second classify billed the proposal.
|
||||||
@ -174,8 +174,9 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// classify billed order & billed propososal
|
// classify billed order & billed propososal
|
||||||
|
|||||||
@ -1017,6 +1017,34 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_unpaid' && $id > 0 && $user->rights->expensereport->to_paid)
|
||||||
|
{
|
||||||
|
$object = new ExpenseReport($db);
|
||||||
|
$object->fetch($id);
|
||||||
|
|
||||||
|
$result = $object->set_unpaid($user);
|
||||||
|
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
// Define output language
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
|
{
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
|
||||||
|
if (! empty($newlang)) {
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
$model=$object->modelpdf;
|
||||||
|
$ret = $object->fetch($id); // Reload to get new records
|
||||||
|
|
||||||
|
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
||||||
{
|
{
|
||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
|
|||||||
@ -568,7 +568,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
if ($action = 'create_delivery') {
|
if ($action == 'create_delivery') {
|
||||||
// copy from expedition
|
// copy from expedition
|
||||||
$expeditionExtrafields = new Extrafields($db);
|
$expeditionExtrafields = new Extrafields($db);
|
||||||
$expeditionExtrafieldLabels = $expeditionExtrafields->fetch_name_optionals_label($expedition->table_element);
|
$expeditionExtrafieldLabels = $expeditionExtrafields->fetch_name_optionals_label($expedition->table_element);
|
||||||
@ -681,7 +681,7 @@ else
|
|||||||
$mode = ($object->statut == 0) ? 'edit' : 'view';
|
$mode = ($object->statut == 0) ? 'edit' : 'view';
|
||||||
$line = new LivraisonLigne($db);
|
$line = new LivraisonLigne($db);
|
||||||
$line->fetch_optionals($object->lines[$i]->id);
|
$line->fetch_optionals($object->lines[$i]->id);
|
||||||
if ($action = 'create_delivery') {
|
if ($action == 'create_delivery') {
|
||||||
$srcLine = new ExpeditionLigne($db);
|
$srcLine = new ExpeditionLigne($db);
|
||||||
$expeditionLineExtrafields = new Extrafields($db);
|
$expeditionLineExtrafields = new Extrafields($db);
|
||||||
$expeditionLineExtrafieldLabels = $expeditionLineExtrafields->fetch_name_optionals_label($srcLine->table_element);
|
$expeditionLineExtrafieldLabels = $expeditionLineExtrafields->fetch_name_optionals_label($srcLine->table_element);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user