$this->default_vis_num_years = 1;
$this->max_num_districts = 4;
$this->time_drop_down_lists = 1;
+ $this->monthly_hometeaching_interviews = 0;
$this->time_drop_down_list_inc = 15;
$this->default_visit_appt_duration = 45;
$this->default_ppi_appt_duration = 30;
$total_companionships += $num_companionships;
$stat_data = "<tr><td><b><font size=-2>$num_companionships Companionships<br>Interview Quarterly Totals:</font></b></td>";
- for($m=$num_months; $m >=0; $m--) {
- $month = $current_month - $m;
- if(($month % 3) == 1) { $quarter_total = $ints[$m]; }
- else { $quarter_total += $ints[$m]; }
- $percent = ceil(($quarter_total / $num_companionships)*100);
- $stat_data .= "<td align=center><font size=-2><b>$quarter_total<br>$percent%</font></b></td>";
+ // Print the hometeaching interview stats
+ if($this->monthly_hometeaching_interviews == 0) { //Quarterly
+ for($m=$num_months; $m >=0; $m--) {
+ $month = $current_month - $m;
+ if(($month % 3) == 1) { $quarter_total = $ints[$m]; }
+ else { $quarter_total += $ints[$m]; }
+ $percent = ceil(($quarter_total / $num_companionships)*100);
+ $stat_data .= "<td align=center><font size=-2><b>$quarter_total<br>$percent%</font></b></td>";
+ }
+ $stat_data .= "</tr>";
}
- $stat_data .= "</tr>";
-
+ else { // Monthly
+ for($m=$num_months; $m >=0; $m--) {
+ $percent = ceil(($ints[$m] / $num_companionships)*100);
+ $stat_data .= "<td align=center><font size=-2><b>$ints[$m]<br>$percent%</font></b></td>";
+ }
+ $stat_data .= "</tr>";
+ }
+
$this->t->set_var('table_width',$table_width);
$this->t->set_var('header_row',$header_row);
$this->t->set_var('table_data',$table_data);
$this->t->fp('list','district_list',True);
}
- // Display the totals, cummulative per quarter
- $quarter_total = 0;
- $totals = "<tr><td><b><font size=-2>$total_companionships Total Comps<br>Interview Quarterly Totals:</font></b></td>";
- for($m=$num_months; $m >=0; $m--) {
- $month = $current_month - $m;
- if(($month % 3) == 1) { $quarter_total = $total_ints[$m]; }
- else { $quarter_total += $total_ints[$m]; }
- $percent = ceil(($quarter_total / $total_companionships)*100);
- $totals .= "<td align=center><font size=-2><b>$quarter_total<br>$percent%</font></b></td>";
+ // Display the totals
+ if($this->monthly_hometeaching_interviews == 0) { //Quarterly
+ $quarter_total = 0;
+ $totals = "<tr><td><b><font size=-2>$total_companionships Total Comps<br>Interview Quarterly Totals:</font></b></td>";
+ for($m=$num_months; $m >=0; $m--) {
+ $month = $current_month - $m;
+ if(($month % 3) == 1) { $quarter_total = $total_ints[$m]; }
+ else { $quarter_total += $total_ints[$m]; }
+ $percent = ceil(($quarter_total / $total_companionships)*100);
+ $totals .= "<td align=center><font size=-2><b>$quarter_total<br>$percent%</font></b></td>";
+ }
+ $totals .= "</tr>";
+ }
+ else { //Monthly
+ $totals = "<tr><td><b><font size=-2>$total_companionships Total Comps<br>Interview Monthly Totals:</font></b></td>";
+ for($m=$num_months; $m >=0; $m--) {
+ $percent = ceil(($total_ints[$m] / $total_companionships)*100);
+ $totals .= "<td align=center><font size=-2><b>$total_ints[$m]<br>$percent%</font></b></td>";
+ }
+ $totals .= "</tr>";
}
- $totals .= "</tr>";
$this->t->set_var('totals',$totals);
$this->t->pfp('out','int_view_t');