mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
textaenderungen und getzutrittskarte by uid
This commit is contained in:
@@ -72,4 +72,28 @@ class Betriebsmittelperson_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function getBetriebsmittelByUid($uid, $betriebsmitteltyp = null, $isRetourniert = false)
|
||||
{
|
||||
$this->addJoin('wawi.tbl_betriebsmittel', 'betriebsmittel_id');
|
||||
|
||||
$condition = ' wawi.tbl_betriebsmittelperson.uid = '. $this->escape($uid);
|
||||
|
||||
if (is_string($betriebsmitteltyp))
|
||||
{
|
||||
$condition .= ' AND betriebsmitteltyp = ' . $this->escape($betriebsmitteltyp);
|
||||
}
|
||||
|
||||
if ($isRetourniert === true) {
|
||||
$condition .= ' AND retouram IS NOT NULL';
|
||||
}
|
||||
elseif ($isRetourniert === false)
|
||||
{
|
||||
$condition .= ' AND retouram IS NULL';
|
||||
}
|
||||
|
||||
$this->addOrder('ausgegebenam', 'DESC');
|
||||
|
||||
return $this->loadWhere($condition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user