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); 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 5d8523c0dac74..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,4 +320,9 @@ 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_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); +INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values ('expedition', 'external', 'SHIPPING', 'Customer shipping contact', 1); + ALTER TABLE llx_facture_rec ADD COLUMN fk_societe_rib integer DEFAULT NULL; diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 5743e9b454371..3c4cfb545f6ca 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -27,11 +27,10 @@ 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 - date_creation datetime, -- date of creation fk_user_author integer, -- author of creation fk_user_modif integer, -- author of last change 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;