Do an exact search for product group and location filters on the stock overview pages (fixes #778)

This commit is contained in:
Bernd Bestel
2020-08-24 17:57:43 +02:00
parent e039db22f5
commit 2c151fb4de
3 changed files with 11 additions and 5 deletions

View File

@@ -6,7 +6,8 @@
{ 'searchable': false, "targets": 0 },
{ 'searchable': false, "targets": 0 },
{ 'visible': false, 'targets': 5 },
{ 'visible': false, 'targets': 6 }
{ 'visible': false, 'targets': 6 },
{ 'visible': false, 'targets': 7 }
],
});
$('#stock-overview-table tbody').removeClass("d-none");
@@ -20,7 +21,7 @@ $("#location-filter").on("change", function()
value = "";
}
stockOverviewTable.column(5).search(value).draw();
stockOverviewTable.column(5).search("xx" + value + "xx", true, false, true).draw();
});
$("#product-group-filter").on("change", function()
@@ -30,8 +31,8 @@ $("#product-group-filter").on("change", function()
{
value = "";
}
stockOverviewTable.column(2).search(value).draw();
stockOverviewTable.column(7).search("xx" + value + "xx").draw();
});
$("#status-filter").on("change", function()