Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into webservices
This commit is contained in:
commit
a03099bd58
@ -61,7 +61,7 @@ if (! empty($setupcompanynotcomplete))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
|
||||
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit').'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
|
||||
print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit').'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -72,7 +72,7 @@ if (count($conf->modules) <= 1) // If only user module enabled
|
||||
{
|
||||
$langs->load("errors");
|
||||
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
|
||||
print '<br><a href="'.DOL_URL_ROOT.'/admin/modules.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
|
||||
print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/modules.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -86,7 +86,6 @@ print "<br>";
|
||||
print '<center><div class="logo_setup"></div></center>';
|
||||
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -284,7 +284,7 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'NL','',1,'','Newfoundland and Labrador');
|
||||
|
||||
-- Provinces Spain (id country=4)
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('01', 419, '', 19, 'ALAVA, 'Álava', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('01', 419, '', 19, 'ALAVA', 'Álava', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('02', 404, '', 4, 'ALBACETE', 'Albacete', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('03', 411, '', 11, 'ALICANTE', 'Alicante', 1);
|
||||
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('04', 401, '', 1, 'ALMERIA', 'Almería', 1);
|
||||
|
||||
@ -192,14 +192,14 @@ ALTER TABLE llx_holiday ADD INDEX idx_holiday_fk_user (fk_user);
|
||||
ALTER TABLE llx_holiday ADD INDEX idx_holiday_date_debut (date_debut);
|
||||
ALTER TABLE llx_holiday ADD INDEX idx_holiday_date_fin (date_fin);
|
||||
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'userGroup', NULL);
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'lastUpdate', NULL);
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'nbUser', NULL);
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'delayForRequest', '31');
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'AlertValidatorDelay', '0');
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'AlertValidatorSolde', '0');
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'nbHolidayDeducted', '1');
|
||||
INSERT INTO llx_holiday_config (rowid ,name ,value) VALUES (NULL , 'nbHolidayEveryMonth', '2.08334');
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('userGroup', NULL);
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('lastUpdate', NULL);
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('nbUser', NULL);
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('delayForRequest', '31');
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('AlertValidatorDelay', '0');
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('AlertValidatorSolde', '0');
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('nbHolidayDeducted', '1');
|
||||
INSERT INTO llx_holiday_config (name ,value) VALUES ('nbHolidayEveryMonth', '2.08334');
|
||||
|
||||
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (80, 'agenda', 'internal', 'ACTOR', 'Responsable', 1);
|
||||
@ -838,26 +838,32 @@ CREATE TABLE llx_product_price_by_qty
|
||||
qty_min real DEFAULT 0
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_product_price ADD COLUMN price_by_qty INT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE llx_product_price ADD COLUMN price_by_qty integer NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_product_price_by_qty ADD UNIQUE INDEX uk_product_price_by_qty_level (fk_product_price, qty_min);
|
||||
|
||||
ALTER TABLE llx_product_price_by_qty ADD INDEX idx_product_price_by_qty_fk_product_price (fk_product_price);
|
||||
|
||||
ALTER TABLE llx_product_price_by_qty ADD CONSTRAINT fk_product_price_by_qty_fk_product_price FOREIGN KEY (fk_product_price) REFERENCES llx_product_price (rowid);
|
||||
|
||||
ALTER TABLE `llx_product_price_by_qty` ADD `remise_percent` DOUBLE NOT NULL DEFAULT '0' AFTER `price_ttc` ,
|
||||
ADD `remise` DOUBLE NOT NULL DEFAULT '0' AFTER `remise_percent`;
|
||||
ALTER TABLE llx_product_price_by_qty ADD remise_percent DOUBLE NOT NULL DEFAULT '0' AFTER price_ttc;
|
||||
ALTER TABLE llx_product_price_by_qty ADD remise DOUBLE NOT NULL DEFAULT '0' AFTER remise_percent;
|
||||
|
||||
-- Change index name to be compliant with SQL standard, index name must be unique in database schema
|
||||
ALTER TABLE llx_c_actioncomm DROP INDEX code, ADD UNIQUE uk_c_actioncomm (code);
|
||||
ALTER TABLE llx_c_civilite DROP INDEX code, ADD UNIQUE uk_c_civilite (code);
|
||||
ALTER TABLE llx_c_propalst DROP INDEX code, ADD UNIQUE uk_c_propalst (code);
|
||||
ALTER TABLE llx_c_stcomm DROP INDEX code, ADD UNIQUE uk_c_stcomm (code);
|
||||
ALTER TABLE llx_c_type_fees DROP INDEX code, ADD UNIQUE uk_c_type_fees (code);
|
||||
ALTER TABLE llx_c_typent DROP INDEX code, ADD UNIQUE uk_c_typent (code);
|
||||
ALTER TABLE llx_c_effectif DROP INDEX code, ADD UNIQUE uk_c_effectif (code);
|
||||
ALTER TABLE llx_c_paiement DROP INDEX code, ADD UNIQUE uk_c_paiement (code);
|
||||
ALTER TABLE llx_c_actioncomm DROP INDEX code;
|
||||
ALTER TABLE llx_c_actioncomm ADD UNIQUE INDEX uk_c_actioncomm(code);
|
||||
ALTER TABLE llx_c_civilite DROP INDEX code;
|
||||
ALTER TABLE llx_c_civilite ADD UNIQUE INDEX uk_c_civilite(code);
|
||||
ALTER TABLE llx_c_propalst DROP INDEX code;
|
||||
ALTER TABLE llx_c_propalst ADD UNIQUE INDEX uk_c_propalst(code);
|
||||
ALTER TABLE llx_c_stcomm DROP INDEX code;
|
||||
ALTER TABLE llx_c_stcomm ADD UNIQUE INDEX uk_c_stcomm(code);
|
||||
ALTER TABLE llx_c_type_fees DROP INDEX code;
|
||||
ALTER TABLE llx_c_type_fees ADD UNIQUE INDEX uk_c_type_fees(code);
|
||||
ALTER TABLE llx_c_typent DROP INDEX code;
|
||||
ALTER TABLE llx_c_typent ADD UNIQUE INDEX uk_c_typent(code);
|
||||
ALTER TABLE llx_c_effectif DROP INDEX code;
|
||||
ALTER TABLE llx_c_effectif ADD UNIQUE INDEX uk_c_effectif(code);
|
||||
ALTER TABLE llx_c_paiement DROP INDEX code;
|
||||
ALTER TABLE llx_c_paiement ADD UNIQUE INDEX uk_c_paiement(code);
|
||||
|
||||
delete from llx_c_actioncomm where id = 40;
|
||||
INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, position) values ( 40, 'AC_OTH_AUTO','systemauto', 'Other (automatically inserted events)' ,NULL, 20);
|
||||
|
||||
@ -23,7 +23,7 @@ create table llx_product_price_by_qty
|
||||
(
|
||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_product_price integer NOT NULL,
|
||||
date_price timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
date_price timestamp NOT NULL,
|
||||
price double(24,8) DEFAULT 0,
|
||||
quantity double DEFAULT NULL,
|
||||
remise_percent double NOT NULL DEFAULT 0,
|
||||
|
||||
@ -49,7 +49,6 @@ print $langs->trans("HelpCenterDesc2")."<br>\n";
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("ToGoBackToDolibarr",DOL_URL_ROOT.'/');
|
||||
//print '<img src="dolibarr_logo2.png" height="22" alt="Dolibarr" title="Dolibarr">';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -109,7 +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'),
|
||||
'id_thirdparty' => array('name'=>'id_thirdparty','type'=>'xsd:string'),
|
||||
'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'),
|
||||
@ -158,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'),
|
||||
@ -304,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'),
|
||||
'id_thirdparty' => $user->societe_id,
|
||||
'fk_thirdparty' => $user->societe_id,
|
||||
'fk_socpeople' => $user->fk_socpeople,
|
||||
'fk_member' => $user->fk_member,
|
||||
'webcal_login' => $user->webcal_login,
|
||||
@ -498,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
|
||||
*
|
||||
@ -526,7 +526,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
|
||||
$contact->fax = $thirdparty->fax;
|
||||
|
||||
$contact_id = $contact->create($fuser);
|
||||
|
||||
|
||||
if ($contact_id > 0)
|
||||
{
|
||||
/*
|
||||
@ -535,7 +535,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
|
||||
*/
|
||||
$edituser = new User($db);
|
||||
$db->begin();
|
||||
|
||||
|
||||
$id = $edituser->create_from_contact($contact,$thirdpartywithuser["login"]);
|
||||
if ($id > 0)
|
||||
{
|
||||
@ -546,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();
|
||||
@ -559,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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user