git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@822 97e9348a-65ac-dc4b-aefc-98561f571b83
69 lines
1.9 KiB
PHP
69 lines
1.9 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="nsf input">' . "\n";
|
|
|
|
$customer = $tender['Customer'];
|
|
$entry = $tender['LedgerEntry'];
|
|
$transaction = $entry['Transaction'];
|
|
|
|
if (isset($tender['Tender']))
|
|
$tender = $tender['Tender'];
|
|
|
|
// We're not actually using a grid to select the customer,
|
|
// but selection-text makes for reasonable formatting
|
|
echo ('<DIV CLASS="nsf grid-selection-text">' .
|
|
'<TABLE>' . "\n");
|
|
|
|
echo ('<TR><TD style="padding-right: 1em;">' . $customer['name'] . '</TD>' .
|
|
' <TD>' . '(Customer #' . $customer['id'] . ')' . '</TD>' .
|
|
'</TR>' . "\n");
|
|
|
|
echo ('<TR><TD style="padding-right: 1em;">' . $tender['name'] . '</TD>' .
|
|
' <TD>' . '(Tender #' . $tender['id'] . ')' . '</TD>' .
|
|
'</TR>' . "\n");
|
|
|
|
echo ('<TR><TD style="padding-right: 1em;">Amount:</TD>' .
|
|
' <TD>' . FormatHelper::currency($entry['amount']) . '</TD>' .
|
|
'</TR>' . "\n");
|
|
|
|
echo ('</TABLE>' .
|
|
'</DIV>' . "\n");
|
|
|
|
|
|
echo $form->create(null, array('id' => 'nsf-form',
|
|
'url' => array('action' => 'nsf'))) . "\n";
|
|
|
|
echo $form->input("Tender.id",
|
|
array('type' => 'hidden',
|
|
'value' => $tender['id'])) . "\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' => '<A HREF="#" ONCLICK="datepickerNow(\'TransactionStamp\'); return false;">Now</A>',
|
|
),
|
|
"comment" => array('opts' => array('size' => 50),
|
|
),
|
|
))) . "\n";
|
|
|
|
echo $form->end('Record Item as NSF');
|
|
?>
|
|
|
|
<script type="text/javascript"><!--
|
|
|
|
// Reset the form
|
|
function resetForm() {
|
|
datepickerNow('TransactionStamp');
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
datepicker('TransactionStamp');
|
|
resetForm();
|
|
});
|
|
--></script>
|
|
|
|
</div>
|