3 if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra))
6 dol_print_error(
'',
'include of file extrafieldsinexport.inc.php was done but var $keyforselect or $keyforelement or $keyforaliasextra was not set');
11 $sql =
"SELECT name, label, type, param, fieldcomputed, fielddefault FROM ".MAIN_DB_PREFIX.
"extrafields";
12 $sql .=
" WHERE elementtype = '".$this->db->escape($keyforselect).
"' AND type != 'separate' AND entity IN (0, ".$conf->entity.
') ORDER BY pos ASC';
17 while ($obj = $this->
db->fetch_object(
$resql))
19 $fieldname = $keyforaliasextra.
'.'.$obj->name;
20 $fieldlabel = ucfirst($obj->label);
22 $typefield = preg_replace(
'/\(.*$/',
'', $obj->type);
28 $typeFilter =
"Numeric";
36 $typeFilter =
"Boolean";
39 if (!empty($conf->global->EXPORT_LABEL_FOR_SELECT))
41 $tmpparam = unserialize($obj->param);
42 if ($tmpparam[
'options'] && is_array($tmpparam[
'options'])) {
43 $typeFilter =
"Select:".$obj->param;
49 $tmpparam = unserialize($obj->param);
50 if ($tmpparam[
'options'] && is_array($tmpparam[
'options'])) {
51 $tmpkeys = array_keys($tmpparam[
'options']);
52 $tmp = array_shift($tmpkeys);
54 if (preg_match(
'/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter =
"List:".$tmp;
57 if ($obj->type !=
'separate')
60 if (empty($obj->fieldcomputed))
62 $this->export_fields_array[$r][$fieldname] = $fieldlabel;
63 $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
64 $this->export_entities_array[$r][$fieldname] = $keyforelement;
68 $this->export_fields_array[$r][$fieldname] = $fieldlabel;
69 $this->export_TypeFields_array[$r][$fieldname] = $typeFilter.
'Compute';
70 $this->export_special_array[$r][$fieldname] = $obj->fieldcomputed;
71 $this->export_entities_array[$r][$fieldname] = $keyforelement;
$conf db
API class for accounts.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...