mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Use exact search for product filter on /stockjournal and /stockjournalsummary (fixes #1353)
This commit is contained in:
parent
5ba9bbbcd1
commit
cc9345136c
@ -15,10 +15,12 @@ $("#product-filter").on("change", function()
|
|||||||
var text = $("#product-filter option:selected").text();
|
var text = $("#product-filter option:selected").text();
|
||||||
if (value === "all")
|
if (value === "all")
|
||||||
{
|
{
|
||||||
text = "";
|
stockJournalTable.column(1).search("").draw();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stockJournalTable.column(1).search(">" + text + "<").draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
stockJournalTable.column(1).search(text).draw();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#transaction-type-filter").on("change", function()
|
$("#transaction-type-filter").on("change", function()
|
||||||
|
@ -15,10 +15,12 @@ $("#product-filter").on("change", function()
|
|||||||
var text = $("#product-filter option:selected").text();
|
var text = $("#product-filter option:selected").text();
|
||||||
if (value === "all")
|
if (value === "all")
|
||||||
{
|
{
|
||||||
text = "";
|
journalSummaryTable.column(1).search("").draw();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
journalSummaryTable.column(1).search("^" + text + "$", true, false).draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
journalSummaryTable.column(1).search(text).draw();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#transaction-type-filter").on("change", function()
|
$("#transaction-type-filter").on("change", function()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user