44 print
"Error, template page can't be called as URL";
49@phan-var-force CommonObject $object
50@phan-var-force string $action
51@phan-var-force DoliDB $db
52@phan-var-force Conf $conf
53@phan-var-force Translate $langs
54@phan-var-force array<string,mixed> $parameters
55@phan-var-force Societe $thirdpartytopropagateextrafieldsfrom
59<!-- BEGIN PHP TEMPLATE extrafields_add.tpl.php -->
63if (!isset($parameters)) {
64 $parameters = array();
67$reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters,
$object, $action);
69print $hookmanager->resPrint;
72 $params[
'cols'] = array_key_exists(
'colspanvalue', $parameters) ? $parameters[
'colspanvalue'] :
'';
73 if (!empty($parameters[
'tdclass'])) {
74 $params[
'tdclass'] = $parameters[
'tdclass'];
76 if (!empty($parameters[
'tpl_context'])) {
77 $params[
'tpl_context'] = $parameters[
'tpl_context'];
82 if (!empty($thirdpartytopropagateextrafieldsfrom) && $thirdpartytopropagateextrafieldsfrom instanceof
Societe && !empty($thirdpartytopropagateextrafieldsfrom->id)) {
85 $tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($thirdpartytopropagateextrafieldsfrom->table_element);
86 if ($thirdpartytopropagateextrafieldsfrom->fetch_optionals() > 0) {
87 $object->array_options = array_merge(
$object->array_options, $thirdpartytopropagateextrafieldsfrom->array_options);
91 print
$object->showOptionals($extrafields,
'create', $params);
95<!-- END PHP TEMPLATE extrafields_add.tpl.php -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage third parties objects (customers, suppliers, prospects...)
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...