summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-01-02 19:01:16 -0800
committerMark Wells <mark@freeside.biz>2013-01-02 19:01:16 -0800
commite5d6af11f52aabe8c9e6e12ce43c3401ccf025a8 (patch)
treee67a2737e58566ad7d4e4b759b3bf4a542dae25d /httemplate/search/elements
parentc7286ce9036d71665c2bfed9de93f87309b72d35 (diff)
move credit card transaction results out of paybatch and into real fields, #18548
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>