From 53175acbfe0671f60bd3e399d1a9e035ede0697b Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 2 Feb 2009 06:40:11 +0000 Subject: [PATCH] - Obey the year specifier - Add a "volunteer complete" option --- admin/reports_volunteers.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/admin/reports_volunteers.inc.php b/admin/reports_volunteers.inc.php index debc0149..bf90b408 100644 --- a/admin/reports_volunteers.inc.php +++ b/admin/reports_volunteers.inc.php @@ -87,6 +87,14 @@ $report_volunteers_fields = array( 'table' => 'users.cpr', 'value_map' =>array ('no' => 'no', 'yes' => 'YES')), + 'complete' => array( + 'name' => 'Volunteer -- Registration Complete', + 'header' => 'Cmpl', + 'width' => 0.4, + 'table' => 'users_volunteer.volunteer_complete', + 'value_map' => array ('no' => 'No', 'yes' => 'Yes'), + 'components' => array('users_volunteer')), + 'position_name' => array ( 'name' => 'Volunteer Position -- Name', 'header' => 'Position', @@ -121,6 +129,10 @@ $report_volunteers_fields = array( $fields = $report_volutneers_fields; $year = $report['year']; + if(in_array('users_volunteer', $components)) { + $uv_from = 'LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id'; + } + $signup_join = ''; $signup_where = ''; @@ -135,8 +147,10 @@ $report_volunteers_fields = array( $q = " FROM users $signup_join + $uv_from WHERE users.types LIKE '%volunteer%' + AND users.year='$year' $signup_where ";