From 72beb3b7d6a8f24361c62fe4a7ab698fa82840cd Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 13:06:45 +0100 Subject: [PATCH 1/9] NEW: add table to store product relation with thirdparty --- .../install/mysql/migration/18.0.0-19.0.0.sql | 30 +++++++++++++ ...llx_c_product_thirdparty_relation_type.sql | 28 +++++++++++++ .../mysql/tables/llx_product_thirdparty.sql | 42 +++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql create mode 100644 htdocs/install/mysql/tables/llx_product_thirdparty.sql diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 4a6f4c0325c..7e27146f912 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -203,3 +203,33 @@ ALTER TABLE llx_expensereport DROP INDEX idx_expensereport_fk_refuse, ADD INDEX INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (1,'66','Société publique locale'); ALTER TABLE llx_prelevement_lignes ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + + +CREATE TABLE llx_product_thirdparty( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, + date_start datetime, + date_end datetime, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer DEFAULT 1 NOT NULL +) ENGINE=innodb; + + +CREATE TABLE llx_c_product_thirdparty_relation_type( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + code varchar(24) NOT NULL, + label varchar(128), + active tinyint default 1 NOT NULL +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql new file mode 100644 index 00000000000..c379bdf040b --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql @@ -0,0 +1,28 @@ +-- ============================================================================ +-- Copyright (C) 2002-2006 Rodolphe Quiedeville +-- Copyright (C) 2008-2017 Laurent Destailleur +-- Copyright (C) 2005-2010 Regis Houssin +-- Copyright (C) 2023 Florian HENRY + +-- +-- 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_product_thirdparty_relation_type( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + code varchar(24) NOT NULL, + label varchar(128), + active tinyint default 1 NOT NULL +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_thirdparty.sql b/htdocs/install/mysql/tables/llx_product_thirdparty.sql new file mode 100644 index 00000000000..a08f20fb8cc --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_thirdparty.sql @@ -0,0 +1,42 @@ +-- ============================================================================ +-- Copyright (C) 2002-2006 Rodolphe Quiedeville +-- Copyright (C) 2008-2017 Laurent Destailleur +-- Copyright (C) 2005-2010 Regis Houssin +-- Copyright (C) 2023 Florian HENRY + +-- +-- 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_product_thirdparty( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, + date_start datetime, + date_end datetime, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer DEFAULT 1 NOT NULL +) ENGINE=innodb; From 6d0ca0be81b5bbd6a1761aa965a01b231cf7344f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 13:09:43 +0100 Subject: [PATCH 2/9] NEW: add table to store product relation with thirdparty --- .../mysql/tables/llx_c_product_thirdparty_relation_type.sql | 2 +- htdocs/install/mysql/tables/llx_product_thirdparty.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql index c379bdf040b..59d95a4ba85 100644 --- a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql +++ b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2002-2006 Rodolphe Quiedeville -- Copyright (C) 2008-2017 Laurent Destailleur -- Copyright (C) 2005-2010 Regis Houssin --- Copyright (C) 2023 Florian HENRY +-- Copyright (C) 2023 Florian Henry -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_product_thirdparty.sql b/htdocs/install/mysql/tables/llx_product_thirdparty.sql index a08f20fb8cc..19e095e1c9f 100644 --- a/htdocs/install/mysql/tables/llx_product_thirdparty.sql +++ b/htdocs/install/mysql/tables/llx_product_thirdparty.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2002-2006 Rodolphe Quiedeville -- Copyright (C) 2008-2017 Laurent Destailleur -- Copyright (C) 2005-2010 Regis Houssin --- Copyright (C) 2023 Florian HENRY +-- Copyright (C) 2023 Florian Henry -- -- This program is free software; you can redistribute it and/or modify From 381cb6982cfa296caaa9375a999d65eec73b0a23 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 13:10:23 +0100 Subject: [PATCH 3/9] NEW: add table to store product relation with thirdparty --- ...llx_c_product_thirdparty_relation_type.sql | 13 +++--- .../mysql/tables/llx_product_thirdparty.sql | 41 ++++++++++--------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql index 59d95a4ba85..c0c0c98a633 100644 --- a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql +++ b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql @@ -20,9 +20,10 @@ -- -- ============================================================================ -CREATE TABLE llx_c_product_thirdparty_relation_type( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - code varchar(24) NOT NULL, - label varchar(128), - active tinyint default 1 NOT NULL -) ENGINE=innodb; +CREATE TABLE llx_c_product_thirdparty_relation_type +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + code varchar(24) NOT NULL, + label varchar(128), + active tinyint default 1 NOT NULL +) ENGINE = innodb; diff --git a/htdocs/install/mysql/tables/llx_product_thirdparty.sql b/htdocs/install/mysql/tables/llx_product_thirdparty.sql index 19e095e1c9f..5847dd00879 100644 --- a/htdocs/install/mysql/tables/llx_product_thirdparty.sql +++ b/htdocs/install/mysql/tables/llx_product_thirdparty.sql @@ -20,23 +20,24 @@ -- -- ============================================================================ -CREATE TABLE llx_product_thirdparty( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_product integer NOT NULL, - fk_soc integer NOT NULL, - fk_product_thirdparty_relation_type integer NOT NULL, - date_start datetime, - date_end datetime, - fk_project integer, - description text, - note_public text, - note_private text, - date_creation datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, - fk_user_modif integer, - last_main_doc varchar(255), - import_key varchar(14), - model_pdf varchar(255), - status integer DEFAULT 1 NOT NULL -) ENGINE=innodb; +CREATE TABLE llx_product_thirdparty +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, + date_start datetime, + date_end datetime, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer DEFAULT 1 NOT NULL +) ENGINE = innodb; From 1a499172f572ae2d7eaf89f5913a46ecc6b7bc75 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 13:10:50 +0100 Subject: [PATCH 4/9] NEW: add table to store product relation with thirdparty --- .../install/mysql/migration/18.0.0-19.0.0.sql | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 7e27146f912..5fa7458c253 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -205,31 +205,33 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (1,'66','Soci ALTER TABLE llx_prelevement_lignes ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -CREATE TABLE llx_product_thirdparty( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_product integer NOT NULL, - fk_soc integer NOT NULL, - fk_product_thirdparty_relation_type integer NOT NULL, - date_start datetime, - date_end datetime, - fk_project integer, - description text, - note_public text, - note_private text, - date_creation datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, - fk_user_modif integer, - last_main_doc varchar(255), - import_key varchar(14), - model_pdf varchar(255), - status integer DEFAULT 1 NOT NULL -) ENGINE=innodb; +CREATE TABLE llx_product_thirdparty +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, + date_start datetime, + date_end datetime, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer DEFAULT 1 NOT NULL +) ENGINE = innodb; -CREATE TABLE llx_c_product_thirdparty_relation_type( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - code varchar(24) NOT NULL, - label varchar(128), - active tinyint default 1 NOT NULL -) ENGINE=innodb; +CREATE TABLE llx_c_product_thirdparty_relation_type +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + code varchar(24) NOT NULL, + label varchar(128), + active tinyint default 1 NOT NULL +) ENGINE = innodb; From bb4d33a4549932a3bc01f1de1a53bf29d9376acc Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 13:12:03 +0100 Subject: [PATCH 5/9] NEW: add table to store product relation with thirdparty --- .../install/mysql/migration/18.0.0-19.0.0.sql | 17 ++++++++--------- .../llx_c_product_thirdparty_relation_type.sql | 4 ++-- .../mysql/tables/llx_product_thirdparty.sql | 12 ++++++------ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 5fa7458c253..2db6f4b73a8 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -204,34 +204,33 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (1,'66','Soci ALTER TABLE llx_prelevement_lignes ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; - CREATE TABLE llx_product_thirdparty ( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_product integer NOT NULL, - fk_soc integer NOT NULL, - fk_product_thirdparty_relation_type integer NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, date_start datetime, date_end datetime, fk_project integer, description text, note_public text, note_private text, - date_creation datetime NOT NULL, + date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, + fk_user_creat integer NOT NULL, fk_user_modif integer, last_main_doc varchar(255), import_key varchar(14), model_pdf varchar(255), - status integer DEFAULT 1 NOT NULL + status integer DEFAULT 1 NOT NULL ) ENGINE = innodb; CREATE TABLE llx_c_product_thirdparty_relation_type ( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - code varchar(24) NOT NULL, + code varchar(24) NOT NULL, label varchar(128), - active tinyint default 1 NOT NULL + active tinyint default 1 NOT NULL ) ENGINE = innodb; diff --git a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql index c0c0c98a633..88df28f60de 100644 --- a/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql +++ b/htdocs/install/mysql/tables/llx_c_product_thirdparty_relation_type.sql @@ -23,7 +23,7 @@ CREATE TABLE llx_c_product_thirdparty_relation_type ( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - code varchar(24) NOT NULL, + code varchar(24) NOT NULL, label varchar(128), - active tinyint default 1 NOT NULL + active tinyint default 1 NOT NULL ) ENGINE = innodb; diff --git a/htdocs/install/mysql/tables/llx_product_thirdparty.sql b/htdocs/install/mysql/tables/llx_product_thirdparty.sql index 5847dd00879..4af00bcf447 100644 --- a/htdocs/install/mysql/tables/llx_product_thirdparty.sql +++ b/htdocs/install/mysql/tables/llx_product_thirdparty.sql @@ -23,21 +23,21 @@ CREATE TABLE llx_product_thirdparty ( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_product integer NOT NULL, - fk_soc integer NOT NULL, - fk_product_thirdparty_relation_type integer NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, date_start datetime, date_end datetime, fk_project integer, description text, note_public text, note_private text, - date_creation datetime NOT NULL, + date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, + fk_user_creat integer NOT NULL, fk_user_modif integer, last_main_doc varchar(255), import_key varchar(14), model_pdf varchar(255), - status integer DEFAULT 1 NOT NULL + status integer DEFAULT 1 NOT NULL ) ENGINE = innodb; From 353876c00369e9a09be57bd2cb60c78f7508ed96 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 8 Jan 2024 15:00:56 +0100 Subject: [PATCH 6/9] NEW fetch object by element for website account card --- htdocs/core/lib/functions.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index eeb18c303eb..739b99906d0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -12158,6 +12158,8 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '') // extrafield for a service, it is not supported and not found when editing the product/service card. So we must keep 'product' for extrafields // of service and we will return properties of a product. $ismodenabled = (isModEnabled('product') || isModEnabled('service')); + } elseif ($element_prop['module'] == 'societeaccount') { + $ismodenabled = isModEnabled('website') || isModEnabled('webportal'); } else { $ismodenabled = isModEnabled($element_prop['module']); } From d25bf714d2673ce4c215c201494929a14d5cc3bd Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 8 Jan 2024 18:29:56 +0100 Subject: [PATCH 7/9] Fix: colorseries is already a simple array (fix phan notice) #Fix: colorseries is already a simple array (fix phan notice) This is reported by phan as a conversion to a list of an array that already is a list. --- htdocs/core/boxes/box_graph_new_vs_close_ticket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php index 9ece33a9a56..831a8aa1280 100644 --- a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php +++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php @@ -133,7 +133,7 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); if (!$mesg) { - $px1->SetDataColor(array_values($colorseries)); + $px1->SetDataColor($colorseries); $px1->SetData($data); $px1->setShowLegend(2); if (!empty($conf->dol_optimize_smallscreen)) { From 4268f3e27fea589892e5f7ede5545d305c492ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 8 Jan 2024 18:34:32 +0100 Subject: [PATCH 8/9] fix incorrect default value --- htdocs/resource/class/dolresource.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 142fbf6eae9..2783a366405 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -509,7 +509,7 @@ class Dolresource extends CommonObject * @param array $filter filter output * @return int Return integer <0 if KO, Number of lines loaded if OK */ - public function fetchAll($sortorder, $sortfield, $limit, $offset, $filter = '') + public function fetchAll($sortorder, $sortfield, $limit, $offset, $filter = []) { // phpcs:enable require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; From a6adeade5895e12fd795566aae9f6504a079a379 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 8 Jan 2024 21:15:57 +0100 Subject: [PATCH 9/9] reveiw --- .../install/mysql/migration/18.0.0-19.0.0.sql | 31 ------------------- .../install/mysql/migration/19.0.0-20.0.0.sql | 29 +++++++++++++++++ 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 2db6f4b73a8..4a6f4c0325c 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -203,34 +203,3 @@ ALTER TABLE llx_expensereport DROP INDEX idx_expensereport_fk_refuse, ADD INDEX INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (1,'66','Société publique locale'); ALTER TABLE llx_prelevement_lignes ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; - -CREATE TABLE llx_product_thirdparty -( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_product integer NOT NULL, - fk_soc integer NOT NULL, - fk_product_thirdparty_relation_type integer NOT NULL, - date_start datetime, - date_end datetime, - fk_project integer, - description text, - note_public text, - note_private text, - date_creation datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, - fk_user_modif integer, - last_main_doc varchar(255), - import_key varchar(14), - model_pdf varchar(255), - status integer DEFAULT 1 NOT NULL -) ENGINE = innodb; - - -CREATE TABLE llx_c_product_thirdparty_relation_type -( - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - code varchar(24) NOT NULL, - label varchar(128), - active tinyint default 1 NOT NULL -) ENGINE = innodb; diff --git a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql index e7d7c2b6baf..efbd730b5e5 100644 --- a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql +++ b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql @@ -161,4 +161,33 @@ ALTER TABLE llx_usergroup_extrafields ADD UNIQUE INDEX uk_usergroup_extrafields UPDATE llx_categorie SET date_creation = tms, tms = tms WHERE date_creation IS NULL AND tms IS NOT NULL; +CREATE TABLE llx_product_thirdparty +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + fk_product integer NOT NULL, + fk_soc integer NOT NULL, + fk_product_thirdparty_relation_type integer NOT NULL, + date_start datetime, + date_end datetime, + fk_project integer, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status integer DEFAULT 1 NOT NULL +) ENGINE = innodb; + +CREATE TABLE llx_c_product_thirdparty_relation_type +( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + code varchar(24) NOT NULL, + label varchar(128), + active tinyint default 1 NOT NULL +) ENGINE = innodb;