fix: same feature on invoice as on orders

This commit is contained in:
florian HENRY 2020-06-18 19:42:23 +02:00
parent adb988a18b
commit e82d71c949

View File

@ -3540,6 +3540,15 @@ if ($action == 'create')
$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);
}