Konten can be retrieved by Kostenstelle

This commit is contained in:
alex
2018-04-11 10:54:17 +02:00
parent 161d814472
commit 0da929dd4f
@@ -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;
}
}