diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index f4863421f68..a559b4f580e 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -61,7 +61,7 @@ if (! empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); - print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").''; + print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'
'; } print '
'; print '
'; @@ -72,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 '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'
'; } print '
'; print '
'; @@ -86,7 +86,6 @@ print "
"; print '
'; - llxFooter(); $db->close(); diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index a2b69c3cf07..8624df28102 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -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); 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/support/index.php b/htdocs/support/index.php index daf54012f8c..b0b4a2f4d73 100644 --- a/htdocs/support/index.php +++ b/htdocs/support/index.php @@ -49,7 +49,6 @@ print $langs->trans("HelpCenterDesc2")."
\n"; print '
'; print $langs->trans("ToGoBackToDolibarr",DOL_URL_ROOT.'/'); -//print 'Dolibarr'; print '

'; diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index e8b99464f99..dfc0aac590a 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -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; diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 16091ce90fb..525d6df3bf3 100755 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -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; diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 49f95b33a08..a49295c2ee5 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -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;