forked from Wavyzz/dolibarr
Merge branch 'develop' into patch-255
This commit is contained in:
@@ -33,6 +33,19 @@ ALTER TABLE llx_account_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL
|
||||
ALTER TABLE llx_expensereport ADD COLUMN paid smallint default 0 NOT NULL;
|
||||
UPDATE llx_expensereport set paid = 1 WHERE fk_statut = 6 and paid = 0;
|
||||
|
||||
UPDATE llx_c_units SET short_label = 'i' WHERE code = 'MI';
|
||||
UPDATE llx_c_units SET unit_type = 'weight', short_label = 'kg', scale = 0 WHERE code = 'KG';
|
||||
UPDATE llx_c_units SET unit_type = 'weight', short_label = 'g', scale = -3 WHERE code = 'G';
|
||||
UPDATE llx_c_units SET unit_type = 'time' WHERE code IN ('S','H','D');
|
||||
UPDATE llx_c_units SET unit_type = 'size' WHERE code IN ('M','LM');
|
||||
UPDATE llx_c_units SET label = 'SizeUnitm', scale = 0 WHERE code IN ('M');
|
||||
UPDATE llx_c_units SET active = 0, scale = 0 WHERE code IN ('LM');
|
||||
UPDATE llx_c_units SET unit_type = 'surface', scale = 0 WHERE code IN ('M2');
|
||||
UPDATE llx_c_units SET unit_type = 'volume', scale = 0 WHERE code IN ('M3','L');
|
||||
UPDATE llx_c_units SET scale = -3, active = 0 WHERE code IN ('L');
|
||||
UPDATE llx_c_units SET label = 'VolumeUnitm3' WHERE code IN ('M3');
|
||||
UPDATE llx_c_units SET label = 'SurfaceUnitm2' WHERE code IN ('M2');
|
||||
|
||||
|
||||
-- For v11
|
||||
|
||||
@@ -123,18 +136,35 @@ ALTER TABLE llx_projet ADD COLUMN usage_organize_event integer DEFAULT 0;
|
||||
|
||||
UPDATE llx_projet set usage_opportunity = 1 WHERE fk_opp_status > 0;
|
||||
|
||||
create table llx_societe_contacts
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
fk_soc integer NOT NULL,
|
||||
fk_c_type_contact int NOT NULL,
|
||||
fk_socpeople integer NOT NULL,
|
||||
tms TIMESTAMP,
|
||||
import_key VARCHAR(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_societe_contacts ADD UNIQUE INDEX idx_societe_contacts_idx1 (entity, fk_soc, fk_c_type_contact, fk_socpeople);
|
||||
ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid);
|
||||
ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople(rowid);
|
||||
|
||||
ALTER TABLE llx_accounting_account MODIFY COLUMN rowid bigint AUTO_INCREMENT;
|
||||
|
||||
|
||||
ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL;
|
||||
ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL;
|
||||
|
||||
|
||||
|
||||
create table llx_c_hrm_public_holiday
|
||||
(
|
||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 0 NOT NULL, -- multi company id, 0 = all
|
||||
fk_country integer,
|
||||
fk_country integer,
|
||||
code varchar(62),
|
||||
dayrule varchar(64) DEFAULT '', -- 'easter', 'eastermonday', ...
|
||||
day integer,
|
||||
@@ -197,3 +227,89 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m
|
||||
INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-REPUBLICDAY', 0, 117, '', 0, 1, 26, 1);
|
||||
INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-GANDI', 0, 117, '', 0, 10, 2, 1);
|
||||
|
||||
create table llx_adherent_type_lang
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_type integer DEFAULT 0 NOT NULL,
|
||||
lang varchar(5) DEFAULT 0 NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
description text,
|
||||
email text,
|
||||
import_key varchar(14) DEFAULT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
create table llx_fichinter_rec
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
titre varchar(50) NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
fk_soc integer DEFAULT NULL,
|
||||
datec datetime, -- date de creation
|
||||
fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche
|
||||
fk_user_author integer, -- createur
|
||||
fk_projet integer, -- projet auquel est associe la facture
|
||||
duree real, -- duree totale de l'intervention
|
||||
description text,
|
||||
modelpdf varchar(50),
|
||||
note_private text,
|
||||
note_public text,
|
||||
frequency integer, -- frequency (for example: 3 for every 3 month)
|
||||
unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ...
|
||||
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
|
||||
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
|
||||
nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented)
|
||||
nb_gen_max integer DEFAULT NULL, -- maximum number of generation
|
||||
auto_validate integer NULL DEFAULT NULL -- statut of the generated intervention
|
||||
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_fichinter_rec ADD UNIQUE INDEX idx_fichinter_rec_uk_titre (titre, entity);
|
||||
ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_user_author (fk_user_author);
|
||||
ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_projet (fk_projet);
|
||||
ALTER TABLE llx_fichinter_rec ADD CONSTRAINT fk_fichinter_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_fichinter_rec ADD CONSTRAINT fk_fichinter_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||
|
||||
create table llx_fichinterdet_rec
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_fichinter integer NOT NULL,
|
||||
date datetime, -- date de la ligne d'intervention
|
||||
description text, -- description de la ligne d'intervention
|
||||
duree integer, -- duree de la ligne d'intervention
|
||||
rang integer DEFAULT 0, -- ordre affichage sur la fiche
|
||||
total_ht DOUBLE(24, 8) NULL DEFAULT NULL,
|
||||
subprice DOUBLE(24, 8) NULL DEFAULT NULL,
|
||||
fk_parent_line integer NULL DEFAULT NULL,
|
||||
fk_product integer NULL DEFAULT NULL,
|
||||
label varchar(255) NULL DEFAULT NULL,
|
||||
tva_tx DOUBLE(6, 3) NULL DEFAULT NULL,
|
||||
localtax1_tx DOUBLE(6, 3) NULL DEFAULT 0,
|
||||
localtax1_type VARCHAR(1) NULL DEFAULT NULL,
|
||||
localtax2_tx DOUBLE(6, 3) NULL DEFAULT 0,
|
||||
localtax2_type VARCHAR(1) NULL DEFAULT NULL,
|
||||
qty double NULL DEFAULT NULL,
|
||||
remise_percent double NULL DEFAULT 0,
|
||||
remise double NULL DEFAULT 0,
|
||||
fk_remise_except integer NULL DEFAULT NULL,
|
||||
price DOUBLE(24, 8) NULL DEFAULT NULL,
|
||||
total_tva DOUBLE(24, 8) NULL DEFAULT NULL,
|
||||
total_localtax1 DOUBLE(24, 8) NULL DEFAULT 0,
|
||||
total_localtax2 DOUBLE(24, 8) NULL DEFAULT 0,
|
||||
total_ttc DOUBLE(24, 8) NULL DEFAULT NULL,
|
||||
product_type INTEGER NULL DEFAULT 0,
|
||||
date_start datetime NULL DEFAULT NULL,
|
||||
date_end datetime NULL DEFAULT NULL,
|
||||
info_bits INTEGER NULL DEFAULT 0,
|
||||
buy_price_ht DOUBLE(24, 8) NULL DEFAULT 0,
|
||||
fk_product_fournisseur_price integer NULL DEFAULT NULL,
|
||||
fk_code_ventilation integer NOT NULL DEFAULT 0,
|
||||
fk_export_commpta integer NOT NULL DEFAULT 0,
|
||||
special_code integer UNSIGNED NULL DEFAULT 0,
|
||||
fk_unit integer NULL DEFAULT NULL,
|
||||
import_key varchar(14) NULL DEFAULT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL AFTER product_type;
|
||||
ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL AFTER date_start;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user