';
print '
';
+ print '';
+ print '';
}
}
}
diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php
index 97a52ff6c34..04f8a3caf4c 100644
--- a/htdocs/install/fileconf.php
+++ b/htdocs/install/fileconf.php
@@ -328,8 +328,9 @@ if (! empty($force_install_message))
$option.='>';
$option.=$type.' ';
if ($note) $option.=' '.$note;
- // Experimental
- if ($type=='mssql') $option.=' '.$langs->trans("Experimental");
+ // Deprecated and experimental
+ if ($type=='mysql') $option.=' ' . $langs->trans("Deprecated");
+ elseif ($type=='mssql') $option.=' '.$langs->trans("Experimental");
elseif ($type=='sqlite') $option.=' '.$langs->trans("Experimental");
elseif ($type=='sqlite3') $option.=' '.$langs->trans("Experimental");
// No available
diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql
index e1664384323..6ef8096d8b4 100644
--- a/htdocs/install/mysql/data/llx_10_c_regions.sql
+++ b/htdocs/install/mysql/data/llx_10_c_regions.sql
@@ -39,7 +39,8 @@ insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1,
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 2,'97209',3,'Martinique');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 3,'97302',3,'Guyane');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 4,'97411',3,'Réunion');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 6,'',3,'Mayotte');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 6,'97601',3,'Mayotte');
+
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 11,'75056',1,'Île-de-France');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 21,'51108',0,'Champagne-Ardenne');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 22,'80021',0,'Picardie');
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index 116f9572052..bc727447abe 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -35,6 +35,12 @@
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 0, '0', '0',0,'-','-');
-- Departements France (id country=1)
+insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe');
+insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
+insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
+insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
+insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
+
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (82,'01','01053',5,'AIN','Ain');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (22,'02','02408',5,'AISNE','Aisne');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (83,'03','03190',5,'ALLIER','Allier');
@@ -131,11 +137,6 @@ 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 (11,'93','93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'94','94028',2,'VAL-DE-MARNE','Val-de-Marne');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'95','95500',2,'VAL-D OISE','Val-d Oise');
-insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe');
-insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
-insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
-insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
-insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
-- Provinces Belgium (id country=2)
diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql
index 1dde6d5d37c..408c7a36ff6 100644
--- a/htdocs/install/mysql/data/llx_c_action_trigger.sql
+++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql
@@ -8,6 +8,7 @@
-- Copyright (C) 2010-2013 Juanjo Menent
-- Copyright (C) 2013 Cedric Gross
-- Copyright (C) 2014 Raphaël Doursenaud
+-- Copyright (C) 2015 Bahfir Abbes
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -74,3 +75,4 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',35);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',36);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_UNVALIDATE', 'Supplier invoice unvalidated', 'Executed when a supplier invoice status is set back to draft', 'invoice_supplier',15);
diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
index a0e1e058860..750ca7de930 100644
--- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql
+++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
@@ -73,7 +73,7 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'31','Perso
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'32','Personne morale de droit étranger, non immatriculée au RCS');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'35','Régime auto-entrepreneur');
-insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'41','Établissement public ou régie à caractère industriel ou commercial');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'41','Etablissement public ou régie à caractère industriel ou commercial');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'51','Société coopérative commerciale particulière');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'52','Société en nom collectif');
@@ -84,7 +84,7 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Soci
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée (SAS)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'58','Entreprise Unipersonnelle à Responsabilité Limitée (EURL)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'59','Société par actions simplifiée unipersonnelle (SASU)');
-insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'60', 'Entreprise Individuelle à Responsabilité Limitée (EIRL)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'60','Entreprise Individuelle à Responsabilité Limitée (EIRL)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'61','Caisse d''épargne et de prévoyance');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'62','Groupement d''intérêt économique (GIE)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'63','Société coopérative agricole');
@@ -94,7 +94,7 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'69','Perso
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'71','Administration de l état');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'72','Collectivité territoriale');
-insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'73','Établissement public administratif');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'73','Etablissement public administratif');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'74','Personne morale de droit public administratif');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'81','Organisme gérant régime de protection social à adhésion obligatoire');
diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
index e73b716a654..dd0aba11632 100755
--- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
+++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
@@ -98,36 +98,36 @@ ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL
ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author;
-- Qual
-UPDATE llx_const SET name = 'ACCOUNTING_MODE' WHERE name = 'COMPTA_MODE';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_CUSTOMER' WHERE name = 'COMPTA_ACCOUNT_CUSTOMER';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUPPLIER' WHERE name = 'COMPTA_ACCOUNT_SUPPLIER';
-UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_BUY_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_BUY_ACCOUNT' WHERE name = 'COMPTA_SERVICE_BUY_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT' WHERE name = 'COMPTA_SERVICE_SOLD_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_VAT_ACCOUNT' WHERE name = 'COMPTA_VAT_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_VAT_BUY_ACCOUNT' WHERE name = 'COMPTA_VAT_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MODE')__ WHERE __DECRYPT('name')__ = 'COMPTA_MODE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_CUSTOMER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_CUSTOMER';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUPPLIER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_SUPPLIER';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_BUY_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_SOLD_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_BUY_ACCOUNT';
-- Compatibility with module Accounting Expert
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DATE' WHERE name = 'ACCOUNTINGEX_EXP_DATE';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_PIECE' WHERE name = 'ACCOUNTINGEX_EXP_PIECE';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT' WHERE name = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_LABEL' WHERE name = 'ACCOUNTINGEX_EXP_LABEL';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_AMOUNT' WHERE name = 'ACCOUNTINGEX_EXP_AMOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DEVISE' WHERE name = 'ACCOUNTINGEX_EXP_DEVISE';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUSPENSE' WHERE name = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
-UPDATE llx_const SET name = 'ACCOUNTING_SELL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SELL_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_PURCHASE_JOURNAL' WHERE name = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_SOCIAL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_MISCELLANEOUS_JOURNAL' WHERE name = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
-UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' WHERE name = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
-UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_GACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_AACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
-UPDATE llx_const SET name = 'ACCOUNTING_LIMIT_LIST_VENTILATION' WHERE name = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
-UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_TODO' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
-UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_DONE' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_MODELCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MODELCSV';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_SEPARATORCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SEPARATORCSV';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DATE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DATE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_PIECE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_PIECE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_GLOBAL_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_LABEL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_LABEL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_AMOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_AMOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DEVISE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DEVISE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUSPENSE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SELL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SELL_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PURCHASE_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SOCIAL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MISCELLANEOUS_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_TRANSFER_CASH')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_GACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_AACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIMIT_LIST_VENTILATION')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_TODO')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
+UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_DONE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
-- Drop old table
DROP TABLE llx_compta;
@@ -208,10 +208,14 @@ UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELE
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_user_author (fk_user_author);
UPDATE llx_product_price set fk_user_author = null where fk_user_author = 0;
UPDATE llx_product_price set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
+-- drop foreign key for avoid a mysql crash
+ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_user_author;
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
-- fk_product
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product);
DELETE from llx_product_price where fk_product NOT IN (SELECT rowid from llx_product);
+-- drop foreign key for avoid a mysql crash
+ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_product;
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
ALTER TABLE llx_commande_fournisseur MODIFY COLUMN date_livraison datetime;
@@ -1133,9 +1137,9 @@ ALTER TABLE llx_c_email_templates ADD UNIQUE INDEX uk_c_email_templates(entity,
ALTER TABLE llx_c_email_templates ADD INDEX idx_type(type_template);
-- Remove OSC module
-DELETE FROM llx_const WHERE name = 'MAIN_MODULE_BOUTIQUE';
-DELETE FROM llx_const WHERE name = 'OSC_DB_HOST';
-DELETE FROM llx_menu WHERE module = 'boutique';
+DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MODULE_BOUTIQUE';
+DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'OSC_DB_HOST';
+DELETE FROM llx_menu WHERE __DECRYPT('module')__ = 'boutique';
-- Add option always editable on extrafield
ALTER TABLE llx_extrafields ADD alwayseditable INTEGER DEFAULT 0 AFTER pos;
@@ -1181,4 +1185,5 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_typ
ALTER TABLE llx_livraison MODIFY COLUMN date_delivery DATETIME NULL DEFAULT NULL;
-INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT 'PRODUCT_USE_OLD_PATH_FOR_PHOTO','1','chaine','Use old path for products images',0,1 FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL' AND value < '3.7.0';
+-- This constant is for compatibility if user come from 3.6 or lower. Must not be enabled on 3.7.0 or +
+INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT __ENCRYPT('PRODUCT_USE_OLD_PATH_FOR_PHOTO')__,__ENCRYPT('1')__,'chaine','Use old path for products images',1,0 FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_VERSION_LAST_INSTALL' AND __DECRYPT('value')__ < '3.7.0';
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index 1f2fc5f562e..cdb0f2eac01 100755
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -29,6 +29,11 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_typ
-- Taiwan VAT Rates
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2131, 213, '5', '0', 'VAT 5%', 1);
+ALTER TABLE llx_societe_rib ADD COLUMN rum varchar(32) after default_rib;
+ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16) default 'FRST' after rum;
+
+ALTER TABLE llx_cronjob ADD COLUMN entity integer DEFAULT 0;
+ALTER TABLE llx_cronjob MODIFY COLUMN params text NULL;
-- Loan
create table llx_loan
@@ -123,7 +128,10 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_supplier_price_expressio
ALTER TABLE llx_product ADD COLUMN fk_price_expression integer DEFAULT NULL;
ALTER TABLE llx_product_price ADD COLUMN fk_price_expression integer DEFAULT NULL;
+ALTER TABLE llx_product ADD COLUMN fifo double(24,8) after pmp;
+ALTER TABLE llx_product ADD COLUMN lifo double(24,8) after fifo;
+
--create table for user conf of printing driver
CREATE TABLE llx_printing
(
@@ -149,12 +157,12 @@ ALTER TABLE llx_facturedet ADD COLUMN situation_percent real;
ALTER TABLE llx_facturedet ADD COLUMN fk_prev_id integer;
-- Convert SMTP config to main entity, so new entities don't get the old values
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SENDMODE";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTP_PORT";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTP_SERVER";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTPS_ID";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_SMTPS_PW";
-UPDATE llx_const SET entity = 1 WHERE entity = 0 AND name = "MAIN_MAIL_EMAIL_TLS";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SENDMODE";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTP_PORT";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTP_SERVER";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTPS_ID";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_SMTPS_PW";
+UPDATE llx_const SET entity = __ENCRYPT('1')__ WHERE __DECRYPT('entity')__ = 0 AND __DECRYPT('name')__ = "MAIN_MAIL_EMAIL_TLS";
create table llx_bank_account_extrafields
@@ -167,8 +175,10 @@ create table llx_bank_account_extrafields
ALTER TABLE llx_stock_mouvement MODIFY COLUMN label varchar(255);
+ALTER TABLE llx_stock_mouvement MODIFY COLUMN price double(24,8) DEFAULT 0;
ALTER TABLE llx_stock_mouvement ADD COLUMN inventorycode varchar(128);
+
ALTER TABLE llx_product_association ADD COLUMN incdec integer DEFAULT 1;
@@ -638,11 +648,12 @@ ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(256);
ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(256);
ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(256);
--- Recuring events
+-- Recurring events
ALTER TABLE llx_actioncomm ADD COLUMN recurid varchar(128);
ALTER TABLE llx_actioncomm ADD COLUMN recurrule varchar(128);
ALTER TABLE llx_actioncomm ADD COLUMN recurdateend datetime;
-ALTER TABLE llx_stcomm ADD COLUMN picto varchar(128);
-
+ALTER TABLE llx_c_stcomm ADD COLUMN picto varchar(128);
+-- New trigger for Supplier invoice unvalidation
+INSERT INTO llx_c_action_trigger (code, label, description, elementtype, rang) VALUES ('BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15);
diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql
index a7ed4858024..5580b5ab830 100644
--- a/htdocs/install/mysql/tables/llx_cronjob.sql
+++ b/htdocs/install/mysql/tables/llx_cronjob.sql
@@ -29,7 +29,7 @@ CREATE TABLE llx_cronjob
classesname varchar(255),
objectname varchar(255),
methodename varchar(255),
- params text NOT NULL,
+ params text,
md5params varchar(32),
module_name varchar(255),
priority integer DEFAULT 0,
@@ -47,5 +47,6 @@ CREATE TABLE llx_cronjob
fk_user_author integer DEFAULT NULL,
fk_user_mod integer DEFAULT NULL,
note text,
- libname varchar(255)
+ libname varchar(255),
+ entity integer DEFAULT 0
)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql
index 5abbdcdde97..22006040327 100755
--- a/htdocs/install/mysql/tables/llx_product.sql
+++ b/htdocs/install/mysql/tables/llx_product.sql
@@ -71,7 +71,9 @@ create table llx_product
volume float DEFAULT NULL,
volume_units tinyint DEFAULT NULL,
stock integer, -- Current physical stock (dernormalized field)
- pmp double(24,8) DEFAULT 0 NOT NULL,
+ pmp double(24,8) DEFAULT 0 NOT NULL, -- To store valuation of stock calculated using average price method, for this product
+ fifo double(24,8), -- To store valuation of stock calculated using fifo method, for this product
+ lifo double(24,8), -- To store valuation of stock calculated using lifo method, for this product
canvas varchar(32) DEFAULT NULL,
finished tinyint DEFAULT NULL,
hidden tinyint DEFAULT 0, -- Not used. Deprecated.
diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql
index 0500c32c744..3331da24696 100644
--- a/htdocs/install/mysql/tables/llx_societe_rib.sql
+++ b/htdocs/install/mysql/tables/llx_societe_rib.sql
@@ -37,7 +37,9 @@ create table llx_societe_rib
proprio varchar(60),
owner_address varchar(255),
default_rib smallint NOT NULL DEFAULT 0,
+
+ rum varchar(32), -- RUM value to use for SEPA generation
+ frstrecur varchar(16) default 'FRST', -- 'FRST' or 'RECUR'
+
import_key varchar(14) -- import key
-
-
)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql
index a367c6952c5..3db9a4475cd 100644
--- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql
+++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql
@@ -1,6 +1,6 @@
-- ============================================================================
--- Copyright (C) 2003 Rodolphe Quiedeville
--- Copyright (C) 2009 Laurent Destailleur
+-- Copyright (C) 2003 Rodolphe Quiedeville
+-- Copyright (C) 2009-2015 Laurent Destailleur
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -21,18 +21,18 @@ create table llx_stock_mouvement
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
- datem datetime,
- fk_product integer NOT NULL,
- batch varchar(30) DEFAULT NULL,
- eatby date DEFAULT NULL,
- sellby date DEFAULT NULL,
- fk_entrepot integer NOT NULL,
- value real,
- price float(13,4) DEFAULT 0,
- type_mouvement smallint,
- fk_user_author integer,
- label varchar(255), -- comment on movement
- inventorycode varchar(128), -- code used to group different movement line into one operation (may be an inventory, a mass picking)
+ datem datetime, -- Date and hour of movement
+ fk_product integer NOT NULL, -- Id of product
+ batch varchar(30) DEFAULT NULL, -- Lot or serial number
+ eatby date DEFAULT NULL, -- Eatby date
+ sellby date DEFAULT NULL, -- Sellby date
+ fk_entrepot integer NOT NULL, -- Id warehouse
+ value real, -- Qty of movement
+ price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value)
+ type_mouvement smallint, -- Type/Direction of movement
+ fk_user_author integer, -- Id user making movement
+ label varchar(255), -- Comment on movement
+ inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking)
fk_origin integer,
origintype varchar(32)
)ENGINE=innodb;
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 70ebd8550c5..6f14791f6b4 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -363,7 +363,13 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
{
migrate_event_assignement($db,$langs,$conf);
-
+ }
+
+ // Scripts for lat version
+ $afterversionarray=explode('.','3.7.9');
+ $beforeversionarray=explode('.','3.8.9');
+ if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
+ {
// Reload modules (this must be always and only into last targeted version)
$listofmodule=array(
'MAIN_MODULE_AGENDA',
@@ -3680,7 +3686,7 @@ function migrate_delete_old_files($db,$langs,$conf)
print ' '.$langs->trans("RemoveItManuallyAndPressF5ToContinue").' ';
}
else
- {
+ {
//print $langs->trans("FileWasRemoved",$filetodelete);
}
}
@@ -3818,8 +3824,9 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Service");
+
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
$mod=new modService($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3828,8 +3835,9 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Commande");
+
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
$mod=new modCommande($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3838,8 +3846,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Facture");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
$mod=new modFacture($db);
//$mod->remove('noboxes');
$mod->init('newboxdefonly');
@@ -3878,8 +3886,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1
{
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ECM");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
if ($res) {
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
$mod=new modECM($db);
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
$mod->init('newboxdefonly');
diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang
index d0a43020f13..f4954f84fc2 100644
--- a/htdocs/langs/ar_SA/admin.lang
+++ b/htdocs/langs/ar_SA/admin.lang
@@ -1,175 +1,175 @@
# Dolibarr language file - Source file is en_US - admin
-Foundation=أساس
-Version=النسخة
-VersionProgram=نسخة البرنامج
+Foundation=جمعية
+Version=إصدار
+VersionProgram=إصدار البرنامج
VersionLastInstall=تثبيت الإصدار الأولي
-VersionLastUpgrade=آخر تحديث لهذه النسخة
-VersionExperimental=تجريبية
-VersionDevelopment=تطويرية
-VersionUnknown=غير معروفة
-VersionRecommanded=موصى بها
-FileCheck=Files Integrity
-FilesMissing=Missing Files
-FilesUpdated=Updated Files
-FileCheckDolibarr=Check Dolibarr Files Integrity
-XmlNotFound=Xml File of Dolibarr Integrity Not Found
-SessionId=رمز المرحلة
-SessionSaveHandler=معالج لحفظ المراحل
-SessionSavePath=مرحلة التخزين المحلية
-PurgeSessions=إزالة المراحل
-ConfirmPurgeSessions=Do you really want to purge all sessions ? This will disconnect every user (except yourself).
-NoSessionListWithThisHandler=معالج حفظ المرحلة المهيأ في لغة البي إتش بي لا يسمح بسرد كل المراحل التي تعمل
+VersionLastUpgrade=آخر تحديث لهذا الإصدار
+VersionExperimental=إصدار تجريبي
+VersionDevelopment=إصدارتطويري
+VersionUnknown=إصدار غير معروف
+VersionRecommanded=إصدار موصى به
+FileCheck=تكامل الملفات
+FilesMissing=الملفات المفقودة
+FilesUpdated=الملفات المحدثة
+FileCheckDolibarr=التحقق من تكامل الملفات
+XmlNotFound= لم يتم العثور على الملف اكس أمال لدوليبار
+SessionId=معرف الجلسة
+SessionSaveHandler=مدير لحفظ الجلسات
+SessionSavePath= موقع حفظ الجلسات
+PurgeSessions=إزالة الجلسات
+ConfirmPurgeSessions=هل تريد حقا تطهير جميع الجلسات؟ وهذا بفصل كل مستخدم (باستثناء نفسك).
+NoSessionListWithThisHandler=مدير حفظ الجلسة المهيأ في لغة البي إتش بي لا يسمح بسرد كل الجلسات الجارية
LockNewSessions=قم بإقفال الإتصالات الجديدة
-ConfirmLockNewSessions=هل أنت متأكد من أنك تريد تقييد أي اتصال جديدة من دوليبار لنفسك.