Closed #2414
This commit is contained in:
parent
1cf39d4c8f
commit
20d5624440
@ -114,8 +114,7 @@ $contact_fields = array(
|
||||
'user_id' => array('name'=>'user_id','type'=>'xsd:string'),
|
||||
'user_login' => array('name'=>'user_login','type'=>'xsd:string'),
|
||||
'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'),
|
||||
'poste' => array('name'=>'poste','type'=>'xsd:string'),
|
||||
'statut' => array('name'=>'statut','type'=>'xsd:string')
|
||||
'poste' => array('name'=>'poste','type'=>'xsd:string')
|
||||
//...
|
||||
);
|
||||
//Retreive all extrafield for contact
|
||||
@ -286,7 +285,7 @@ function getContact($authentication,$id,$ref_ext)
|
||||
'country_code' => $contact->country_code,
|
||||
'country' => $contact->country,
|
||||
'socid' => $contact->socid,
|
||||
'status' => $contact->status,
|
||||
'status' => $contact->statut,
|
||||
'phone_pro' => $contact->phone_pro,
|
||||
'fax' => $contact->fax,
|
||||
'phone_perso' => $contact->phone_perso,
|
||||
@ -304,8 +303,7 @@ function getContact($authentication,$id,$ref_ext)
|
||||
'user_id' => $contact->user_id,
|
||||
'user_login' => $contact->user_login,
|
||||
'civility_id' => $contact->civility_id,
|
||||
'poste' => $contact->poste,
|
||||
'statut' => $contact->statut
|
||||
'poste' => $contact->poste
|
||||
);
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
@ -353,7 +351,7 @@ function getContact($authentication,$id,$ref_ext)
|
||||
* Create Contact
|
||||
*
|
||||
* @param array $authentication Array of authentication information
|
||||
* @param Contact $contact $contact
|
||||
* @param Contact $contact $contact
|
||||
* @return array Array result
|
||||
*/
|
||||
function createContact($authentication,$contact)
|
||||
@ -398,7 +396,7 @@ function createContact($authentication,$contact)
|
||||
$newobject->country_code=$contact['country_code'];
|
||||
$newobject->country=$contact['country'];
|
||||
$newobject->socid=$contact['socid'];
|
||||
$newobject->status=$contact['status'];
|
||||
$newobject->statut=$contact['status'];
|
||||
$newobject->phone_pro=$contact['phone_pro'];
|
||||
$newobject->fax=$contact['fax'];
|
||||
$newobject->phone_perso=$contact['phone_perso'];
|
||||
@ -416,7 +414,6 @@ function createContact($authentication,$contact)
|
||||
$newobject->user_id=$contact['user_id'];
|
||||
$newobject->user_login=$contact['user_login'];
|
||||
$newobject->poste=$contact['poste'];
|
||||
$newobject->statut=$contact['statut'];
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
// fetch optionals attributes and labels
|
||||
@ -493,7 +490,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
||||
{
|
||||
$linesinvoice=array();
|
||||
|
||||
$sql = "SELECT c.rowid, c.fk_soc, c.civility as civility_id, c.lastname, c.firstname, c.statut,";
|
||||
$sql = "SELECT c.rowid, c.fk_soc, c.civility as civility_id, c.lastname, c.firstname, c.statut as status,";
|
||||
$sql.= " c.address, c.zip, c.town,";
|
||||
$sql.= " c.fk_pays as country_id,";
|
||||
$sql.= " c.fk_departement,";
|
||||
@ -511,7 +508,6 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
|
||||
$sql.= " WHERE c.fk_soc=$idthirdparty";
|
||||
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -525,58 +521,50 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
||||
$contact=new Contact($db);
|
||||
$contact->fetch($obj->rowid);
|
||||
|
||||
|
||||
// Now define invoice
|
||||
$linescontact[]=array(
|
||||
'id' => $contact->id,
|
||||
'ref' => $contact->ref,
|
||||
'civility_id' => $contact->civility_id?$contact->civility_id:'',
|
||||
'lastname' => $contact->lastname?$contact->lastname:'',
|
||||
'firstname' => $contact->firstname?$contact->firstname:'',
|
||||
'address' => $contact->address?$contact->address:'',
|
||||
'zip' => $contact->zip?$contact->zip:'',
|
||||
'town' => $contact->town?$contact->town:'',
|
||||
'id' => $contact->id,
|
||||
'ref' => $contact->ref,
|
||||
'civility_id' => $contact->civility_id?$contact->civility_id:'',
|
||||
'lastname' => $contact->lastname?$contact->lastname:'',
|
||||
'firstname' => $contact->firstname?$contact->firstname:'',
|
||||
'address' => $contact->address?$contact->address:'',
|
||||
'zip' => $contact->zip?$contact->zip:'',
|
||||
'town' => $contact->town?$contact->town:'',
|
||||
|
||||
'state_id' => $contact->state_id?$contact->state_id:'',
|
||||
'state_code' => $contact->state_code?$contact->state_code:'',
|
||||
'state' => $contact->state?$contact->state:'',
|
||||
|
||||
'country_id' => $contact->country_id?$contact->country_id:'',
|
||||
'country_code' => $contact->country_code?$contact->country_code:'',
|
||||
'country' => $contact->country?$contact->country:'',
|
||||
|
||||
'socid' => $contact->socid?$contact->socid:'',
|
||||
'socname' => $contact->socname?$contact->socname:'',
|
||||
'poste' => $contact->poste?$contact->poste:'',
|
||||
|
||||
|
||||
|
||||
'phone_pro' => $contact->phone_pro?$contact->phone_pro:'',
|
||||
'fax' => $contact->fax?$contact->fax:'',
|
||||
'phone_perso' => $contact->phone_perso?$contact->phone_perso:'',
|
||||
'phone_mobile' => $contact->phone_mobile?$contact->phone_mobile:'',
|
||||
|
||||
'email' => $contact->email?$contact->email:'',
|
||||
'jabberid' => $contact->jabberid?$contact->jabberid:'',
|
||||
'priv' => $contact->priv?$contact->priv:'',
|
||||
'mail' => $contact->mail?$contact->mail:'',
|
||||
|
||||
'birthday' => $contact->birthday?$contact->birthday:'',
|
||||
'default_lang' => $contact->default_lang?$contact->default_lang:'',
|
||||
'note' => $contact->note?$contact->note:'',
|
||||
'no_email' => $contact->no_email?$contact->no_email:'',
|
||||
'ref_facturation' => $contact->ref_facturation?$contact->ref_facturation:'',
|
||||
'ref_contrat' => $contact->ref_contrat?$contact->ref_contrat:'',
|
||||
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
||||
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
||||
'user_id' => $contact->user_id?$contact->user_id:'',
|
||||
'user_login' => $contact->user_login?$contact->user_login:'',
|
||||
'statut' => $contact->statut?$contact->statut:''
|
||||
'state_id' => $contact->state_id?$contact->state_id:'',
|
||||
'state_code' => $contact->state_code?$contact->state_code:'',
|
||||
'state' => $contact->state?$contact->state:'',
|
||||
|
||||
'country_id' => $contact->country_id?$contact->country_id:'',
|
||||
'country_code' => $contact->country_code?$contact->country_code:'',
|
||||
'country' => $contact->country?$contact->country:'',
|
||||
|
||||
'socid' => $contact->socid?$contact->socid:'',
|
||||
'socname' => $contact->socname?$contact->socname:'',
|
||||
'poste' => $contact->poste?$contact->poste:'',
|
||||
|
||||
'phone_pro' => $contact->phone_pro?$contact->phone_pro:'',
|
||||
'fax' => $contact->fax?$contact->fax:'',
|
||||
'phone_perso' => $contact->phone_perso?$contact->phone_perso:'',
|
||||
'phone_mobile' => $contact->phone_mobile?$contact->phone_mobile:'',
|
||||
|
||||
'email' => $contact->email?$contact->email:'',
|
||||
'jabberid' => $contact->jabberid?$contact->jabberid:'',
|
||||
'priv' => $contact->priv?$contact->priv:'',
|
||||
'mail' => $contact->mail?$contact->mail:'',
|
||||
|
||||
'birthday' => $contact->birthday?$contact->birthday:'',
|
||||
'default_lang' => $contact->default_lang?$contact->default_lang:'',
|
||||
'note' => $contact->note?$contact->note:'',
|
||||
'no_email' => $contact->no_email?$contact->no_email:'',
|
||||
'ref_facturation' => $contact->ref_facturation?$contact->ref_facturation:'',
|
||||
'ref_contrat' => $contact->ref_contrat?$contact->ref_contrat:'',
|
||||
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
||||
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
||||
'user_id' => $contact->user_id?$contact->user_id:'',
|
||||
'user_login' => $contact->user_login?$contact->user_login:'',
|
||||
'status' => $contact->statut?$contact->statut:''
|
||||
);
|
||||
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user