' . "\n";
if (isset($lease)) {
$customer = $lease['Customer'];
$unit = $lease['Unit'];
}
if (isset($customer['Customer']))
$customer = $customer['Customer'];
if (isset($lease['Lease']))
$lease = $lease['Lease'];
// We're not actually using a grid to select the customer / lease
// but we could/should be, and the result would be selection-text
echo ('
' .
'
' . "\n");
echo ('| ' . $customer['name'] . ' | ' .
' ' . '(Customer #' . $customer['id'] . ')' . ' | ' .
'
' . "\n");
if (isset($lease))
echo ('| ' . 'Unit ' . $unit['name'] . ' | ' .
' ' . '(Lease #' . $lease['number'] . ')' . ' | ' .
'
' . "\n");
echo ('| Remaining Balance: | ' .
' ' . FormatHelper::currency($balance) . ' | ' .
'
' . "\n");
echo ('
' .
'
' . "\n");
echo $form->create(null, array('id' => 'receipt-form',
'url' => array('controller' => 'transactions',
'action' => 'postWriteOff'))) . "\n";
echo $form->input("Customer.id",
array('type' => 'hidden',
'value' => $customer['id'])) . "\n";
if (isset($lease['id']))
echo $form->input("Lease.id",
array('type' => 'hidden',
'value' => $lease['id'])) . "\n";
echo $form->input("Entry.0.amount",
array('type' => 'hidden',
'value' => $balance)) . "\n";
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' => 'Now',
),
"comment" => array('opts' => array('size' => 50),
),
))) . "\n";
echo $form->end('Write Off Remaining Balance');
?>