forked from science-ation/science-ation
Add regfee_items columns to student reports
This commit is contained in:
parent
51553e0e61
commit
8e6da38509
@ -80,6 +80,36 @@ function reports_students_school_principal(&$report, $field, $text)
|
||||
return '';
|
||||
}
|
||||
|
||||
function report_student_regfee_item(&$report, $field, $text) {
|
||||
$year = $report['year'];
|
||||
$id=intval(substr($field,12));
|
||||
$q=mysql_query("SELECT regfee_items_id FROM regfee_items_link WHERE students_id='$text' AND regfee_items_id='$id'");
|
||||
echo mysql_error();
|
||||
if($r=mysql_fetch_object($q)) {
|
||||
return i18n("Yes");
|
||||
}
|
||||
else {
|
||||
return i18n("No");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$q = mysql_query("SELECT * FROM regfee_items WHERE year='{$config['FAIRYEAR']}'");
|
||||
$regfeeitems=array();
|
||||
$first=true;
|
||||
while($i = mysql_fetch_assoc($q)) {
|
||||
$regfeeitems["regfee_item_".$i['id']] = array (
|
||||
'name' => "Registration Fee Items -- {$i['name']}",
|
||||
'header' => $i['name'],
|
||||
'width' => 1,
|
||||
'table' => 'students.id',
|
||||
'table_sort' => 'students.id',
|
||||
'exec_function' => 'report_student_regfee_item');
|
||||
|
||||
if($first) $regfeeitems["regfee_item_".$i['id']]=array_merge($regfeeitems["regfee_item_".$i['id']],array( 'start_option_group' => 'Registration Fee Items'));
|
||||
$first=false;
|
||||
}
|
||||
|
||||
|
||||
$report_students_fields = array(
|
||||
'pn' => array(
|
||||
@ -657,6 +687,8 @@ $report_students_fields = array(
|
||||
'table_sort' => 'projects.id',
|
||||
'exec_function' => 'reports_students_award_selfnom_5'),
|
||||
|
||||
|
||||
|
||||
/* Emergency Contact Info */
|
||||
'emerg_name' => array(
|
||||
'start_option_group' => 'Emergency Contact Information',
|
||||
@ -847,6 +879,8 @@ $report_students_fields = array(
|
||||
|
||||
);
|
||||
|
||||
$report_students_fields = array_merge($report_students_fields,$regfeeitems);
|
||||
|
||||
function report_students_fromwhere($report, $components)
|
||||
{
|
||||
global $config, $report_students_fields;
|
||||
|
Loading…
x
Reference in New Issue
Block a user