From ffb3823655d9d84ca023057e6c3a88e003efae51 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Sep 2017 23:38:03 +0200 Subject: [PATCH] Allow null in stock alert threshold to be compatible with #7162 --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_product.sql | 2 +- htdocs/langs/en_US/stocks.lang | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index 8900a07104a..0f32f1c731b 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -41,6 +41,9 @@ ALTER TABLE llx_website_page ADD COLUMN fk_user_modif integer; -- For 7.0 +ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte integer DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN seuil_stock_alerte SET DEFAULT NULL; + ALTER TABLE llx_facture_rec ADD COLUMN suspended integer DEFAULT 0; ALTER TABLE llx_facture_rec MODIFY COLUMN titre VARCHAR(100); diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 1769ec6bd3e..04267d22d3a 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -60,7 +60,7 @@ create table llx_product tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) 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), - seuil_stock_alerte integer DEFAULT 0, + seuil_stock_alerte integer DEFAULT NULL, url varchar(255), barcode varchar(255) DEFAULT NULL, -- barcode fk_barcode_type integer DEFAULT NULL, -- barcode type diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index f2115666a36..9525b43432d 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -71,7 +71,7 @@ NoPredefinedProductToDispatch=No predefined products for this object. So no disp DispatchVerb=Dispatch StockLimitShort=Limit for alert StockLimit=Stock limit for alert -StockLimitDesc="" (empty) default value means no alert.
"0" can be used with 'Stock can be negative' configuration. +StockLimitDesc=(empty) means no warning.
0 can be used for a warning as soon as stock is empty. PhysicalStock=Physical stock RealStock=Real Stock RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.