Checking in changes from some time ago, changing the reports screen to give direct Quickbooks invoice and credits info.

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1013 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2012-06-14 01:32:44 +00:00
parent 4dffa540a0
commit b6ed57c02c
4 changed files with 16 additions and 10 deletions

View File

@@ -278,11 +278,17 @@ 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,
/* $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('Monthly Expenses',
array('controller' => 'statement_entries', 'action' => 'expensebymonth'), null,
$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,

View File

@@ -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) {

View File

@@ -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,
)));

View File

@@ -10,7 +10,7 @@ echo '<div class="statement_entry overview">' . "\n";
*/
$rows = array();
$rows[] = array("$months Month Total", FormatHelper::currency($overview['amount']));
$rows[] = array("$months Month Total", FormatHelper::currency($overview['amount']) . " / (" . FormatHelper::currency($overview['amount'] / $months) . " per month)");
echo $this->element('table',
array('class' => 'item statement_entry detail',