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_id' => array('name'=>'user_id','type'=>'xsd:string'),
|
||||||
'user_login' => array('name'=>'user_login','type'=>'xsd:string'),
|
'user_login' => array('name'=>'user_login','type'=>'xsd:string'),
|
||||||
'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'),
|
'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'),
|
||||||
'poste' => array('name'=>'poste','type'=>'xsd:string'),
|
'poste' => array('name'=>'poste','type'=>'xsd:string')
|
||||||
'statut' => array('name'=>'statut','type'=>'xsd:string')
|
|
||||||
//...
|
//...
|
||||||
);
|
);
|
||||||
//Retreive all extrafield for contact
|
//Retreive all extrafield for contact
|
||||||
@ -286,7 +285,7 @@ function getContact($authentication,$id,$ref_ext)
|
|||||||
'country_code' => $contact->country_code,
|
'country_code' => $contact->country_code,
|
||||||
'country' => $contact->country,
|
'country' => $contact->country,
|
||||||
'socid' => $contact->socid,
|
'socid' => $contact->socid,
|
||||||
'status' => $contact->status,
|
'status' => $contact->statut,
|
||||||
'phone_pro' => $contact->phone_pro,
|
'phone_pro' => $contact->phone_pro,
|
||||||
'fax' => $contact->fax,
|
'fax' => $contact->fax,
|
||||||
'phone_perso' => $contact->phone_perso,
|
'phone_perso' => $contact->phone_perso,
|
||||||
@ -304,8 +303,7 @@ function getContact($authentication,$id,$ref_ext)
|
|||||||
'user_id' => $contact->user_id,
|
'user_id' => $contact->user_id,
|
||||||
'user_login' => $contact->user_login,
|
'user_login' => $contact->user_login,
|
||||||
'civility_id' => $contact->civility_id,
|
'civility_id' => $contact->civility_id,
|
||||||
'poste' => $contact->poste,
|
'poste' => $contact->poste
|
||||||
'statut' => $contact->statut
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//Retreive all extrafield for thirdsparty
|
//Retreive all extrafield for thirdsparty
|
||||||
@ -353,7 +351,7 @@ function getContact($authentication,$id,$ref_ext)
|
|||||||
* Create Contact
|
* Create Contact
|
||||||
*
|
*
|
||||||
* @param array $authentication Array of authentication information
|
* @param array $authentication Array of authentication information
|
||||||
* @param Contact $contact $contact
|
* @param Contact $contact $contact
|
||||||
* @return array Array result
|
* @return array Array result
|
||||||
*/
|
*/
|
||||||
function createContact($authentication,$contact)
|
function createContact($authentication,$contact)
|
||||||
@ -398,7 +396,7 @@ function createContact($authentication,$contact)
|
|||||||
$newobject->country_code=$contact['country_code'];
|
$newobject->country_code=$contact['country_code'];
|
||||||
$newobject->country=$contact['country'];
|
$newobject->country=$contact['country'];
|
||||||
$newobject->socid=$contact['socid'];
|
$newobject->socid=$contact['socid'];
|
||||||
$newobject->status=$contact['status'];
|
$newobject->statut=$contact['status'];
|
||||||
$newobject->phone_pro=$contact['phone_pro'];
|
$newobject->phone_pro=$contact['phone_pro'];
|
||||||
$newobject->fax=$contact['fax'];
|
$newobject->fax=$contact['fax'];
|
||||||
$newobject->phone_perso=$contact['phone_perso'];
|
$newobject->phone_perso=$contact['phone_perso'];
|
||||||
@ -416,7 +414,6 @@ function createContact($authentication,$contact)
|
|||||||
$newobject->user_id=$contact['user_id'];
|
$newobject->user_id=$contact['user_id'];
|
||||||
$newobject->user_login=$contact['user_login'];
|
$newobject->user_login=$contact['user_login'];
|
||||||
$newobject->poste=$contact['poste'];
|
$newobject->poste=$contact['poste'];
|
||||||
$newobject->statut=$contact['statut'];
|
|
||||||
|
|
||||||
//Retreive all extrafield for thirdsparty
|
//Retreive all extrafield for thirdsparty
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
@ -493,7 +490,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
{
|
{
|
||||||
$linesinvoice=array();
|
$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.address, c.zip, c.town,";
|
||||||
$sql.= " c.fk_pays as country_id,";
|
$sql.= " c.fk_pays as country_id,";
|
||||||
$sql.= " c.fk_departement,";
|
$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.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
|
||||||
$sql.= " WHERE c.fk_soc=$idthirdparty";
|
$sql.= " WHERE c.fk_soc=$idthirdparty";
|
||||||
|
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -525,58 +521,50 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
$contact=new Contact($db);
|
$contact=new Contact($db);
|
||||||
$contact->fetch($obj->rowid);
|
$contact->fetch($obj->rowid);
|
||||||
|
|
||||||
|
|
||||||
// Now define invoice
|
// Now define invoice
|
||||||
$linescontact[]=array(
|
$linescontact[]=array(
|
||||||
'id' => $contact->id,
|
'id' => $contact->id,
|
||||||
'ref' => $contact->ref,
|
'ref' => $contact->ref,
|
||||||
'civility_id' => $contact->civility_id?$contact->civility_id:'',
|
'civility_id' => $contact->civility_id?$contact->civility_id:'',
|
||||||
'lastname' => $contact->lastname?$contact->lastname:'',
|
'lastname' => $contact->lastname?$contact->lastname:'',
|
||||||
'firstname' => $contact->firstname?$contact->firstname:'',
|
'firstname' => $contact->firstname?$contact->firstname:'',
|
||||||
'address' => $contact->address?$contact->address:'',
|
'address' => $contact->address?$contact->address:'',
|
||||||
'zip' => $contact->zip?$contact->zip:'',
|
'zip' => $contact->zip?$contact->zip:'',
|
||||||
'town' => $contact->town?$contact->town:'',
|
'town' => $contact->town?$contact->town:'',
|
||||||
|
|
||||||
'state_id' => $contact->state_id?$contact->state_id:'',
|
'state_id' => $contact->state_id?$contact->state_id:'',
|
||||||
'state_code' => $contact->state_code?$contact->state_code:'',
|
'state_code' => $contact->state_code?$contact->state_code:'',
|
||||||
'state' => $contact->state?$contact->state:'',
|
'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:''
|
|
||||||
|
|
||||||
|
'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++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user