More Contract stuff

This commit is contained in:
Frank Schubert
2022-12-01 22:41:44 +01:00
parent 5ccd74dc3c
commit 88dda09d66
19 changed files with 1014 additions and 186 deletions

View File

@@ -47,6 +47,14 @@ class ContractController extends mfBaseController {
private function getPreparedFilter($filter) {
$new_filter = [];
if(array_key_exists("show_canceled", $filter)) {
if($filter['show_canceled'] == 0) {
$new_filter['add-where'] = " AND (cancel_date IS NULL OR cancel_date > UNIX_TIMESTAMP())";
}
} else {
$new_filter['add-where'] = " AND (cancel_date IS NULL OR cancel_date > UNIX_TIMESTAMP())";
}
if(is_array($filter) && count($filter)) {
foreach($filter as $name => $value) {
$new_filter[$name] = $value;
@@ -198,7 +206,8 @@ class ContractController extends mfBaseController {
$this->layout()->setFlash("Vertrag erfolgreich gespeichert.", "success");
/* ContractLinks */
$query = [];
if($r->s) {