mirror of
https://github.com/grocy/grocy.git
synced 2025-10-15 01:37:13 +00:00
Optimized/clarified new "Hide product from stock overview" option (references #906)
This commit is contained in:
@@ -70,7 +70,7 @@ CREATE TABLE products (
|
||||
cumulate_min_stock_amount_of_sub_products TINYINT DEFAULT 0,
|
||||
due_type TINYINT NOT NULL DEFAULT 1 CHECK(due_type IN (1, 2)),
|
||||
quick_consume_amount REAL NOT NULL DEFAULT 1,
|
||||
show_on_stock_overview TINYINT NOT NULL DEFAULT 1 CHECK(show_on_stock_overview IN (0, 1)),
|
||||
hide_on_stock_overview TINYINT NOT NULL DEFAULT 0 CHECK(hide_on_stock_overview IN (0, 1)),
|
||||
row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime'))
|
||||
);
|
||||
|
||||
|
@@ -38,7 +38,7 @@ FROM (
|
||||
) sc
|
||||
LEFT JOIN products p
|
||||
ON sc.product_id = p.id
|
||||
WHERE p.show_on_stock_overview = 1;
|
||||
WHERE p.hide_on_stock_overview = 0;
|
||||
|
||||
CREATE VIEW uihelper_stock_current_overview
|
||||
AS
|
||||
@@ -80,4 +80,4 @@ FROM (
|
||||
) sc
|
||||
LEFT JOIN products p
|
||||
ON sc.product_id = p.id
|
||||
WHERE p.show_on_stock_overview = 1;
|
||||
WHERE p.hide_on_stock_overview = 0;
|
||||
|
@@ -44,7 +44,7 @@ LEFT JOIN products_last_purchased plp
|
||||
ON sc.product_id = plp.product_id
|
||||
LEFT JOIN products p
|
||||
ON sc.product_id = p.id
|
||||
WHERE p.show_on_stock_overview = 1;
|
||||
WHERE p.hide_on_stock_overview = 0;
|
||||
|
||||
DROP VIEW uihelper_stock_current_overview;
|
||||
CREATE VIEW uihelper_stock_current_overview
|
||||
@@ -92,4 +92,4 @@ LEFT JOIN products_last_purchased plp
|
||||
ON sc.product_id = plp.product_id
|
||||
LEFT JOIN products p
|
||||
ON sc.product_id = p.id
|
||||
WHERE p.show_on_stock_overview = 1;
|
||||
WHERE p.hide_on_stock_overview = 0;
|
||||
|
Reference in New Issue
Block a user