mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Merge branch 'master' into feature-25999/C4_cleanup
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user