Skip to content

Commit

Permalink
Add customers/supplier status fo contact export
Browse files Browse the repository at this point in the history
When you export a contact list it's usefull to know if your contact is a prospect, client or supplier
  • Loading branch information
mkdgs committed Jun 11, 2014
1 parent 8a9db28 commit 84f1b8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/modules/modSociete.class.php
Expand Up @@ -320,9 +320,9 @@ function __construct($db)
$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.civilite'=>"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','p.libelle'=>"Country",'p.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");
$this->export_TypeFields_array[$r]=array('c.civilite'=>"List:c_civilite:civilite: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','p.libelle'=>"List:c_pays:libelle:rowid",'p.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");
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); // We define here only fields that use another picto
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"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','p.libelle'=>"Country",'p.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'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1');
$this->export_TypeFields_array[$r]=array('c.civilite'=>"List:c_civilite:civilite: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','p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean");
$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
if (empty($conf->fournisseur->enabled))
{
unset($this->export_fields_array[$r]['s.code_fournisseur']);
Expand Down

0 comments on commit 84f1b8c

Please sign in to comment.