Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-01-21 15:04:58 +01:00
commit 2f7292aa78
4 changed files with 18 additions and 17 deletions

View File

@ -115,7 +115,7 @@ $actioncomm_fields= array(
//Retreive all extrafield for actioncomm
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm',true);
if (count($extrafields)>0) {
$extrafield_array = array();
}
@ -305,7 +305,7 @@ function getActionComm($authentication,$id)
//Retreive all extrafield for actioncomm
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm',true);
//Get extrafield values
$actioncomm->fetch_optionals($actioncomm->id,$extralabels);
@ -450,7 +450,7 @@ function createActionComm($authentication,$actioncomm)
//Retreive all extrafield for actioncomm
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm',true);
foreach($extrafields->attribute_label as $key=>$label)
{
$key='options_'.$key;

View File

@ -653,7 +653,7 @@ function createOrder($authentication,$order)
foreach($arrayoflines as $key => $line)
{
// $key can be 'line' or '0','1',...
$newline=new OrderLigne($db);
$newline=new OrderLine($db);
$newline->type=$line['type'];
$newline->desc=$line['desc'];

View File

@ -123,7 +123,7 @@ $thirdparty_fields= array(
//Retreive all extrafield for thirdsparty
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('company');
$extralabels=$extrafields->fetch_name_optionals_label('company',true);
if (count($extrafields)>0) {
$extrafield_array = array();
}
@ -328,7 +328,7 @@ function getThirdParty($authentication,$id='',$ref='',$ref_ext='')
//Retreive all extrafield for thirdsparty
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('company');
$extralabels=$extrafields->fetch_name_optionals_label('company',true);
//Get extrafield values
$thirdparty->fetch_optionals($thirdparty->id,$extralabels);
@ -442,7 +442,7 @@ function createThirdParty($authentication,$thirdparty)
//Retreive all extrafield for thirdsparty
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('company');
$extralabels=$extrafields->fetch_name_optionals_label('company',true);
foreach($extrafields->attribute_label as $key=>$label)
{
$key='options_'.$key;

View File

@ -109,6 +109,7 @@ $server->wsdl->addComplexType(
'pass_indatabase_crypted' => array('name'=>'pass_indatabase_crypted','type'=>'xsd:string'),
'datec' => array('name'=>'datec','type'=>'xsd:dateTime'),
'datem' => array('name'=>'datem','type'=>'xsd:dateTime'),
'fk_thirdparty' => array('name'=>'fk_thirdparty','type'=>'xsd:string'),
'fk_socpeople' => array('name'=>'fk_socpeople','type'=>'xsd:string'),
'fk_member' => array('name'=>'fk_member','type'=>'xsd:string'),
'datelastlogin' => array('name'=>'datelastlogin','type'=>'xsd:dateTime'),
@ -157,7 +158,7 @@ $server->wsdl->addComplexType(
'all',
'',
array(
// For thirdparty and contact
// For thirdparty and contact
'name' => array('name'=>'name','type'=>'xsd:string'),
'firstname' => array('name'=>'firstname','type'=>'xsd:string'),
'name_thirdparty' => array('name'=>'name_thirdparty','type'=>'xsd:string'),
@ -303,7 +304,7 @@ function getUser($authentication,$id,$ref='',$ref_ext='')
'pass_indatabase_crypted' => $user->pass_indatabase_crypted,
'datec' => dol_print_date($user->datec,'dayhourrfc'),
'datem' => dol_print_date($user->datem,'dayhourrfc'),
'societe_id' => $user->societe_id,
'fk_thirdparty' => $user->societe_id,
'fk_socpeople' => $user->fk_socpeople,
'fk_member' => $user->fk_member,
'webcal_login' => $user->webcal_login,
@ -497,16 +498,16 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
$thirdparty->idprof4=$thirdpartywithuser['prof4'];
$thirdparty->idprof5=$thirdpartywithuser['prof5'];
$thirdparty->idprof6=$thirdpartywithuser['prof6'];
$thirdparty->client=$thirdpartywithuser['client'];
$thirdparty->fournisseur=$thirdpartywithuser['fournisseur'];
$socid_return=$thirdparty->create($fuser);
if ($socid_return > 0)
{
$thirdparty->fetch($socid_return);
/*
* Contact creation
*
@ -525,7 +526,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
$contact->fax = $thirdparty->fax;
$contact_id = $contact->create($fuser);
if ($contact_id > 0)
{
/*
@ -534,7 +535,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
*/
$edituser = new User($db);
$db->begin();
$id = $edituser->create_from_contact($contact,$thirdpartywithuser["login"]);
if ($id > 0)
{
@ -545,8 +546,8 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
$error++;
$errorcode='NOT_CREATE'; $errorlabel='Object not create : no contact found or create';
}
if (! $error && $id > 0)
{
$db->commit();
@ -558,7 +559,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
$errorcode='NOT_CREATE'; $errorlabel='Contact not create';
}
}
if(!$error) {
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>'SUCCESS'),'id'=>$socid_return);
$error=0;