From 99427dcc16b0527a07a91c321328c21cedf62559 Mon Sep 17 00:00:00 2001 From: kkhelifa Date: Thu, 16 Mar 2023 16:50:26 +0100 Subject: [PATCH] NEW: Generate documents on product batch (SQL) --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_product_lot.sql | 2 ++ 2 files changed, 5 insertions(+) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index 1299e5f3a13..54d1d4cb33c 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -373,4 +373,7 @@ UPDATE llx_c_country SET numeric_code = '262' WHERE code_iso = 'DJI'; UPDATE llx_c_country SET numeric_code = '894' WHERE code_iso = 'ZMB'; UPDATE llx_c_country SET numeric_code = '716' WHERE code_iso = 'ZWE'; +-- Generate documents on product batch +ALTER TABLE llx_product_lot ADD COLUMN model_pdf varchar(255) AFTER scrapping_date; +ALTER TABLE llx_product_lot ADD COLUMN last_main_doc varchar(255) AFTER model_pdf; diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 4e6914884ac..03a1ebec09a 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -31,6 +31,8 @@ CREATE TABLE llx_product_lot ( scrapping_date datetime NULL, -- date when we decided to scrap all products of this lot barcode varchar(180) DEFAULT NULL, -- barcode fk_barcode_type integer DEFAULT NULL, -- barcode type + model_pdf varchar(255), + last_main_doc varchar(255), -- relative filepath+filename of last main generated document datec datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer,