Fixed Pagination count in Patching

This commit is contained in:
Frank Schubert
2021-11-02 21:28:19 +01:00
parent fb61f41004
commit 42f4da3799
2 changed files with 4 additions and 4 deletions

View File

@@ -77,6 +77,7 @@ class PatchingController extends mfBaseController {
}
}
//var_dump($terms_search);exit;
$pagination['maxItems'] = PatchingModel::searchByTerminationCount($terms_search);
foreach(PatchingModel::searchByTermination($terms_search, $pagination) as $t) {
if(!array_key_exists($t->id, $terms)) {
@@ -84,8 +85,8 @@ class PatchingController extends mfBaseController {
}
}
//var_dump($buildings);exit;
$this->layout()->set("terminations", $terms);
//var_dump($pagination);exit;
//$this->layout()->set("terminations", $terms);
$this->layout()->set("pagination", $pagination);
//var_dump($pagination);exit;
$terminations = [];
@@ -95,7 +96,7 @@ class PatchingController extends mfBaseController {
}
$this->layout()->set("terminations", $terms);
$this->layout()->set("terminations", $terminations);
}

View File

@@ -140,7 +140,6 @@ class PatchingModel {
AND Workflowvalue.object_id = OrderProduct.termination_id
AND Workflowvalue.value_int = 1
AND $where
GROUP BY Termination.id
ORDER BY Termination.id ASC LIMIT 1";
mfLoghandler::singleton()->debug($sql);