Merge branch 'fronkdev' into 'master'

Added product_name filter in Order/Index

See merge request fronk/thetool!1973
This commit is contained in:
Frank Schubert
2025-12-18 14:10:28 +00:00
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -112,6 +112,9 @@
<input type="text" class="form-control" name="filter[partner_number]" id="filter_partner_number" value="<?=$filter['partner_number'] ?? ''?>" />
</div>
</div>
<div class="row mt-1">
<div class="col-2">
<label class="form-label" for="filter_finish_date">Bestellstatus</label>
<select name="filter[finish_date]" id="filter_finish_date" class="form-control">
@@ -131,6 +134,11 @@
</select>
</div>
<div class="col-1">
<label class="form-label" for="filter_product_name">Produktname</label>
<input type="text" class="form-control" name="filter[product_name]" id="filter_product_name" value="<?=$filter['product_name'] ?? ''?>" />
</div>
</div>
<div class="row mt-2">
<div class="col">
+7
View File
@@ -359,6 +359,13 @@ class OrderModel {
}
}
if(array_key_exists("product_name", $filter)) {
$product_name = FronkDB::singleton()->escape($filter['product_name']);
if($product_name) {
$where .= " AND `Product`.name LIKE '%$product_name%'";
}
}
if(array_key_exists("product_id", $filter)) {
$product_id = $filter['product_id'];
if($product_id) {