Removed the Tender column from grids where the account does not support payments and so the ledger entries should never have a Tender anyway (except for our special case Closing account, which is fine to ignore).

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@441 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-31 01:34:45 +00:00
parent f707448b05
commit 2882b1917c
2 changed files with 7 additions and 3 deletions

View File

@@ -81,7 +81,8 @@ echo $this->element('ledger_entries', array
'caption' => ("Current Ledger: " .
"(". $current_ledger['name'] .")"),
'filter' => array('Ledger.id' => $current_ledger['id']),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance'),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance',
empty($account['payments']) ? 'Tender' : null),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));
@@ -98,7 +99,8 @@ echo $this->element('ledger_entries', array
'grid_setup' => array('hiddengrid' => true),
'caption' => "Entire Ledger",
'filter' => array('Account.id' => $account['id']),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance'),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance',
empty($account['payments']) ? 'Tender' : null),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));

View File

@@ -70,7 +70,9 @@ echo $this->element('ledger_entries', array
'config' => array
('caption' => "Ledger Entries",
'filter' => array('Ledger.id' => $ledger['id']),
'exclude' => array('Ledger', 'Account', 'Amount', 'Cr/Dr', 'Balance'),
'exclude' => array('Ledger', 'Account',
'Amount', 'Cr/Dr', 'Balance',
empty($account['payments']) ? 'Tender' : null),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));