From 9b086560cbf2b5033b7e9529e00810a5032185a6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 6 Jan 2021 12:09:48 +1100 Subject: [PATCH] Hide "expiry_date" column in Stock table if feature not enabled --- InvenTree/templates/js/stock.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index ef3ddef33c..d32f52f92b 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -1,4 +1,5 @@ {% load i18n %} +{% load inventree_extras %} {% load status_codes %} /* Stock API functions @@ -587,11 +588,14 @@ function loadStockTable(table, options) { return locationDetail(row); } }, + {% settings_value "STOCK_ENABLE_EXPIRY" as expiry %} + {% if expiry %} { field: 'expiry_date', title: '{% trans "Expiry Date" %}', sortable: true, }, + {% endif %} { field: 'notes', title: '{% trans "Notes" %}',