Fixed the last bug... I had just forgotten to use ReceiptTransaction for the dates in question. Also, I elminated the collected element, and just added a minor tweak to ledger_entries to make it work. I'll work on added user entered dates & accounts soon (perhaps next).
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@323 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -23,7 +23,13 @@ class LedgerEntriesController extends AppController {
|
||||
* - Generate a listing of ledger_entries
|
||||
*/
|
||||
|
||||
function collected() { $this->jqGridView('Collected Entries', null, 'collected'); }
|
||||
function collected($account_id) {
|
||||
$A = new Account();
|
||||
$this->set('collected_account_id', $account_id);
|
||||
$this->jqGridView('Collected ' .
|
||||
$this->LedgerEntry->Ledger->Account->name($account_id) .
|
||||
' Entries');
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@@ -191,9 +197,8 @@ class LedgerEntriesController extends AppController {
|
||||
|
||||
$fields = $model->ledgerContextFields2($ledger_id, $account_id, $account_type);
|
||||
|
||||
if ($params['action'] === 'collected') {
|
||||
if (count(array_intersect($params['fields'], array('applied'))) == 1)
|
||||
$fields[] = 'SUM(Reconciliation.amount) AS applied';
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
@@ -217,14 +222,14 @@ class LedgerEntriesController extends AppController {
|
||||
$conditions[] = array('NOT' => array('MoneyAccount.name' => 'Concession'));
|
||||
//$conditions[] = array('DA.name' => 'Check');
|
||||
//$conditions[] = array('DA.name' => 'Cash');
|
||||
//$conditions[] = array('Transaction.stamp >=' => '2009-03-26');
|
||||
//$conditions[] = array('Transaction.stamp <' => '2009-04-11');
|
||||
$conditions[] = array('Transaction.stamp >=' => '2009-04-11');
|
||||
$conditions[] = array('Transaction.stamp <' => '2009-05-09');
|
||||
//$conditions[] = array('Transaction.stamp >=' => '2009-05-09');
|
||||
//$conditions[] = array('Transaction.stamp <' => '2009-06-11');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp >=' => '2009-06-11');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp <' => '2009-07-11');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp >=' => '2009-03-26');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp <' => '2009-04-11');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp >=' => '2009-04-11');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp <' => '2009-05-09');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp >=' => '2009-05-09');
|
||||
//$conditions[] = array('ReceiptTransaction.stamp <' => '2009-06-11');
|
||||
$conditions[] = array('ReceiptTransaction.stamp >=' => '2009-06-11');
|
||||
$conditions[] = array('ReceiptTransaction.stamp <' => '2009-07-11');
|
||||
}
|
||||
|
||||
if ($params['action'] === 'ledger') {
|
||||
|
||||
Reference in New Issue
Block a user