Modified to dynamically determine eligible charge accounts, instead of the two that were hardcoded.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@244 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-07 07:14:18 +00:00
parent ae442db01f
commit 019b97fe53
4 changed files with 89 additions and 46 deletions

View File

@@ -154,29 +154,13 @@ function addChargeSource(flash) {
//'with_name_after' => ':',
'field_prefix' => 'LedgerEntry.%{id}',
'fields' => array
("charge_type" => array('opts' =>
array('options' =>
array('rent' => 'Rent',
'late' => 'Late Charge',
'secd' => 'Security Deposit'),
'separator' => ' ',
'type' => 'radio',
'label' => false,
'div' => false,
'legend' => false,
'value' =>
(isset($charge['type'])
? $charge['type']
: null)
),
),
"amount" => array('opts' =>
array('value' =>
(isset($charge['amount'])
? $charge['amount']
: null)
),
),
("account_id" => array('name' => 'Account',
'opts' =>
array('options' => $chargeAccounts,
'value' => $defaultAccount,
),
),
"amount" => null,
"comment" => array('opts' => array('size' => 50)),
),
))) . "+\n";