diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index dddf84eb655..41d52b93834 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -55,12 +55,13 @@ print $langs->trans("SetupDescription2")."
";
print '
';
//print '
';
+if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_PAYS)) $setupcompanynotcomplete=1;
print img_picto('','puce').' '.$langs->trans("SetupDescription3",DOL_URL_ROOT.'/admin/company.php?mainmenu=home');
-if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_PAYS))
+if (! empty($setupcompanynotcomplete))
{
$langs->load("errors");
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
- print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'';
+ print '
';
}
print '
';
print '
';
@@ -71,7 +72,7 @@ if (count($conf->modules) <= 1) // If only user module enabled
{
$langs->load("errors");
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
- print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'';
+ print '
';
}
print '
';
print '
';
@@ -93,7 +94,7 @@ print '';
//print info_admin($langs->trans("OnceSetupFinishedCreateUsers")).'
';
-$db->close();
-
llxFooter();
+
+$db->close();
?>
diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
index a94871e2b9c..43f397aedf1 100755
--- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
+++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
@@ -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);
diff --git a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql
index d2a588245dc..e86d77fe982 100644
--- a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql
+++ b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql
@@ -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,
diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php
index bf50d70dba6..777f0d9b5b2 100644
--- a/htdocs/webservices/server_user.php
+++ b/htdocs/webservices/server_user.php
@@ -28,6 +28,7 @@ require_once '../master.inc.php';
require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP
require_once DOL_DOCUMENT_ROOT.'/core/lib/ws.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
@@ -512,8 +513,8 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
*/
$contact = new Contact($db);
$contact->socid = $thirdparty->id;
- $contact->lastname = $thirdparty->name;
- $contact->firstname = $thirdparty->firstname;
+ $contact->lastname = $thirdpartywithuser['name'];
+ $contact->firstname = $thirdpartywithuser['firstname'];
$contact->civilite_id = $thirdparty->civilite_id;
$contact->address = $thirdparty->address;
$contact->zip = $thirdparty->zip;
@@ -523,7 +524,7 @@ function CreateUserFromThirdparty($authentication,$thirdpartywithuser)
$contact->phone_mobile = $thirdparty->phone_mobile;
$contact->fax = $thirdparty->fax;
- $contact_id = $contact->create($user);
+ $contact_id = $contact->create($fuser);
if ($contact_id > 0)
{