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
|
||||||
@ -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,7 +521,6 @@ 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,
|
||||||
@ -549,8 +544,6 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
'socname' => $contact->socname?$contact->socname:'',
|
'socname' => $contact->socname?$contact->socname:'',
|
||||||
'poste' => $contact->poste?$contact->poste:'',
|
'poste' => $contact->poste?$contact->poste:'',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'phone_pro' => $contact->phone_pro?$contact->phone_pro:'',
|
'phone_pro' => $contact->phone_pro?$contact->phone_pro:'',
|
||||||
'fax' => $contact->fax?$contact->fax:'',
|
'fax' => $contact->fax?$contact->fax:'',
|
||||||
'phone_perso' => $contact->phone_perso?$contact->phone_perso:'',
|
'phone_perso' => $contact->phone_perso?$contact->phone_perso:'',
|
||||||
@ -571,12 +564,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
||||||
'user_id' => $contact->user_id?$contact->user_id:'',
|
'user_id' => $contact->user_id?$contact->user_id:'',
|
||||||
'user_login' => $contact->user_login?$contact->user_login:'',
|
'user_login' => $contact->user_login?$contact->user_login:'',
|
||||||
'statut' => $contact->statut?$contact->statut:''
|
'status' => $contact->statut?$contact->statut:''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user