diff --git a/application/controllers/jobs/AntragJob.php b/application/controllers/jobs/AntragJob.php index 6d4617a73..0571bd9dd 100644 --- a/application/controllers/jobs/AntragJob.php +++ b/application/controllers/jobs/AntragJob.php @@ -373,9 +373,10 @@ class AntragJob extends JOB_Controller $result = $this->prestudentlib->setAbbrecher( $antrag->prestudent_id, $antrag->studiensemester_kurzbz, - $antrag->insertvon ?: $insertvon, + 'AntragJob', 'abbrecherStgl', - $antrag->insertamum + $antrag->insertamum, + $antrag->insertvon ?: $insertvon ); if (isError($result)) $this->logError(getError($result)); diff --git a/application/libraries/PrestudentLib.php b/application/libraries/PrestudentLib.php index 279b6ed2a..989e14585 100644 --- a/application/libraries/PrestudentLib.php +++ b/application/libraries/PrestudentLib.php @@ -35,10 +35,12 @@ class PrestudentLib $this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); } - public function setAbbrecher($prestudent_id, $studiensemester_kurzbz, $insertvon = null, $statusgrund_kurzbz = null, $datum = null, $bestaetigtam = null) + public function setAbbrecher($prestudent_id, $studiensemester_kurzbz, $insertvon = null, $statusgrund_kurzbz = null, $datum = null, $bestaetigtam = null, $bestaetigtvon = null) { if (!$insertvon) $insertvon = getAuthUID(); + if (!$bestaetigtvon) + $bestaetigtvon = $insertvon; $result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz); if (isError($result)) @@ -79,7 +81,7 @@ class PrestudentLib 'insertamum' => date('c'), 'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz, 'studienplan_id'=> $prestudent_status->studienplan_id, - 'bestaetigtvon' => $insertvon, + 'bestaetigtvon' => $bestaetigtvon, 'bestaetigtam' => $bestaetigtam ]); diff --git a/application/models/education/Pruefung_model.php b/application/models/education/Pruefung_model.php index ef7cfc967..e1d668293 100644 --- a/application/models/education/Pruefung_model.php +++ b/application/models/education/Pruefung_model.php @@ -222,9 +222,9 @@ class Pruefung_model extends DB_Model $this->withDetailsForStudierendenAntrag(); if ($maxDate) - $this->db->where("p.datum < ", $maxDate->format('c')); + $this->db->where("p.datum <= ", $maxDate->format('Y-m-d')); if ($minDate) - $this->db->where("p.datum > ", $minDate->format('c')); + $this->db->where("p.datum > ", $minDate->format('Y-m-d')); $this->db->where("b.aktiv", true);