git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@463 97e9348a-65ac-dc4b-aefc-98561f571b83
89 lines
2.3 KiB
PHP
89 lines
2.3 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="apply-deposit input">' . "\n";
|
|
|
|
echo ('<DIV CLASS="apply-deposit grid-selection-text">' .
|
|
|
|
'Lease #' . $lease['number'] .
|
|
' / Customer #' . $customer['id'] .
|
|
': ' . $customer['name'] .
|
|
' / Unit ' . $unit['name'] .
|
|
|
|
'<DIV CLASS="supporting">' .
|
|
'<TABLE>' .
|
|
|
|
/* '<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>' .
|
|
|
|
'</DIV>' . "\n");
|
|
|
|
|
|
echo $form->create(null, array('id' => 'apply-deposit-form',
|
|
'url' => array('controller' => 'leases',
|
|
'action' => 'apply_deposit')
|
|
)
|
|
);
|
|
|
|
echo $form->input("Customer.id",
|
|
array('id' => 'customer-id',
|
|
'type' => 'hidden',
|
|
'value' => $customer['id']));
|
|
|
|
echo $form->input("Lease.id",
|
|
array('id' => 'lease-id',
|
|
'type' => 'hidden',
|
|
'value' => $lease['id']));
|
|
|
|
echo $form->input("LedgerEntry.Account.id",
|
|
array('id' => 'account-id',
|
|
'type' => 'hidden',
|
|
'value' => $account['id']));
|
|
|
|
|
|
echo $this->element('form_table',
|
|
array('class' => "item receipt transaction entry",
|
|
//'with_name_after' => ':',
|
|
'field_prefix' => 'Transaction',
|
|
'fields' => array
|
|
("stamp" => array('opts' => array('type' => 'text'),
|
|
'between' => '<A HREF="#" ONCLICK="datepickerNow(\'TransactionStamp\'); return false;">Now</A>',
|
|
),
|
|
"amount" => array('prefix' => 'LedgerEntry',
|
|
'opts' => array('value' => $depositBalance),
|
|
),
|
|
"comment" => array('opts' => array('size' => 50),
|
|
),
|
|
)));
|
|
|
|
echo $form->end('Utilize Deposit');
|
|
?>
|
|
|
|
<script type="text/javascript"><!--
|
|
|
|
// Reset the form
|
|
function resetForm() {
|
|
datepickerNow('TransactionStamp');
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
$("#TransactionStamp")
|
|
.attr('autocomplete', 'off')
|
|
.datepicker({ constrainInput: true,
|
|
numberOfMonths: [1, 1],
|
|
showCurrentAtPos: 0,
|
|
dateFormat: 'mm/dd/yy' });
|
|
|
|
resetForm();
|
|
});
|
|
--></script>
|
|
|
|
</div>
|