Merge branch 'fronkdev'

This commit is contained in:
Frank Schubert
2024-01-23 17:36:39 +01:00
11 changed files with 647 additions and 19 deletions
+9 -1
View File
@@ -77,12 +77,20 @@ class AddressController extends mfBaseController {
$new_filter = [];
if(is_array($filter) && count($filter)) {
$new_filter['add-where'] = "";
if(array_key_exists("kunde", $filter) && $filter["kunde"]) {
$kunde = $this->db()->escape($filter['kunde']);
$new_filter['add-where'] .= " AND (company like '%$kunde%' OR firstname like '%$kunde%' OR lastname like '%$kunde%' OR concat(firstname, ' ', lastname) like '%$kunde%' OR concat(lastname, ' ', firstname) like '%$kunde%')";
}
if(!array_key_exists("parents_only", $filter)) {
$new_filter["parents_only"] = 1;
}
if(array_key_exists("fibu_account_number", $filter) && $filter['fibu_account_number']) {
$new_filter['fibu_account_number'] = $filter['fibu_account_number']."%";
$new_filter['fibu_or_supplier_account_number'] = $filter['fibu_account_number']."%";
unset($filter['fibu_account_number']);
}
+12
View File
@@ -263,6 +263,13 @@ class AddressModel {
}
}
if(array_key_exists("fibu_or_supplier_account_number", $filter)) {
$fsn = $filter["fibu_or_supplier_account_number"];
if($fsn) {
$where .= " AND (fibu_account_number LIKE '$fsn' OR fibu_supplier_number LIKE '$fsn')";
}
}
if(array_key_exists("fibu_primary_account", $filter)) {
$fpa = $filter["fibu_primary_account"];
if($fpa) {
@@ -431,6 +438,11 @@ class AddressModel {
}
}
// custom where clause
if(array_key_exists("add-where", $filter)) {
$where .= " ".$filter['add-where'];
}
//var_dump($filter, $where);exit;
return $where;
}
+4
View File
@@ -108,6 +108,10 @@ class ContractModel {
return $contract;
}
public function savePrecontract($contract) {
}
public static function getAll() {
$items = [];
@@ -0,0 +1,8 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/