mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
add filter for any statusgrund not only wiederholer
This commit is contained in:
@@ -204,7 +204,21 @@ else
|
||||
<menuitem id="student-toolbar-filter-offenebuchungen" label="offene Buchungen" oncommand="StudentKontoFilterStudenten('konto')" disabled="false" tooltiptext="Liste aller Studenten mit offenen Buchungen"/>
|
||||
<menuitem id="student-toolbar-filter-studiengebuehr" label="nicht gebuchte Studiengebuehr" oncommand="StudentKontoFilterStudenten('studiengebuehr')" disabled="false" tooltiptext="Liste aller Studenten die noch nicht mit Studienbebuehr belastet wurden" />
|
||||
<menuitem id="student-toolbar-filter-zgvohnedatum" label="ZGV eingetragen ohne Datum" oncommand="StudentKontoFilterStudenten('zgvohnedatum')" disabled="false" tooltiptext="Liste aller Studenten die ZGV eingetragen haben bei denen aber kein ZGV Datum gesetzt ist" />
|
||||
<menuitem id="student-toolbar-filter-wiederholer" label="Wiederholer" oncommand="StudentKontoFilterStudenten('wiederholer')" disabled="false" tooltiptext="Liste aller Studenten mit Status Wiederholer" />
|
||||
<menu label="nach Statusgrund">
|
||||
<menupopup id="student-filter-statusgrund-menu-popup">
|
||||
<?php
|
||||
$statusgrund = new statusgrund();
|
||||
$statusgrund->getAll(true);
|
||||
|
||||
foreach($statusgrund->result as $row)
|
||||
{
|
||||
?>
|
||||
<menuitem id="student-toolbar-filter-statusgrund-<?php echo $row->statusgrund_id;?>" label="<?php echo $row->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE];?>" oncommand="StudentKontoFilterStudenten('stud-statusgrund-<?php echo $row->statusgrund_id; ?>')" disabled="false" tooltiptext="Liste aller Studenten mit Statusgrund <?php echo $row->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE];?>" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<?php
|
||||
|
||||
+15
-11
@@ -61,8 +61,9 @@ function convdate($date)
|
||||
|
||||
function checkfilter($row, $filter2, $buchungstyp = null)
|
||||
{
|
||||
global $studiensemester_kurzbz, $kontofilterstg;
|
||||
global $studiensemester_kurzbz, $kontofilterstg, $studiengang_kz;
|
||||
$db = new basis_db();
|
||||
$studstatusgrund = array();
|
||||
|
||||
if($filter2=='dokumente')
|
||||
{
|
||||
@@ -157,17 +158,20 @@ function checkfilter($row, $filter2, $buchungstyp = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ( $filter2=='wiederholer' )
|
||||
elseif ( preg_match('/^stud-statusgrund-([0-9]+)$/', $filter2, $studstatusgrund) )
|
||||
{
|
||||
// Alle Personen mit Statusgrund "PreWiederholer" in tbl_prestudentstatus
|
||||
$qry = "SELECT count(*) AS anzahl FROM public.tbl_prestudentstatus WHERE
|
||||
studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND
|
||||
person_id=".$db->db_add_param($row->person_id, FHC_INTEGER)." AND
|
||||
status_kurzbz='Student' AND statusgrund_id = 14";
|
||||
if ( $db->db_query($qry) && ($row_filter = $db->db_fetch_object()) && ($row_filter->anzahl > 0) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Alle Studenten mit Statusgrund in tbl_prestudentstatus
|
||||
$qry = "SELECT count(*) AS anzahl FROM public.tbl_prestudentstatus ps JOIN
|
||||
public.tbl_prestudent p ON p.prestudent_id = ps.prestudent_id AND
|
||||
ps. studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND
|
||||
p. person_id=".$db->db_add_param($row->person_id, FHC_INTEGER)." AND
|
||||
p.studiengang_kz=" . $db->db_add_param($studiengang_kz, FHC_INTEGER) . " AND
|
||||
ps.statusgrund_id = " . $db->db_add_param($studstatusgrund[1], FHC_INTEGER);
|
||||
//echo $qry . "\n";
|
||||
$filtered = ( $db->db_query($qry) && ($row_filter = $db->db_fetch_object()) && ($row_filter->anzahl > 0) )
|
||||
? true
|
||||
: false;
|
||||
return $filtered;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user