Modified a couple reports to have url control over the period

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@997 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2010-07-02 22:05:24 +00:00
parent fff2e84fb1
commit 920dba3a4d
3 changed files with 6 additions and 5 deletions

View File

@@ -450,11 +450,11 @@ class LeasesController extends AppController {
* action: overview
* - Displays lease up information
*/
function overview() {
function overview($months = 12) {
$overview = array('months' => array());
for ($month = 0; $month < 12; ++$month) {
for ($month = 0; $month < $months; ++$month) {
//for ($month = 12; $month >= 0; --$month) {
$this_month = "(DATE(NOW() - INTERVAL $month MONTH - INTERVAL DAY(NOW())-1 DAY))";
$next_month = "($this_month + INTERVAL 1 MONTH)";