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 ";