Added confirmation page, and more importantly date and comment settings, when reversing a charge.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@598 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
74
views/statement_entries/reverse.ctp
Normal file
74
views/statement_entries/reverse.ctp
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php /* -*- mode:PHP -*- */
|
||||
|
||||
echo '<div class="reverse input">' . "\n";
|
||||
|
||||
$customer = $entry['Customer'];
|
||||
$transaction = $entry['Transaction'];
|
||||
$account = $entry['Account'];
|
||||
|
||||
if (isset($entry['StatementEntry']))
|
||||
$entry = $entry['StatementEntry'];
|
||||
|
||||
// We're not actually using a grid to select the customer,
|
||||
// but selection-text makes for reasonable formatting
|
||||
echo ('<DIV CLASS="reverse 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;">' . $account['name'] . '</TD>' .
|
||||
' <TD>' . '(StatementEntry #' . $entry['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' => 'reverse-form',
|
||||
'url' => array('action' => 'reverse'))) . "\n";
|
||||
|
||||
echo $form->input("StatementEntry.id",
|
||||
array('type' => 'hidden',
|
||||
'value' => $entry['id'])) . "\n";
|
||||
|
||||
echo $this->element('form_table',
|
||||
array('class' => "item reverse 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('Reverse Charge');
|
||||
?>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user