summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/elements')
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html10
-rw-r--r--httemplate/search/elements/report_cust_pay_or_refund.html43
2 files changed, 44 insertions, 9 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index b0524913a..eeef0c0e1 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -330,6 +330,16 @@ if ( $cgi->param('magic') ) {
push @search, "$table.payinfo = '$1'";
}
+ if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) {
+ # I think that's all the characters we need to allow.
+ # To avoid confusion, this parameter searches both auth and order_number.
+ push @search, "($table.auth LIKE '$1%') OR ($table.order_number LIKE '$1%')";
+ push @fields, 'auth', 'order_number';
+ push @header, 'Auth #', 'Transaction #';
+ $align .= 'rr';
+
+ }
+
if ( $cgi->param('usernum') =~ /^(\d+)$/ ) {
push @search, "$table.usernum = $1";
}
diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html
index a2b90b47d..7a1216bb6 100644
--- a/httemplate/search/elements/report_cust_pay_or_refund.html
+++ b/httemplate/search/elements/report_cust_pay_or_refund.html
@@ -50,23 +50,48 @@ Examples:
<SCRIPT TYPE="text/javascript">
function payby_changed(what) {
- if ( what.options[what.selectedIndex].value == 'BILL' ) {
- document.getElementById('checkno_caption').style.color = '#000000';
- what.form.payinfo.disabled = false;
- what.form.payinfo.style.backgroundColor = '#ffffff';
+ if ( what.value == 'BILL' ) {
+ show('payinfo');
+ hide('ccpay');
+ } else if ( what.value.match(/^CARD/) ) {
+ hide('payinfo');
+ show('ccpay');
} else {
- document.getElementById('checkno_caption').style.color = '#bbbbbb';
- what.form.payinfo.disabled = true;
- what.form.payinfo.style.backgroundColor = '#dddddd';
+ hide('payinfo');
+ hide('ccpay');
}
}
+ function show(what) {
+ document.getElementById(what+'_caption').style.color = '#000000';
+ document.getElementById(what).disabled = false;
+ document.getElementById(what).style.backgroundColor = '#ffffff';
+ }
+
+ function hide(what) {
+ document.getElementById(what+'_caption').style.color = '#bbbbbb';
+ document.getElementById(what).disabled = true;
+ document.getElementById(what).style.backgroundColor = '#dddddd';
+ }
+
+
+
</SCRIPT>
<TR>
- <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb"><% mt('Check #:') |h %> </FONT></TD>
+ <TD ALIGN="right"><FONT ID="payinfo_caption" COLOR="#bbbbbb"><% mt('Check #:') |h %> </FONT></TD>
+ <TD>
+ <INPUT TYPE="text" ID="payinfo" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="right">
+ <FONT ID="ccpay_caption" COLOR="#bbbbbb">
+ <% mt('Transaction #') |h %>
+ </FONT>
+ </TD>
<TD>
- <INPUT TYPE="text" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
+ <INPUT TYPE="text" ID="ccpay" NAME="ccpay" DISABLED STYLE="background-color: #dddddd">
</TD>
</TR>