Fix: examples ko for import
Fix bad picto for export
This commit is contained in:
parent
eb4c46ca3d
commit
7951483c5f
@ -323,9 +323,10 @@ class modSociete extends DolibarrModules
|
||||
$this->export_label[$r]='ExportDataset_company_2';
|
||||
$this->export_icon[$r]='contact';
|
||||
$this->export_permission[$r]=array(array("societe","contact","export"));
|
||||
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','co.label'=>"Country",'co.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer 0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'Supplier 0 or 1');
|
||||
$this->export_TypeFields_array[$r]=array('c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.cp'=>"Text",'c.ville'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Text",'s.fournisseur'=>"Text");
|
||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company", 's.fournisseur'=>"company"); // We define here only fields that use another picto
|
||||
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','co.label'=>"Country",'co.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer','s.fournisseur'=>'Supplier');
|
||||
$this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
|
||||
$this->export_TypeFields_array[$r]=array('c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.zip'=>"Text",'c.town'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.client'=>"Text",'s.fournisseur'=>"Text");
|
||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company", 's.status'=>'company', 's.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company", 's.fournisseur'=>"company"); // We define here only fields that use another picto
|
||||
if (empty($conf->fournisseur->enabled))
|
||||
{
|
||||
unset($this->export_fields_array[$r]['s.code_fournisseur']);
|
||||
|
||||
@ -43,7 +43,8 @@ class Export
|
||||
var $array_export_entities=array(); // Tableau des listes de champ+alias a exporter
|
||||
var $array_export_dependencies=array(); // array of list of entities that must take care of the DISTINCT if a field is added into export
|
||||
var $array_export_special=array(); // Tableau des operations speciales sur champ
|
||||
|
||||
var $array_export_examplevalues=array(); // array with examples
|
||||
|
||||
// To store export modules
|
||||
var $hexa;
|
||||
var $hexafiltervalue;
|
||||
@ -174,7 +175,9 @@ class Export
|
||||
$this->array_export_dependencies[$i]=(! empty($module->export_dependencies_array[$r])?$module->export_dependencies_array[$r]:'');
|
||||
// Tableau des operations speciales sur champ
|
||||
$this->array_export_special[$i]=(! empty($module->export_special_array[$r])?$module->export_special_array[$r]:'');
|
||||
|
||||
// Array of examples
|
||||
$this->array_export_examplevalues[$i]=$module->export_examplevalues_array[$r];
|
||||
|
||||
// Requete sql du dataset
|
||||
$this->array_export_sql_start[$i]=$module->export_sql_start[$r];
|
||||
$this->array_export_sql_end[$i]=$module->export_sql_end[$r];
|
||||
|
||||
@ -569,6 +569,10 @@ if ($step == 2 && $datatoexport)
|
||||
$tablename=getablenamefromfield($code,$sqlmaxforexport);
|
||||
$htmltext ='<b>'.$langs->trans("Name").":</b> ".$text.'<br>';
|
||||
$htmltext.='<b>'.$langs->trans("Table")." -> ".$langs->trans("Field").":</b> ".$tablename." -> ".preg_replace('/^.*\./','',$code)."<br>";
|
||||
if (! empty($objexport->array_export_examplevalues[0][$code]))
|
||||
{
|
||||
$htmltext.=$langs->trans("SourceExample").': <b>'.$objexport->array_export_examplevalues[0][$code].'</b><br>';
|
||||
}
|
||||
if (isset($array_selected[$code]) && $array_selected[$code])
|
||||
{
|
||||
// Selected fields
|
||||
|
||||
@ -146,7 +146,7 @@ class Import
|
||||
$this->array_import_entities[$i]=$module->import_entities_array[$r];
|
||||
// Tableau des alias a exporter (cle=champ, valeur=alias)
|
||||
$this->array_import_regex[$i]=$module->import_regex_array[$r];
|
||||
// Tableau des alias a exporter (cle=champ, valeur=exemple)
|
||||
// Array of examples
|
||||
$this->array_import_examplevalues[$i]=$module->import_examplevalues_array[$r];
|
||||
// Tableau des regles de conversion d'une valeur depuis une autre source (cle=champ, valeur=tableau des regles)
|
||||
$this->array_import_convertvalue[$i]=(isset($module->import_convertvalue_array[$r])?$module->import_convertvalue_array[$r]:'');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user