mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
Merge branch 'bugfix-5822/Digitaler_Lehrauftrag_Sonstiges'
This commit is contained in:
@@ -184,14 +184,14 @@ class LehrauftragAkzeptieren extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if lectors latest active Verwendung has inkludierte Lehre
|
||||
* Check if lectors latest Verwendung has inkludierte Lehre
|
||||
* - inkludierte_lehre is null OR 0: freelancer lector -> has NO inkludierte Lehre
|
||||
* - inkludierte_lehre -1: fix employed lector -> has inkludierte Lehre (all inclusive)
|
||||
* - inkludierte_lehre > 0: fix employed lector -> has inkludierte Lehre (value is amount of hours included)
|
||||
*/
|
||||
public function checkInkludierteLehre()
|
||||
{
|
||||
$result = $this->BisverwendungModel->getLast($this->_uid);
|
||||
$result = $this->BisverwendungModel->getLast($this->_uid, false);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class Bisverwendung_model extends DB_Model
|
||||
/**
|
||||
* Get latest (active) Verwendung of the user.
|
||||
* @param string $uid
|
||||
* @param bool $active If false, returns latest Verwendung no matter if actual or not (ignores ending/beginning date).
|
||||
* @param bool $active If false, returns latest Verwendung no matter if it is still actual.
|
||||
* @return array
|
||||
*/
|
||||
public function getLast($uid, $active = true)
|
||||
@@ -28,14 +28,14 @@ class Bisverwendung_model extends DB_Model
|
||||
mitarbeiter_uid = '. $this->escape($uid). '
|
||||
AND ( beginn <= NOW() OR beginn IS NULL )
|
||||
AND ( ende >= NOW() OR ende IS NULL )
|
||||
ORDER BY ende DESC NULLS LAST, beginn DESC NULLS LAST
|
||||
ORDER BY ende DESC NULLS FIRST, beginn DESC NULLS LAST
|
||||
';
|
||||
}
|
||||
else
|
||||
{
|
||||
$condition = '
|
||||
mitarbeiter_uid = '. $this->escape($uid). '
|
||||
ORDER BY ende DESC NULLS LAST, beginn DESC NULLS LAST
|
||||
ORDER BY ende DESC NULLS FIRST, beginn DESC NULLS LAST
|
||||
';
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,8 @@ FROM
|
||||
(SELECT
|
||||
uid
|
||||
FROM
|
||||
public.tbl_benutzer
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
ON tbl_benutzer.uid = ma.mitarbeiter_uid
|
||||
WHERE
|
||||
person_id = tmp_projektbetreuung.person_id
|
||||
ORDER BY aktiv DESC, updateaktivam DESC -- accept inactive as some person_ids have no active, but order them last
|
||||
|
||||
@@ -187,7 +187,8 @@ FROM
|
||||
(SELECT
|
||||
uid
|
||||
FROM
|
||||
public.tbl_benutzer
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
ON tbl_benutzer.uid = ma.mitarbeiter_uid
|
||||
WHERE
|
||||
person_id = tmp_projektbetreuung.person_id
|
||||
ORDER BY aktiv DESC, updateaktivam DESC -- accept inactive as some person_ids have no active, but order them last
|
||||
|
||||
@@ -219,7 +219,8 @@ FROM
|
||||
(SELECT
|
||||
uid
|
||||
FROM
|
||||
public.tbl_benutzer
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
ON tbl_benutzer.uid = ma.mitarbeiter_uid
|
||||
WHERE
|
||||
person_id = tmp_projektbetreuung.person_id
|
||||
ORDER BY aktiv DESC, updateaktivam DESC -- accept inactive as some person_ids have no active, but order them last
|
||||
|
||||
Reference in New Issue
Block a user