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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user