From e81dcb6060e57414d1c695cb0fb53b93701094e3 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 19 May 2019 21:26:49 +0200 Subject: [PATCH] WIP Update database --- .../mysql/data/llx_c_transport_mode.sql | 31 +++++++++++++++++++ .../install/mysql/migration/9.0.0-10.0.0.sql | 19 ++++++++++++ .../mysql/tables/llx_c_transport_mode.sql | 25 +++++++++++++++ htdocs/install/mysql/tables/llx_facture.sql | 2 ++ .../mysql/tables/llx_facture_fourn.sql | 3 ++ 5 files changed, 80 insertions(+) create mode 100644 htdocs/install/mysql/data/llx_c_transport_mode.sql create mode 100644 htdocs/install/mysql/tables/llx_c_transport_mode.sql diff --git a/htdocs/install/mysql/data/llx_c_transport_mode.sql b/htdocs/install/mysql/data/llx_c_transport_mode.sql new file mode 100644 index 00000000000..98be83ee6ce --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_transport_mode.sql @@ -0,0 +1,31 @@ +-- Copyright (C) 2019 Open-DSI +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- + +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + + +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('ROU', 'Transport par route', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('AIR', 'Transport par air', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('POS', 'Envois postaux', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('NAV', 'Transport par navigation intérieure', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('PRO', 'Propulsion propre', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 035cd0d48c5..c30c8e80dd9 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -376,3 +376,22 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); ALTER TABLE llx_ticket_extrafields ADD INDEX idx_ticket_extrafields (fk_object); + +CREATE TABLE llx_c_transport_mode ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(3) NOT NULL, + libelle varchar(255) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +) ENGINE=innodb; + +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('ROU', 'Transport par route', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('AIR', 'Transport par air', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('POS', 'Envois postaux', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('NAV', 'Transport par navigation intérieure', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('PRO', 'Propulsion propre', 1); + +ALTER TABLE llx_facture ADD COLUMN fk_mode_transport integer after location_incoterms; +ALTER TABLE llx_facture_fourn ADD COLUMN fk_mode_transport integer after location_incoterms; diff --git a/htdocs/install/mysql/tables/llx_c_transport_mode.sql b/htdocs/install/mysql/tables/llx_c_transport_mode.sql new file mode 100644 index 00000000000..0528a36a415 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_transport_mode.sql @@ -0,0 +1,25 @@ +-- ======================================================================== +-- Copyright (C) 2019 Open-DSI +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +CREATE TABLE llx_c_transport_mode ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(3) NOT NULL, + libelle varchar(255) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 8e9ceb48d04..c8b716d99a2 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -84,6 +84,8 @@ create table llx_facture fk_incoterms integer, -- for incoterms location_incoterms varchar(255), -- for incoterms + fk_mode_transport integer, -- for intracomm report + situation_cycle_ref smallint, -- situation cycle reference situation_counter smallint, -- situation counter situation_final smallint, -- is the situation final ? diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 36ee0a69f18..0f116443b6d 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -70,6 +70,9 @@ create table llx_facture_fourn note_public text, fk_incoterms integer, -- for incoterms location_incoterms varchar(255), -- for incoterms + + fk_mode_transport integer, -- for intracomm report + model_pdf varchar(255), last_main_doc varchar(255), -- relative filepath+filename of last main generated document