diff --git a/site/app_controller.php b/site/app_controller.php index 65a6fe7..32f7f3c 100644 --- a/site/app_controller.php +++ b/site/app_controller.php @@ -278,12 +278,18 @@ class AppController extends Controller { $this->addSideMenuLink('Unit Summary', array('controller' => 'units', 'action' => 'overview'), null, 'REPORT'); - $this->addSideMenuLink('Monthly Income', - array('controller' => 'statement_entries', 'action' => 'incomebymonth'), null, - 'REPORT'); - $this->addSideMenuLink('Monthly Expenses', - array('controller' => 'statement_entries', 'action' => 'expensebymonth'), null, + /* $this->addSideMenuLink('Monthly Income', */ + /* array('controller' => 'statement_entries', 'action' => 'incomebymonth'), null, */ + /* 'REPORT'); */ + /* $this->addSideMenuLink('Monthly Expenses', */ + /* array('controller' => 'statement_entries', 'action' => 'expensebymonth'), null, */ + /* 'REPORT'); */ + $this->addSideMenuLink('Quickbook Invoice', + array('controller' => 'statement_entries', 'action' => 'incomebymonth', 4, 1), null, 'REPORT'); + $this->addSideMenuLink('Quickbook Credits', + array('controller' => 'statement_entries', 'action' => 'expensebymonth', 4, 0), null, + 'REPORT'); $this->addSideMenuLink('Monthly Net', array('controller' => 'statement_entries', 'action' => 'netbymonth'), null, 'REPORT'); diff --git a/site/controllers/statement_entries_controller.php b/site/controllers/statement_entries_controller.php index 60667d1..f1ecf6c 100644 --- a/site/controllers/statement_entries_controller.php +++ b/site/controllers/statement_entries_controller.php @@ -268,7 +268,7 @@ class StatementEntriesController extends AppController { $datefrom = 'DATE(NOW() - INTERVAL '.($months-1).' MONTH - INTERVAL DAY(NOW())-1 DAY)'; $dateto = 'NOW()'; /* $datefrom = '"2009-01-01"'; */ - /* $dateto = '"2011-12-31"'; */ + /* $dateto = '"2012-12-31"'; */ $result = $this->StatementEntry->find ('all', @@ -330,10 +330,10 @@ class StatementEntriesController extends AppController { $this->render('chargesbymonth'); } - function incomebymonth($months = 12) { + function incomebymonth($months = 12, $invoice = false) { $this->set('title', 'Monthly Gross Income'); $this->set('reptype', 'Gross Income'); - $this->incexpbymonth(array('INCOME'), true, $months); + $this->incexpbymonth(array('INCOME'), $invoice, $months); } function expensebymonth($months = 12) { diff --git a/site/views/accounts/view.ctp b/site/views/accounts/view.ctp index ddf1e61..522ace9 100644 --- a/site/views/accounts/view.ctp +++ b/site/views/accounts/view.ctp @@ -100,7 +100,7 @@ echo $this->element('ledger_entries', array 'filter' => array('Account.id' => $account['id']), 'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance', empty($account['receipts']) ? 'Tender' : null), - 'include' => array('Debit', 'Credit', 'Sub-Total'), + 'include' => array('Transaction', 'Debit', 'Credit', 'Sub-Total'), 'limit' => 50, ))); diff --git a/site/views/statement_entries/chargesbymonth.ctp b/site/views/statement_entries/chargesbymonth.ctp index 670b08a..49eb8c5 100644 --- a/site/views/statement_entries/chargesbymonth.ctp +++ b/site/views/statement_entries/chargesbymonth.ctp @@ -10,7 +10,7 @@ echo '