summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history/voided_payment.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main/payment_history/voided_payment.html')
-rw-r--r--httemplate/view/cust_main/payment_history/voided_payment.html27
1 files changed, 22 insertions, 5 deletions
diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html
index 9cbc47b..6103727 100644
--- a/httemplate/view/cust_main/payment_history/voided_payment.html
+++ b/httemplate/view/cust_main/payment_history/voided_payment.html
@@ -8,15 +8,32 @@ my( $cust_pay_void, %opt ) = @_;
my $curuser = $FS::CurrentUser::CurrentUser;
my $payby = $cust_pay_void->payby;
-my $payinfo = $payby eq 'CARD'
- ? $cust_pay_void->paymask
- : $cust_pay_void->payinfo;
+
+my $payinfo;
+if ( $payby eq 'CARD' ) {
+ $payinfo = $cust_pay_void->paymask;
+} elsif ( $payby eq 'CHEK' ) {
+ my( $account, $aba ) = split('@', $cust_pay_void->paymask );
+ $payinfo = "ABA $aba, Acct #$account";
+} else {
+ $payinfo = $cust_pay_void->payinfo;
+}
$payby =~ s/^BILL$/Check #/ if $payinfo;
$payby =~ s/^CHEK$/Electronic check /;
+$payby =~ s/^PREP$/Prepaid card /;
+$payby =~ s/^CARD$/Credit card #/;
+$payby =~ s/^COMP$/Complimentary by /;
+$payby =~ s/^CASH$/Cash/;
+$payby =~ s/^WEST$/Western Union/;
+$payby =~ s/^MCRD$/Manual credit card/;
$payby =~ s/^BILL$//;
-$payby =~ s/^(CARD|COMP)$/$1 /;
-my $info = $payby ? " ($payby$payinfo)" : '';
+my $info = $payby ? "($payby$payinfo)" : '';
+
+if ( $opt{'pkg-balances'} && $cust_pay_void->pkgnum ) {
+ my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay_void->pkgnum } );
+ $info .= ' for '. $cust_pkg->pkg_label_long;
+}
my $unvoid = '';
if ( $cust_pay_void->closed !~ /^Y/i