More work on handling security deposit utilizations. This is headed in the right direction, but unfortunately, there is a problem if the security deposits have not been paid. I could just ignore it, because it's a low priority problem, but I think the solution might be to just provide a waiver on the unpaid charges. Since I need to implement fee waivers anyway, I'll just move onto that next, and then finish out the security deposit work.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@463 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-31 21:11:00 +00:00
parent b00944a412
commit 1c2c2b457c
6 changed files with 149 additions and 30 deletions

View File

@@ -11,8 +11,15 @@ echo ('<DIV CLASS="apply-deposit grid-selection-text">' .
'<DIV CLASS="supporting">' .
'<TABLE>' .
'<TR><TD CLASS="field">Balance:</TD><TD CLASS="value">'.$lease['stats']['balance'].'</TD></TR>' .
'<TR><TD CLASS="field">Deposit:</TD><TD CLASS="value">'.$deposit['summary']['balance'].'</TD></TR>' .
/* '<TR><TD CLASS="field">Balance:</TD><TD CLASS="value">' . */
/* FormatHelper::currency($lease['stats']['balance']) . */
/* '</TD></TR>' . */
'<TR><TD CLASS="field">Deposit:</TD><TD CLASS="value">' .
FormatHelper::currency($depositBalance) .
'</TD></TR>' .
'</TABLE>' .
'</DIV>' .
@@ -20,8 +27,8 @@ echo ('<DIV CLASS="apply-deposit grid-selection-text">' .
echo $form->create(null, array('id' => 'apply-deposit-form',
/* 'url' => array('controller' => 'lease', */
/* 'action' => 'apply_deposit') */
'url' => array('controller' => 'leases',
'action' => 'apply_deposit')
)
);
@@ -50,8 +57,7 @@ echo $this->element('form_table',
'between' => '<A HREF="#" ONCLICK="datepickerNow(\'TransactionStamp\'); return false;">Now</A>',
),
"amount" => array('prefix' => 'LedgerEntry',
'value' => min($lease['stats']['balance'],
$deposit['summary']['balance']),
'opts' => array('value' => $depositBalance),
),
"comment" => array('opts' => array('size' => 50),
),