Merge pull request #7935 from aspangaro/7.0-b1

FIX : v7 sql error on init database
This commit is contained in:
Laurent Destailleur 2017-12-10 20:58:05 +01:00 committed by GitHub
commit e01195f4f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 44 deletions

View File

@ -4,7 +4,7 @@
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.com>
-- Copyright (C) 2015-2017 Juanjo Menent <jmenent@2byte.es>
--
@ -29,7 +29,7 @@
--
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('VT', 'Sale Journal', 2, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AC', 'Purhcase Journal', 3, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AC', 'Purchase Journal', 3, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('BQ', 'Bank Journal', 4, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('OD', 'Other Journal', 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active) VALUES ('AN', 'Has new Journal', 9, 1);

View File

@ -120,7 +120,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7116,'PCG','IMMO','XXXXXX','2351',7115,'Mobilier de bureau','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7117,'PCG','IMMO','XXXXXX','2352',7115,'Matériel de bureau','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7118,'PCG','IMMO','XXXXXX','2355',7115,'Matériel Informatique','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7119,'PCG','IMMO','XXXXXX','2356',7115,'Agencement, installations et aménagements divers (de biens n'appartenant pas à l''entreprise)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7119,'PCG','IMMO','XXXXXX','2356',7115,'Agencement, installations et aménagements divers (de biens n''appartenant pas à l''entreprise)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7120,'PCG','IMMO','XXXXXX','2358',7115,'Autres mobiliers, matériel de bureau et aménagements divers','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7121,'PCG','IMMO','XXXXXX','238',7090,'Autres immobilisations corporelles','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7122,'PCG','IMMO','XXXXXX','239',7090,'Immobilisations corporelles en cours','1');
@ -648,7 +648,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7644,'PCG','EXPENSE','XXXXXX','6581',7643,'Pénalités sur marchés et dédits','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7645,'PCG','EXPENSE','XXXXXX','65811',7644,'Pénalités sur marchés','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7646,'PCG','EXPENSE','XXXXXX','65812',7644,'Dédits','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7647,'PCG','EXPENSE','XXXXXX','6582',7643,'Rappels d''impôts (autres qu'impôts sur les résultats)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7647,'PCG','EXPENSE','XXXXXX','6582',7643,'Rappels d''impôts (autres qu''impôts sur les résultats)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7648,'PCG','EXPENSE','XXXXXX','6583',7643,'Pénalités et amendes fiscales ou pénales','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7649,'PCG','EXPENSE','XXXXXX','65831',7648,'Pénalités et amendes fiscales ou pénales','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7650,'PCG','EXPENSE','XXXXXX','65833',7648,'Pénalités et amendes pénales','1');
@ -806,7 +806,7 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7802,'PCG','INCOME','XXXXXX','7581',7801,'Pénalités et dédits reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7803,'PCG','INCOME','XXXXXX','75811',7802,'Pénalités reçus sur marché','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7804,'PCG','INCOME','XXXXXX','75812',7802,'Dédits reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7805,'PCG','INCOME','XXXXXX','7582',7801,'Dégrèvements d''impôts (autres qu'impôts sur résultat)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7805,'PCG','INCOME','XXXXXX','7582',7801,'Dégrèvements d''impôts (autres qu''impôts sur résultat)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7806,'PCG','INCOME','XXXXXX','7585',7801,'Rentrées sur créances soldées','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7807,'PCG','INCOME','XXXXXX','7586',7801,'Dons, libéralités et lots reçus','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7808,'PCG','INCOME','XXXXXX','75861',7807,'Dons','1');
@ -833,11 +833,11 @@ INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7829,'PCG','INCOME','XXXXXX','7597',7812,'Transfert de charges non courantes','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7830,'PCG','INCOME','XXXXXX','7598',7812,'Reprises non courantes des exercices antérieurs','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7831,'PCG','RESU','XXXXXX','8','','Comptes de résultats','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7832,'PCG','RESU','XXXXXX','81',7831,'Résultat s'exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7832,'PCG','RESU','XXXXXX','81',7831,'Résultat d''exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7833,'PCG','RESU','XXXXXX','811',7832,'Marge brute','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7834,'PCG','RESU','XXXXXX','814',7832,'Valeur ajoutée','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7835,'PCG','RESU','XXXXXX','817',7832,'Excédent brut s'exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7836,'PCG','RESU','XXXXXX','8171',7835,'Excédent brut s'exploitation (créditeur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7835,'PCG','RESU','XXXXXX','817',7832,'Excédent brut d''exploitation','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7836,'PCG','RESU','XXXXXX','8171',7835,'Excédent brut d''exploitation (créditeur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7837,'PCG','RESU','XXXXXX','8179',7835,'Insuffusance brute d''exploitation (débiteur)','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7838,'PCG','RESU','XXXXXX','83',7831,'Résultat financier','1');
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (7839,'PCG','RESU','XXXXXX','84',7831,'Résultat courant','1');

View File

@ -541,8 +541,8 @@ INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype,
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9536,'PCT','INCOME','XXXXXX','7','','Produits','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9537,'PCT','INCOME','XXXXXX','70',9536,'Ventes de produits fabriqués, prestations de services, marchandises','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9538,'PCT','INCOME','XXXXXX','701',9537,'Ventes de produits finis','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9539,'PCT','INCOME','XXXXXX','7011',,'Produits finis achevés','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9540,'PCT','INCOME','XXXXXX','7012',,'Produits finis non achevés (contrat de longue durée)','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9539,'PCT','INCOME','XXXXXX','7011','','Produits finis achevés','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9540,'PCT','INCOME','XXXXXX','7012','','Produits finis non achevés (contrat de longue durée)','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9541,'PCT','INCOME','XXXXXX','702',9537,'Ventes de produits intermédiaires','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9542,'PCT','INCOME','XXXXXX','703',9537,'Ventes de produits résiduels','1');
INSERT INTO llx_accounting_account(rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (9543,'PCT','INCOME','XXXXXX','704',9537,'Travaux','1');

View File

@ -26,22 +26,22 @@
-- Coef expense
--
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (1,4, 1, 0.41, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (2,4, 2, 0.244, 824);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (3,4, 3, 0.286, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (1,4, 1, 0.41, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (2,4, 2, 0.244, 824);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (3,4, 3, 0.286, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (4,5, 4, 0.493, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (5,5, 5, 0.277, 1082);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (6,5, 6, 0.332, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (4,5, 4, 0.493, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (5,5, 5, 0.277, 1082);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (6,5, 6, 0.332, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (7,6, 7, 0.543, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (8,6, 8, 0.305, 1180);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (9,6, 9, 0.364, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (7,6, 7, 0.543, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (8,6, 8, 0.305, 1180);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (9,6, 9, 0.364, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (10,7, 10, 0.568, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (11,7, 11, 0.32, 1244);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (12,7, 12, 0.382, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (10,7, 10, 0.568, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (11,7, 11, 0.32, 1244);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (12,7, 12, 0.382, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (13,8, 13, 0.595, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (14,8, 14, 0.337, 1288);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (15,8, 15, 0.401, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (13,8, 13, 0.595, 0);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (14,8, 14, 0.337, 1288);
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (15,8, 15, 0.401, 0);

View File

@ -50,7 +50,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp
journal_label varchar(255), -- FEC:JournalLib
piece_num integer NOT NULL, -- FEC:EcritureNum
validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification)
date_validated datetime -- FEC:ValidDate
date_validated datetime, -- FEC:ValidDate
import_key varchar(14),
extraparams varchar(255) -- for other parameters with json format
) ENGINE=innodb;

View File

@ -26,7 +26,7 @@ CREATE TABLE llx_blockedlog
amounts double(24,8) NOT NULL,
element varchar(50),
fk_user integer,
user_fullname varchar(255);
user_fullname varchar(255),
fk_object integer,
ref_object varchar(255),
date_object datetime,

View File

@ -26,7 +26,7 @@ create table llx_user
ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
ref_int varchar(50), -- reference into an internal system (deprecated)
employee tinyint DEFAULT 1, -- 1 if user is an employee
employee tinyint DEFAULT 1, -- 1 if user is an employee
fk_establishment integer DEFAULT 0,
datec datetime,
@ -34,21 +34,21 @@ create table llx_user
fk_user_creat integer,
fk_user_modif integer,
login varchar(50) NOT NULL,
pass_encoding varchar(24);
pass_encoding varchar(24),
pass varchar(128),
pass_crypted varchar(128),
pass_temp varchar(128), -- temporary password when asked for forget password
pass_temp varchar(128), -- temporary password when asked for forget password
api_key varchar(128), -- key to use REST API by this user
gender varchar(10),
civility varchar(6),
lastname varchar(50),
firstname varchar(50),
address varchar(255), -- user personal address
zip varchar(25), -- zipcode
town varchar(50), -- town
fk_state integer DEFAULT 0, --
fk_country integer DEFAULT 0, --
birth date, -- birthday
address varchar(255), -- user personal address
zip varchar(25), -- zipcode
town varchar(50), -- town
fk_state integer DEFAULT 0,
fk_country integer DEFAULT 0,
birth date, -- birthday
job varchar(128),
skype varchar(255),
office_phone varchar(20),
@ -62,7 +62,7 @@ create table llx_user
fk_soc integer,
fk_socpeople integer,
fk_member integer,
fk_user integer, -- Hierarchic parent
fk_user integer, -- Hierarchic parent
note_public text,
note text DEFAULT NULL,
model_pdf varchar(255) DEFAULT NULL,
@ -72,22 +72,22 @@ create table llx_user
ldap_sid varchar(255) DEFAULT NULL,
openid varchar(255),
statut tinyint DEFAULT 1,
photo varchar(255), -- filename or url of photo
photo varchar(255), -- filename or url of photo
lang varchar(6),
color varchar(6),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code varchar(32) NULL,
nb_holiday integer DEFAULT 0,
nb_holiday integer DEFAULT 0,
thm double(24,8),
tjm double(24,8),
salary double(24,8), -- denormalized value coming from llx_user_employment
salaryextra double(24,8), -- denormalized value coming from llx_user_employment
dateemployment date, -- denormalized value coming from llx_user_employment
weeklyhours double(16,8), -- denormalized value coming from llx_user_employment
salary double(24,8), -- denormalized value coming from llx_user_employment
salaryextra double(24,8), -- denormalized value coming from llx_user_employment
dateemployment date, -- denormalized value coming from llx_user_employment
weeklyhours double(16,8), -- denormalized value coming from llx_user_employment
import_key varchar(14), -- import key
import_key varchar(14), -- import key
default_range integer,
default_c_exp_tax_cat integer
)ENGINE=innodb;