Added customer association to each tender

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@413 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-29 09:33:29 +00:00
parent 2ffe04e3e4
commit b789ed62b7
6 changed files with 37 additions and 15 deletions

View File

@@ -121,7 +121,8 @@ class TendersController extends AppController {
$tenders = $this->Tender->find
('all',
array('contain' => array
('LedgerEntry',
('Customer',
'LedgerEntry',
),
'conditions' => array(array('Tender.deposit_transaction_id' => null),
@@ -141,8 +142,7 @@ class TendersController extends AppController {
);
$deposit['types'][$type_id]['entries'][] =
array('name' => $tender['Tender']['name'],
//'customer' => $tender['Customer']['name'],
'customer' => 'Not Yet',
'customer' => $tender['Customer']['name'],
'amount' => $tender['LedgerEntry']['amount']);
$deposit['types'][$type_id]['total'] += $tender['LedgerEntry']['amount'];
}
@@ -208,7 +208,7 @@ class TendersController extends AppController {
// Get the Tender and related fields
$tender = $this->Tender->find
('first', array
('contain' => array('TenderType'),
('contain' => array('TenderType', 'Customer', 'LedgerEntry' => array('Transaction')),
));
// REVISIT <AP>: 20090713