Merge branch 'master' into feature-25999/C4_cleanup

This commit is contained in:
SimonGschnell
2025-01-08 11:17:29 +01:00
30 changed files with 1750 additions and 33 deletions
@@ -0,0 +1,14 @@
<?php
class LehrveranstaltungFaktor_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_lehrveranstaltung_faktor';
$this->pk = 'lehrveranstaltung_faktor_id';
}
}
+1 -1
View File
@@ -142,7 +142,7 @@ class Notiz_model extends DB_Model
$this->addSelect('public.tbl_notiz.*');
$this->addJoin('public.tbl_notizzuordnung', 'notiz_id');
return $this->loadWhere(array('person_id' => $person_id));
return $this->loadWhere(array('person_id' => $person_id, 'tbl_notiz.typ' => NULL));
}
/**
@@ -0,0 +1,22 @@
<?php
class Projects_Employees_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'sync.tbl_projects_employees';
$this->pk = 'projects_employees_id';
}
public function deleteByProjectTaskId($ids)
{
$qry = "DELETE FROM " . $this->dbTable . "
WHERE project_task_id IN ?";
return $this->execQuery($qry, array($ids));
}
}
@@ -13,5 +13,33 @@ class Stundensatz_model extends DB_Model
$this->pk = 'stundensatz_id';
$this->hasSequence = true;
}
public function getStundensatzByDatum($uid, $beginn, $ende = null, $typ = null)
{
$qry = "SELECT
*
FROM
hr.tbl_stundensatz
WHERE
uid = ?
AND (gueltig_bis >= ? OR gueltig_bis is null)";
$params = array($uid, $beginn);
if (!is_null($ende))
{
$qry .= " AND (gueltig_von <= ?)";
$params[] = $ende;
}
if (!is_null($typ))
{
$qry .= " AND stundensatztyp = ?";
$params[] = $typ;
}
$qry .= " ORDER BY gueltig_bis DESC NULLS FIRST, gueltig_von DESC NULLS LAST LIMIT 1;";
return $this->execQuery($qry, $params);
}
}
@@ -0,0 +1,14 @@
<?php
class Notiztyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_notiz_typ';
$this->pk = 'typ_kurzbz';
}
}