mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
Documents first draft
This commit is contained in:
@@ -123,4 +123,33 @@ class Konto_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $prestudent_id
|
||||
* @param string $stsem
|
||||
* @param array $buchungstypen
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function checkStudienbeitragFromPrestudent($prestudent_id, $stsem, $buchungstypen)
|
||||
{
|
||||
$this->addSelect($this->dbTable . '.buchungsnr');
|
||||
$this->addSelect($this->dbTable . '.buchungsdatum');
|
||||
|
||||
$this->addJoin('public.tbl_prestudent s', $this->dbTable . '.person_id=s.person_id AND ' . $this->dbTable . '.studiengang_kz=s.studiengang_kz');
|
||||
|
||||
$this->db->where_in('buchungstyp_kurzbz', $buchungstypen);
|
||||
$this->db->where('0 >= (
|
||||
SELECT sum(betrag)
|
||||
FROM ' . $this->dbTable . ' skonto
|
||||
WHERE skonto.buchungsnr = ' . $this->dbTable . '.buchungsnr_verweis
|
||||
OR skonto.buchungsnr_verweis = ' . $this->dbTable . '.buchungsnr_verweis
|
||||
)', null, false);
|
||||
|
||||
return $this->loadWhere([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studiensemester_kurzbz' => $stsem
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,77 @@ class Prestudentstatus_model extends DB_Model
|
||||
$this->hasSequence = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* loadWhereUid
|
||||
*
|
||||
* loads all rows for a student_uid
|
||||
*
|
||||
* @param string $uid
|
||||
* @param array $where Optional. Default empty array
|
||||
* @param boolean $withPrestudent Optional. Default true
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function loadWhereUid($uid, $where = null, $withPrestudent = false)
|
||||
{
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
$this->addJoin('public.tbl_student', 'prestudent_id');
|
||||
|
||||
if ($withPrestudent) {
|
||||
$this->addJoin('public.tbl_prestudent s', 'prestudent_id');
|
||||
$this->addSelect('s.aufmerksamdurch_kurzbz');
|
||||
$this->addSelect('s.person_id');
|
||||
$this->addSelect('s.studiengang_kz');
|
||||
$this->addSelect('s.berufstaetigkeit_code');
|
||||
$this->addSelect('s.ausbildungcode');
|
||||
$this->addSelect('s.zgv_code');
|
||||
$this->addSelect('s.zgvort');
|
||||
$this->addSelect('s.zgvdatum');
|
||||
$this->addSelect('s.zgvmas_code');
|
||||
$this->addSelect('s.zgvmaort');
|
||||
$this->addSelect('s.zgvmadatum');
|
||||
$this->addSelect('s.aufnahmeschluessel');
|
||||
$this->addSelect('s.facheinschlberuf');
|
||||
$this->addSelect('s.reihungstest_id');
|
||||
$this->addSelect('s.anmeldungreihungstest');
|
||||
$this->addSelect('s.reihungstestangetreten');
|
||||
$this->addSelect('s.rt_gesamtpunkte');
|
||||
$this->addSelect('s.bismelden');
|
||||
$this->addSelect('s.dual');
|
||||
$this->addSelect('s.rt_punkte1');
|
||||
$this->addSelect('s.rt_punkte2');
|
||||
$this->addSelect('s.ausstellungsstaat');
|
||||
$this->addSelect('s.rt_punkte3');
|
||||
$this->addSelect('s.zgvdoktor_code');
|
||||
$this->addSelect('s.zgvdoktorort');
|
||||
$this->addSelect('s.zgvdoktordatum');
|
||||
$this->addSelect('s.mentor');
|
||||
$this->addSelect('s.zgvnation');
|
||||
$this->addSelect('s.zgvmanation');
|
||||
$this->addSelect('s.zgvdoktornation');
|
||||
$this->addSelect('s.gsstudientyp_kurzbz');
|
||||
$this->addSelect('s.aufnahmegruppe_kurzbz');
|
||||
$this->addSelect('s.udf_values');
|
||||
$this->addSelect('s.priorisierung');
|
||||
$this->addSelect('s.foerderrelevant');
|
||||
$this->addSelect('s.standort_code');
|
||||
$this->addSelect('s.zgv_erfuellt');
|
||||
$this->addSelect('s.zgvmas_erfuellt');
|
||||
$this->addSelect('s.zgvdoktor_erfuellt');
|
||||
}
|
||||
|
||||
|
||||
$this->addOrder('datum');
|
||||
$this->addOrder('insertamum');
|
||||
|
||||
if (!$where)
|
||||
$where = [];
|
||||
|
||||
$where['student_uid'] = $uid;
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
/**
|
||||
* getLastStatus
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user