forked from Wavyzz/dolibarr
Merge pull request #14099 from atm-florian/12.0
fix: same feature on thirdparty extrafields transport to invoice as existing on orders
This commit is contained in:
@@ -3544,10 +3544,19 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="2"', 'cols' => '2');
|
||||
$parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="2"', 'cols' => '2', 'socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_INVOICE)) {
|
||||
// copy from thirdparty
|
||||
$tpExtrafields = new Extrafields($db);
|
||||
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
||||
if ($soc->fetch_optionals() > 0) {
|
||||
$object->array_options = array_merge($object->array_options, $soc->array_options);
|
||||
}
|
||||
};
|
||||
|
||||
print $object->showOptionals($extrafields, 'edit', $parameters);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user