2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 05:46:34 +00:00

Merge pull request #2020 from SchrodingersGat/mpn-sorting-fix

Mpn sorting fix
This commit is contained in:
Oliver
2021-08-26 22:06:06 +10:00
committed by GitHub
6 changed files with 144 additions and 24 deletions

View File

@ -921,8 +921,10 @@ function loadStockTable(table, options) {
return renderLink(text, link);
}
},
{
});
col = {
field: 'supplier_part',
title: '{% trans "Supplier Part" %}',
visible: params['supplier_part_detail'] || false,
@ -944,15 +946,25 @@ function loadStockTable(table, options) {
return renderLink(text, link);
}
});
};
if (!options.params.ordering) {
col.sortable = true;
col.sortName = 'SKU';
}
columns.push(col);
col = {
field: 'purchase_price_string',
title: '{% trans "Purchase Price" %}',
};
if (!options.params.ordering) {
col['sortable'] = true;
col.sortable = true;
col.sortName = 'purchase_price';
};
columns.push(col);
columns.push({