git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@295 97e9348a-65ac-dc4b-aefc-98561f571b83
81 lines
2.1 KiB
PHP
81 lines
2.1 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="bad-debt input">' . "\n";
|
|
|
|
echo ('<DIV CLASS="bad-debt 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">'.$lease['stats']['balance'].'</TD></TR>' .
|
|
'</TABLE>' .
|
|
'</DIV>' .
|
|
|
|
'</DIV>' . "\n");
|
|
|
|
|
|
echo $form->create(null, array('id' => 'receipt-form',
|
|
'url' => array('controller' => 'transactions',
|
|
'action' => 'postReceipt')));
|
|
|
|
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.0.account_id",
|
|
array('id' => 'account-id',
|
|
'type' => 'hidden',
|
|
'value' => $account['id']));
|
|
|
|
echo $form->input("LedgerEntry.0.amount",
|
|
array('id' => 'amount',
|
|
'type' => 'hidden',
|
|
'value' => $lease['stats']['balance']));
|
|
|
|
|
|
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>',
|
|
),
|
|
"comment" => array('opts' => array('size' => 50),
|
|
),
|
|
)));
|
|
|
|
echo $form->end('Write Off Remaining Balance');
|
|
?>
|
|
|
|
<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>
|