From d6494ae484db9879e96c9ef1692fef46cf1dc621 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 10 Aug 2022 17:35:39 +0200 Subject: [PATCH] NEW make sell or eat by mandatory in product lot (SQL) --- htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_product.sql | 1 + 2 files changed, 4 insertions(+) diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index e72fc1b8dcd..ea87bd858e0 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -77,3 +77,6 @@ ALTER TABLE llx_recruitment_recruitmentcandidature ADD email_date datetime after ALTER TABLE llx_ticket ADD email_date datetime after email_msgid; INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT', 1, 1000, 'int', 0); + +-- Make sell-by or eat-by date mandatory +ALTER TABLE llx_product ADD COLUMN sell_or_eat_by_mandatory tinyint DEFAULT 0 NOT NULL AFTER tobatch; diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 83e8882caa7..a234ae8ddb1 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -59,6 +59,7 @@ create table llx_product tobuy tinyint DEFAULT 1, -- Product you buy onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on) tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) + sell_or_eat_by_mandatory tinyint DEFAULT 0 NOT NULL, -- Make sell-by or eat-by date mandatory batch_mask varchar(32) DEFAULT NULL, -- If the product has batch feature, you may want to use a batch mask per product fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module) duration varchar(6),