mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for stock table
- Use the provided table name, rather than hard-coded value (cherry picked from commit b3a52dd6c65a83f2f330c0275b443e9acbcbdf73)
This commit is contained in:
parent
b92ec751ef
commit
535c36b75e
@ -665,6 +665,7 @@ function loadStockTable(table, options) {
|
||||
// List of user-params which override the default filters
|
||||
|
||||
options.params['location_detail'] = true;
|
||||
options.params['part_detail'] = true;
|
||||
|
||||
var params = options.params || {};
|
||||
|
||||
@ -1114,11 +1115,11 @@ function loadStockTable(table, options) {
|
||||
|
||||
|
||||
function stockAdjustment(action) {
|
||||
var items = $("#stock-table").bootstrapTable("getSelections");
|
||||
var items = $(table).bootstrapTable("getSelections");
|
||||
|
||||
adjustStock(action, items, {
|
||||
onSuccess: function() {
|
||||
$('#stock-table').bootstrapTable('refresh');
|
||||
$(table).bootstrapTable('refresh');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1126,7 +1127,7 @@ function loadStockTable(table, options) {
|
||||
// Automatically link button callbacks
|
||||
|
||||
$('#multi-item-print-label').click(function() {
|
||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||
var selections = $(table).bootstrapTable('getSelections');
|
||||
|
||||
var items = [];
|
||||
|
||||
@ -1138,7 +1139,7 @@ function loadStockTable(table, options) {
|
||||
});
|
||||
|
||||
$('#multi-item-print-test-report').click(function() {
|
||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||
var selections = $(table).bootstrapTable('getSelections');
|
||||
|
||||
var items = [];
|
||||
|
||||
@ -1151,7 +1152,7 @@ function loadStockTable(table, options) {
|
||||
|
||||
if (global_settings.BARCODE_ENABLE) {
|
||||
$('#multi-item-barcode-scan-into-location').click(function() {
|
||||
var selections = $('#stock-table').bootstrapTable('getSelections');
|
||||
var selections = $(table).bootstrapTable('getSelections');
|
||||
|
||||
var items = [];
|
||||
|
||||
@ -1180,7 +1181,7 @@ function loadStockTable(table, options) {
|
||||
});
|
||||
|
||||
$("#multi-item-order").click(function() {
|
||||
var selections = $("#stock-table").bootstrapTable("getSelections");
|
||||
var selections = $(table).bootstrapTable("getSelections");
|
||||
|
||||
var stock = [];
|
||||
|
||||
@ -1197,7 +1198,7 @@ function loadStockTable(table, options) {
|
||||
|
||||
$("#multi-item-set-status").click(function() {
|
||||
// Select and set the STATUS field for selected stock items
|
||||
var selections = $("#stock-table").bootstrapTable('getSelections');
|
||||
var selections = $(table).bootstrapTable('getSelections');
|
||||
|
||||
// Select stock status
|
||||
var modal = '#modal-form';
|
||||
@ -1277,13 +1278,13 @@ function loadStockTable(table, options) {
|
||||
});
|
||||
|
||||
$.when.apply($, requests).done(function() {
|
||||
$("#stock-table").bootstrapTable('refresh');
|
||||
$(table).bootstrapTable('refresh');
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$("#multi-item-delete").click(function() {
|
||||
var selections = $("#stock-table").bootstrapTable("getSelections");
|
||||
var selections = $(table).bootstrapTable("getSelections");
|
||||
|
||||
var stock = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user