Added a ledger entry listing on the monetary source view page.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@327 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-13 09:54:49 +00:00
parent 865d9ee617
commit 8b7c27b5db
3 changed files with 22 additions and 1 deletions

View File

@@ -282,6 +282,11 @@ class LedgerEntriesController extends AppController {
array('Transaction.id' => $params['custom']['transaction_id']);
}
if (isset($params['custom']['monetary_source_id'])) {
$conditions[] =
array('MonetarySource.id' => $params['custom']['monetary_source_id']);
}
return $conditions;
}

View File

@@ -118,7 +118,7 @@ if (isset($searchfields))
// Include custom data
$grid->customData(compact('ledger_id', 'account_id', 'ar_account',
'account_type', 'account_ftype',
'account_type', 'account_ftype', 'monetary_source_id',
'customer_id', 'lease_id', 'transaction_id', 'group_by_tx'));
// Render the grid

View File

@@ -50,6 +50,22 @@ echo '</div>' . "\n";
echo '<div CLASS="detail supporting">' . "\n";
/**********************************************************************
* Ledger Entries
*/
echo $this->element('ledger_entries', array
(// Element configuration
'monetary_source_id' => $source['id'],
// Grid configuration
'config' => array
('caption' => "Ledger Entries",
),
));
/* End "detail supporting" div */
echo '</div>' . "\n";