Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: prepare for e-shipment (SQL part) #31773

Merged
merged 14 commits into from
Nov 12, 2024
5 changes: 5 additions & 0 deletions htdocs/install/mysql/data/llx_c_type_contact.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions htdocs/install/mysql/migration/20.0.0-21.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 1 addition & 2 deletions htdocs/install/mysql/tables/llx_expedition.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions htdocs/install/mysql/tables/llx_expeditiondet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading