X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=cf899d0410684c5e58b109900867d5b6e918dd59;hb=699ce04c670c2da6b1b3821c960467b1c427d249;hp=6057017533a09d41cf731ae1cfde6235b49932eb;hpb=6db0053308daae19135066c5bf4d20e82f0a5780;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 605701753..cf899d041 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -3,7 +3,6 @@
my $conf = new FS::Conf;
-#false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so
my %uiview = ();
my %uiadd = ();
foreach my $part_svc ( qsearch('part_svc',{}) ) {
@@ -236,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)' ),
'',
@@ -401,7 +399,7 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) {
>
- <%=$pkg->{pkgnum}%>:
+ <%=$pkg->{pkgnum}%>:
<%=$pkg->{pkg}%> - <%=$pkg->{comment}%>
<% unless ($pkg->{cancel}) { %>
( <%=pkg_change_link($pkg)%> )
@@ -571,9 +569,12 @@ function cust_credit_areyousure(href) {
<% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
-
Payment History
- (Post payment
- | Post credit)
+
Payment History
+ Post cash/check payment
+ | Process credit card payment
+ | Process electronic check (ACH) payment
+ Post credit
+
<%
#get payment history
@@ -599,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$//;
@@ -711,10 +712,10 @@ function cust_credit_areyousure(href) {
}
}
if ( $cust_credit->credited > 0 ) {
- $desc .= ' - $'.
- $cust_credit->unapplied. ' unapplied'.
+ $desc .= ' $'.
+ $cust_credit->credited. ' unapplied'.
qq! (apply'.
+ $cust_credit->crednum. '">apply)'.
' ';
}
}
@@ -749,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 /;
@@ -889,15 +890,8 @@ sub get_packages {
}
- foreach my $cust_svc (
- qsearch( 'cust_svc', {
- 'pkgnum' => $cust_pkg->pkgnum,
- #'svcpart' => $part_svc->svcpart,
- }
- )
- ) {
-
- warn "svcnum ". $cust_svc->svcnum. " / svcpart ". $cust_svc->svcpart. "\n";
+ foreach my $cust_svc ( $cust_pkg->cust_svc ) {
+ #warn "svcnum ". $cust_svc->svcnum. " / svcpart ". $cust_svc->svcpart. "\n";
my $svc = {
'svcnum' => $cust_svc->svcnum,
'label' => ($cust_svc->label)[1],
@@ -990,11 +984,6 @@ sub pkg_datestr {
$strip;
}
-#sub pkg_details_link {
-# my $pkg = shift or return '';
-# return qq!Details!;
-#}
-
sub pkg_change_link {
my $pkg = shift or return '';
return qq!Change package!;
|