Changed the deposit to use a grouped double entry instead of individual ones for each tender deposited

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@414 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-29 10:10:11 +00:00
parent b789ed62b7
commit 13f97e5770
5 changed files with 39 additions and 10 deletions

View File

@@ -4,7 +4,8 @@
$cols = array();
//$cols['ID'] = array('index' => 'Tender.id', 'formatter' => 'id');
$cols['Date'] = array('index' => 'Transaction.stamp', 'formatter' => 'date');
$cols['Name'] = array('index' => 'Tender.name', 'formatter' => 'longname');
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname');
$cols['Item'] = array('index' => 'Tender.name', 'formatter' => 'longname');
$cols['Type'] = array('index' => 'TenderType.name', 'formatter' => 'name');
$cols['Comment'] = array('index' => 'Tender.comment', 'formatter' => 'comment');
$cols['Amount'] = array('index' => 'LedgerEntry.amount', 'formatter' => 'currency');

View File

@@ -88,11 +88,28 @@ echo $this->element('ledger_entries', array
'config' => array
(
'caption' => 'Ledger Entries',
'filter' => array('transaction_id' => $transaction['id']),
'filter' => array('transaction_id' => $transaction['id'],
'Account.id !=' => $account['id']),
'exclude' => array('Transaction'),
)));
/**********************************************************************
* Tenders Deposited
*/
if ($transaction['type'] === 'DEPOSIT') {
echo $this->element('tenders', array
(// Grid configuration
'config' => array
(
'caption' => 'Deposited Items',
'filter' => array('Tender.deposit_transaction_id' => $transaction['id']),
)));
}
/* End "detail supporting" div */
echo '</div>' . "\n";