From d01dbb663c0d58ed4294c9284106a0e46f274301 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 20 Apr 2004 00:58:04 +0000 Subject: add methods for masking credit cards, add payment info modification to self-service --- httemplate/view/cust_main.cgi | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'httemplate') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 624fe37d1..cf899d041 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -235,8 +235,7 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { ; if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) { - my $payinfo = $cust_main->payinfo; - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); + my $payinfo = $cust_main->payinfo_masked; print 'Credit card ', ( $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' ), '', @@ -601,11 +600,11 @@ function cust_credit_areyousure(href) { foreach my $cust_pay ($cust_main->cust_pay) { my $payby = $cust_pay->payby; - my $payinfo = $cust_pay->payinfo; + my $payinfo = $payby eq 'CARD' + ? $cust_pay->payinfo_masked + : $cust_pay->payinfo; my @cust_bill_pay = $cust_pay->cust_bill_pay; - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)) - if $payby eq 'CARD'; my $target = "$payby$payinfo"; $payby =~ s/^BILL$/Check #/ if $payinfo; $payby =~ s/^BILL$//; @@ -751,10 +750,10 @@ function cust_credit_areyousure(href) { foreach my $cust_refund ($cust_main->cust_refund) { my $payby = $cust_refund->payby; - my $payinfo = $cust_refund->payinfo; + my $payinfo = $payby eq 'CARD' + ? $cust_refund->payinfo_masked + : $cust_refund->payinfo; - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)) - if $payby eq 'CARD'; $payby =~ s/^BILL$/Check #/ if $payinfo; $payby =~ s/^(CARD|COMP)$/$1 /; -- cgit v1.2.1 From 47208f7694a6ec1cb979d7d0da7848dfe0e0aa7b Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 22 Apr 2004 07:07:30 +0000 Subject: initial copy from report_cust_pay.html --- httemplate/search/report_cust_credit.html | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 httemplate/search/report_cust_credit.html (limited to 'httemplate') diff --git a/httemplate/search/report_cust_credit.html b/httemplate/search/report_cust_credit.html new file mode 100644 index 000000000..1b30685dc --- /dev/null +++ b/httemplate/search/report_cust_credit.html @@ -0,0 +1,54 @@ + + + Payment report criteria + + + + + + +

Payment report criteria

+
+ + + + + + + + + + + + + + + +
Payments of type: +
From:
m/d/y
To:
m/d/y
+
+
+ + -- cgit v1.2.1