mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-16 19:49:28 +00:00
Konten can be retrieved by Kostenstelle
This commit is contained in:
@@ -11,4 +11,20 @@ class Konto_model extends DB_Model
|
||||
$this->dbTable = 'wawi.tbl_konto';
|
||||
$this->pk = 'konto_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all Konten connected for a Kostenstelle
|
||||
* @param $kostenstelle_id
|
||||
* @return array
|
||||
*/
|
||||
public function getKontenForKostenstelle($kostenstelle_id)
|
||||
{
|
||||
$this->addJoin('wawi.tbl_konto_kostenstelle', 'konto_id');
|
||||
$konten = $this->loadWhere(array('kostenstelle_id' => $kostenstelle_id));
|
||||
|
||||
if ($konten->error)
|
||||
return error($konten->retval);
|
||||
|
||||
return $konten;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user