Keep filter after saving patching

This commit is contained in:
Frank Schubert
2021-09-23 21:14:42 +02:00
parent ba1c96c3f5
commit 8a9e29087a
4 changed files with 65 additions and 10 deletions

View File

@@ -89,7 +89,7 @@ class PatchingModel {
$where = self::getSqlFilter($filter);
$sql = "SELECT COUNT(Termination.id) as cnd FROM `Order`
$sql = "SELECT COUNT(Termination.id) as cnt FROM `Order`
LEFT JOIN OrderProduct ON (OrderProduct.order_id = `Order`.id)
LEFT JOIN Product ON (Product.id = OrderProduct.product_id)
LEFT JOIN Termination ON (Termination.id = OrderProduct.termination_id)
@@ -106,7 +106,7 @@ class PatchingModel {
GROUP BY Termination.id
ORDER BY Termination.id ASC LIMIT 1";
//mfLoghandler::singleton()->debug($sql);
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
if($db->num_rows($res)) {
@@ -118,7 +118,7 @@ class PatchingModel {
return 0;
}
public static function searchByTermination($filter = false) {
public static function searchByTermination($filter = false, $limit = false) {
$items = [];
$db = FronkDB::singleton();
@@ -163,7 +163,7 @@ class PatchingModel {
return $items;
}
public static function search($filter = false) {
public static function search($filter = false, $limit = false) {
$items = [];
$db = FronkDB::singleton();