Files
Paolo 4e6fc7c607 - Create new function getError in helper hlp_return_object_helper that should just returns retval
- Replace all show_error(getData( with show_error(getError(
- Replace all error($...->retval) with error(getError($...))
- Replace all ->outputJsonError(getData( with ->outputJsonError(getError(
- Replace all show_error($...->retval with show_error(getError($...
- Replace all outputJsonError($...->retval with outputJsonError(getError$...
- Replace all return error($...->retval) with return $...
2019-12-18 18:35:19 +01:00

30 lines
564 B
PHP

<?php
class Konto_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$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 $konten;
return $konten;
}
}