Hide "expiry_date" column in Stock table if feature not enabled

This commit is contained in:
Oliver Walters 2021-01-06 12:09:48 +11:00
parent d0fb69e67d
commit 9b086560cb

View File

@ -1,4 +1,5 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %}
{% load status_codes %} {% load status_codes %}
/* Stock API functions /* Stock API functions
@ -587,11 +588,14 @@ function loadStockTable(table, options) {
return locationDetail(row); return locationDetail(row);
} }
}, },
{% settings_value "STOCK_ENABLE_EXPIRY" as expiry %}
{% if expiry %}
{ {
field: 'expiry_date', field: 'expiry_date',
title: '{% trans "Expiry Date" %}', title: '{% trans "Expiry Date" %}',
sortable: true, sortable: true,
}, },
{% endif %}
{ {
field: 'notes', field: 'notes',
title: '{% trans "Notes" %}', title: '{% trans "Notes" %}',