WIP Contract/Billing 2024-06-20
This commit is contained in:
@@ -184,10 +184,6 @@ class ContractModel {
|
||||
return $contract;
|
||||
}
|
||||
|
||||
public function savePrecontract($contract) {
|
||||
|
||||
}
|
||||
|
||||
public static function getAll() {
|
||||
$items = [];
|
||||
|
||||
@@ -475,6 +471,13 @@ class ContractModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("finish_date", $filter)) {
|
||||
$finish_date = $filter['finish_date'];
|
||||
if(is_numeric($finish_date)) {
|
||||
$where .= " AND Contract.finish_date = $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("finish_date>", $filter)) {
|
||||
$finish_date = $filter['finish_date>'];
|
||||
if(is_numeric($finish_date)) {
|
||||
@@ -488,6 +491,20 @@ class ContractModel {
|
||||
$where .= " AND Contract.finish_date <= $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("cancel_date>", $filter)) {
|
||||
$cancel_date = $filter['cancel_date>'];
|
||||
if(is_numeric($cancel_date)) {
|
||||
$where .= " AND Contract.cancel_date >= $cancel_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("cancel_date<", $filter)) {
|
||||
$cancel_date = $filter['cancel_date<'];
|
||||
if(is_numeric($cancel_date)) {
|
||||
$where .= " AND Contract.cancel_date <= $cancel_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("add-where", $filter)) {
|
||||
$where .= " ".$filter['add-where'];
|
||||
|
||||
Reference in New Issue
Block a user