From 887c62d9c47f69863b6e89871fb972e8a5a1a8da Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:10:04 +0200 Subject: [PATCH 1/9] Add issue date --- htdocs/install/mysql/tables/llx_expedition.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 25d22b9bbf09f..90f41045cdd35 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -27,18 +27,18 @@ create table llx_expedition ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - fk_projet integer DEFAULT NULL, + fk_projet integer DEFAULT NULL, ref_ext varchar(255), -- reference into an external system (not used by dolibarr) ref_customer varchar(255), -- customer number - + datee date, -- issue date of expedition date_creation datetime, -- date of creation fk_user_author integer, -- author of creation fk_user_modif integer, -- author of last change date_valid datetime, -- date of validation fk_user_valid integer, -- user that validate date_delivery datetime DEFAULT NULL, -- date planned of delivery - date_expedition datetime, -- not used (deprecated) + date_expedition datetime, -- sending date fk_address integer DEFAULT NULL, -- delivery address (deprecated) fk_shipping_method integer, tracking_number varchar(50), From d15300763ad3960ddbc9a0d5ffdd625ff474b048 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:16:14 +0200 Subject: [PATCH 2/9] Add field fk_unit --- htdocs/install/mysql/tables/llx_expeditiondet.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_expeditiondet.sql b/htdocs/install/mysql/tables/llx_expeditiondet.sql index 3fdda0c344289..be3cd6163186e 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet.sql @@ -22,12 +22,13 @@ create table llx_expeditiondet ( rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_expedition integer NOT NULL, -- ID of parent object - fk_element integer, -- ID of main source object - fk_elementdet integer, -- ID of line of source object (proposal, sale order) + fk_expedition integer NOT NULL, -- ID of parent object + fk_element integer, -- ID of main source object + fk_elementdet integer, -- ID of line of source object (proposal, sale order) element_type varchar(50) DEFAULT 'commande' NOT NULL, -- Type of source object ('commande', ...) - fk_product integer, -- ID of product. If empy, you can retreive it using fk_element/element_type link - qty real, -- Quantity - fk_entrepot integer, -- Warehouse for departure of product + fk_product integer, -- ID of product. If empy, you can retreive it using fk_element/element_type link + qty real, -- Quantity + fk_unit integer, -- ID of unit code + fk_entrepot integer, -- Warehouse for departure of product rang integer DEFAULT 0 )ENGINE=innodb; From ce2c756b93e337f37f397715dae4d0313bd496e6 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:24:21 +0200 Subject: [PATCH 3/9] Add shipment contacts --- htdocs/install/mysql/data/llx_c_type_contact.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql index 07178dacdcd64..b7e649559e949 100644 --- a/htdocs/install/mysql/data/llx_c_type_contact.sql +++ b/htdocs/install/mysql/data/llx_c_type_contact.sql @@ -73,6 +73,11 @@ insert into llx_c_type_contact (element, source, code, libelle, active ) values insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1); insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1); +-- Shipment / Expedition +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Loading facility', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Delivery facility', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Customer shipping contact', 1); + -- Intervention / Fichinter insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1); insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERVENING', 'Intervenant', 1); From 535aeb1ca3395bf02c24267152b385fb7ddec11b Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:21:22 +0200 Subject: [PATCH 4/9] New Add is_delivery_note SQL part --- htdocs/install/mysql/tables/llx_facture.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 9e2f2ad1890c2..c2b8cb0391ed6 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -70,6 +70,7 @@ create table llx_facture pos_source varchar(32), -- numero of POS terminal when order is generated by a POS module, IDsession@IDwebsite when order is generated for a website basket. fk_fac_rec_source integer, -- facture rec source fk_facture_source integer, -- facture origin if credit notes or replacement invoice + is_delivery_note tinyint DEFAULT 0 NOT NULL, -- 0=false, 1=true fk_projet integer DEFAULT NULL, -- project invoice is linked to increment varchar(10), -- Numero of generation if generated from recurring template invoice From b193742f9f15480147297670489df9b8242d0fdc Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:23:13 +0200 Subject: [PATCH 5/9] New fields for e-shipment SQL part --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 64306ab171b81..10770f99cc0ca 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -319,3 +319,10 @@ ALTER TABLE llx_supplier_proposaldet ADD COLUMN multicurrency_subprice_ttc doubl ALTER TABLE llx_c_tva ADD COLUMN fk_department_buyer integer DEFAULT NULL AFTER fk_pays; ALTER TABLE llx_c_tva ADD INDEX idx_tva_fk_department_buyer (fk_department_buyer); ALTER TABLE llx_c_tva ADD CONSTRAINT fk_tva_fk_department_buyer FOREIGN KEY (fk_department_buyer) REFERENCES llx_c_departements (rowid); + +ALTER TABLE llx_expedition ADD COLUMN datee date AFTER ref_customer; +ALTER TABLE llx_expeditiondet ADD COLUMN fk_unit integer AFTER qty; +ALTER TABLE llx_facture ADD COLUMN is_delivery_note tinyint DEFAULT 0 NOT NULL AFTER fk_facture_source; +INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Loading facility', 1); +INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Delivery facility', 1); +INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Customer shipping contact', 1); From 31f40071c5733b892aa2fc706ed17e47ec294dda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Nov 2024 03:16:47 +0100 Subject: [PATCH 6/9] Update llx_facture.sql --- htdocs/install/mysql/tables/llx_facture.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index c2b8cb0391ed6..9e2f2ad1890c2 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -70,7 +70,6 @@ create table llx_facture pos_source varchar(32), -- numero of POS terminal when order is generated by a POS module, IDsession@IDwebsite when order is generated for a website basket. fk_fac_rec_source integer, -- facture rec source fk_facture_source integer, -- facture origin if credit notes or replacement invoice - is_delivery_note tinyint DEFAULT 0 NOT NULL, -- 0=false, 1=true fk_projet integer DEFAULT NULL, -- project invoice is linked to increment varchar(10), -- Numero of generation if generated from recurring template invoice From f423ccf2080d1c68e926deba808d091db5197d9f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Nov 2024 03:17:19 +0100 Subject: [PATCH 7/9] Update 20.0.0-21.0.0.sql --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 2fa46a28a3e71..524bb915f1448 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -322,7 +322,6 @@ ALTER TABLE llx_c_tva ADD CONSTRAINT fk_tva_fk_department_buyer FOREIGN KEY (fk_ ALTER TABLE llx_expedition ADD COLUMN datee date AFTER ref_customer; ALTER TABLE llx_expeditiondet ADD COLUMN fk_unit integer AFTER qty; -ALTER TABLE llx_facture ADD COLUMN is_delivery_note tinyint DEFAULT 0 NOT NULL AFTER fk_facture_source; INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Loading facility', 1); INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Delivery facility', 1); INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Customer shipping contact', 1); From 121f406aa3baf762d3353705702f7d0a275775ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Nov 2024 03:20:38 +0100 Subject: [PATCH 8/9] Update 20.0.0-21.0.0.sql --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 524bb915f1448..6cc7b0bfa76b8 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -320,7 +320,6 @@ ALTER TABLE llx_c_tva ADD COLUMN fk_department_buyer integer DEFAULT NULL AFTER ALTER TABLE llx_c_tva ADD INDEX idx_tva_fk_department_buyer (fk_department_buyer); ALTER TABLE llx_c_tva ADD CONSTRAINT fk_tva_fk_department_buyer FOREIGN KEY (fk_department_buyer) REFERENCES llx_c_departements (rowid); -ALTER TABLE llx_expedition ADD COLUMN datee date AFTER ref_customer; ALTER TABLE llx_expeditiondet ADD COLUMN fk_unit integer AFTER qty; INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Loading facility', 1); INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Delivery facility', 1); From ce73c44ece8c0c9c4b8a506a9bf3979935ddfae8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Nov 2024 03:22:28 +0100 Subject: [PATCH 9/9] Update llx_expedition.sql --- htdocs/install/mysql/tables/llx_expedition.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 90f41045cdd35..056be82861e16 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -31,7 +31,6 @@ create table llx_expedition ref_ext varchar(255), -- reference into an external system (not used by dolibarr) ref_customer varchar(255), -- customer number - datee date, -- issue date of expedition date_creation datetime, -- date of creation fk_user_author integer, -- author of creation fk_user_modif integer, -- author of last change