From: Alan J. Pippin Date: Sat, 16 Feb 2008 03:02:18 +0000 (-0700) Subject: Fixed "interview total" bug when pulling up previous quarters of history. X-Git-Tag: release_0_3_0~15 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/images/static/git-favicon.png?a=commitdiff_plain;h=ff9fe56b29ea1d02844bc54d8a9864c120ff5c17;p=eq%2F.git Fixed "interview total" bug when pulling up previous quarters of history. --- diff --git a/inc/class.eq.inc.php b/inc/class.eq.inc.php index 68bc93d..e8b0fa4 100644 --- a/inc/class.eq.inc.php +++ b/inc/class.eq.inc.php @@ -2727,7 +2727,9 @@ class eq // Print the hometeaching interview stats for($m=$num_months; $m >=0; $m--) { $month = $current_month - $m; + if($month < 0) { $month = 12 + $month; } // Handle going backwards over a year boundary $month_begins = $month % $this->monthly_hometeaching_interview_stats; + //print "$month % $this->monthly_hometeaching_interview_stats = $month_begins
"; if($this->monthly_hometeaching_interview_stats == 1) { $month_begins = 1; } if(($month_begins) == 1) { $total = $ints[$m]; } else { $total += $ints[$m]; } @@ -2748,6 +2750,7 @@ class eq $totals = "$total_companionships Total Comps
Interview Totals:
"; for($m=$num_months; $m >=0; $m--) { $month = $current_month - $m; + if($month < 0) { $month = 12 + $month; } // Handle going backwards over a year boundary $month_begins = $month % $this->monthly_hometeaching_interview_stats; if($this->monthly_hometeaching_interview_stats == 1) { $month_begins = 1; } if(($month_begins) == 1) { $total = $total_ints[$m]; }