Fix stock.js

This commit is contained in:
Oliver 2021-07-29 12:35:21 +10:00
parent 4381a16b0e
commit 7756c766c3
2 changed files with 5 additions and 7 deletions

View File

@ -66,7 +66,7 @@
},
{
success: function(response) {
var prefix = '{% settings_value "PURCHASEORDER_REFERENCE_PREFIX" %}';
var prefix = global_settings.PURCHASEORDER_REFERENCE_PREFIX;
for (var idx = 0; idx < response.length; idx++) {

View File

@ -702,8 +702,7 @@ function loadStockTable(table, options) {
name: 'stock',
original: original,
showColumns: true,
{% settings_value 'STOCK_GROUP_BY_PART' as group_by_part %}
{% if group_by_part %}
{% if False %}
groupByField: options.groupByField || 'part',
groupBy: grouping,
groupByFormatter: function(field, id, data) {
@ -1009,14 +1008,13 @@ function loadStockTable(table, options) {
title: '{% trans "Stocktake" %}',
sortable: true,
},
{% settings_value "STOCK_ENABLE_EXPIRY" as expiry %}
{% if expiry %}
{
field: 'expiry_date',
title: '{% trans "Expiry Date" %}',
sortable: true,
visible: global_settings.STOCK_ENABLE_EXPIRY,
switchable: global_settings.STOCK_ENABLE_EXPIRY,
},
{% endif %}
{
field: 'updated',
title: '{% trans "Last Updated" %}',
@ -1090,7 +1088,7 @@ function loadStockTable(table, options) {
var buttons = [
'#stock-print-options',
'#stock-options';
'#stock-options',
];
if (global_settings.BARCODE_ENABLE) {