Merge master into feature-47784/Cleanup Tasks FHC4

This commit is contained in:
ma0068
2024-11-28 07:26:59 +01:00
401 changed files with 40365 additions and 5902 deletions
@@ -33,6 +33,23 @@ class Bismeldestichtag_model extends DB_Model
]);
}
/**
* Liefert nächstliegenden Bismeldestichtag.
* @return object success or error
*/
public function getNextMeldestichtag()
{
$this->addSelect('meldestichtag');
$this->addSelect('studiensemester_kurzbz');
$this->addOrder('meldestichtag', 'ASC');
$this->addLimit(1);
return $this->loadWhere([
'meldestichtag >= NOW()' => null
]);
}
/**
* Prüft, ob Meldestichtag für ein bestimmtes Statusdatum und Studiensemester erreicht ist.
*
+26 -1
View File
@@ -20,6 +20,31 @@ class Gemeinde_model extends DB_Model
return $this->loadWhere(array("plz" => $plz));
}
public function getGemeindeByNation($nation, $zip)
{
$this->addSelect(["name"]);
if ($nation == "A")
{
if (isset($zip) && $zip > 999 && $zip < 32000)
{
$gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]);
if (isError($gemeinde_res))
{
show_error("error while trying to query bis.tbl_gemeinde");
}
$gemeinde_res = hasData($gemeinde_res) ? getData($gemeinde_res) : null;
$gemeinde_res = array_map(function ($obj) {
return $obj->name;
}, $gemeinde_res);
echo json_encode($gemeinde_res);
} else {
echo json_encode(error("ortschaftskennziffer code was not valid"));
}
}
}
public function checkLocation($plz, $gemeinde, $ort)
{
$this->db->where('ortschaftsname', $ort);
@@ -28,4 +53,4 @@ class Gemeinde_model extends DB_Model
return (boolean)$this->db->count_all_results($this->dbTable);
}
}
}