textaenderungen und getzutrittskarte by uid

This commit is contained in:
ma0048
2022-08-25 10:43:26 +02:00
parent 979f8d96bc
commit a13c010cd5
@@ -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);
}
}