WebService contact with statut (the new field)
This commit is contained in:
parent
fe0006c71d
commit
05e0af0f23
@ -119,6 +119,7 @@ class Contact extends CommonObject
|
|||||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
||||||
if (! $this->socid) $this->socid = 0;
|
if (! $this->socid) $this->socid = 0;
|
||||||
if (! $this->priv) $this->priv = 0;
|
if (! $this->priv) $this->priv = 0;
|
||||||
|
if (empty($this->statut)) $this->statut = 0;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
|
||||||
$sql.= " datec";
|
$sql.= " datec";
|
||||||
|
|||||||
@ -113,7 +113,8 @@ $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
|
||||||
@ -302,7 +303,8 @@ function getContact($authentication,$id,$ref='',$ref_ext='')
|
|||||||
'user_id' => $contact->user_id,
|
'user_id' => $contact->user_id,
|
||||||
'user_login' => $contact->user_login,
|
'user_login' => $contact->user_login,
|
||||||
'civilite_id' => $contact->civility_id,
|
'civilite_id' => $contact->civility_id,
|
||||||
'poste' => $contact->poste
|
'poste' => $contact->poste,
|
||||||
|
'statut' => $contact->statut
|
||||||
);
|
);
|
||||||
|
|
||||||
//Retreive all extrafield for thirdsparty
|
//Retreive all extrafield for thirdsparty
|
||||||
@ -412,6 +414,7 @@ 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
|
||||||
@ -488,7 +491,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
{
|
{
|
||||||
$linesinvoice=array();
|
$linesinvoice=array();
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname,";
|
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname, c.statut,";
|
||||||
$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,";
|
||||||
@ -565,7 +568,8 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
||||||
'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->no_email?$contact->user_login:''
|
'user_login' => $contact->user_login?$contact->user_login:'',
|
||||||
|
'statut' => $contact->statut?$contact->statut:''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -659,6 +663,8 @@ function updateContact($authentication,$contact)
|
|||||||
$object->civilite_id=$contact['civility_id'];
|
$object->civilite_id=$contact['civility_id'];
|
||||||
$object->poste=$contact['poste'];
|
$object->poste=$contact['poste'];
|
||||||
|
|
||||||
|
$object->statut=$contact['statut'];
|
||||||
|
|
||||||
|
|
||||||
//Retreive all extrafield for contact
|
//Retreive all extrafield for contact
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user