Fixed products page product group filter to use an exact search instead of contains (fixes #2570)

This commit is contained in:
Bernd Bestel 2024-08-24 10:49:19 +02:00
parent c21090f522
commit 434525826e
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,7 @@
- If the lookup was successful, the product edit page of the created product is displayed, where the product setup can be completed (if required)
- After that, the transaction is continued with that product
- Fixed that when copying a product, the field "Treat opened as out of stock" wasn't copied along (thanks @TheDodger)
- Fixed that the product groups filter on the master data products page used a contains search instead of an exact search
### Shopping list

View File

@ -27,10 +27,13 @@ $("#product-group-filter").on("change", function()
var value = $("#product-group-filter option:selected").text();
if (value === __t("All"))
{
value = "";
productsTable.column(productsTable.colReorder.transpose(6)).search("").draw();
}
else
{
productsTable.column(productsTable.colReorder.transpose(6)).search("^" + value + "\$", true, false).draw();
}
productsTable.column(productsTable.colReorder.transpose(6)).search(value).draw();
});
$("#clear-filter-button").on("click", function()