summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main/payment_history')
-rw-r--r--httemplate/view/cust_main/payment_history/payment.html5
-rw-r--r--httemplate/view/cust_main/payment_history/pending_payment.html61
-rw-r--r--httemplate/view/cust_main/payment_history/voided_payment.html8
3 files changed, 3 insertions, 71 deletions
diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html
index e745864..6ec9fdb 100644
--- a/httemplate/view/cust_main/payment_history/payment.html
+++ b/httemplate/view/cust_main/payment_history/payment.html
@@ -155,14 +155,11 @@ my $view =
my $refund = '';
my $refund_days = $opt{'card_refund-days'} || 120;
-my @rights = ('Refund payment');
-push @rights, 'Refund credit card payment' if $payby eq 'CARD';
-push @rights, 'Refund Echeck payment' if $payby eq 'CHEK';
if ( $cust_pay->closed !~ /^Y/i
&& $cust_pay->payby =~ /^(CARD|CHEK)$/
&& time-$cust_pay->_date < $refund_days*86400
&& $cust_pay->unrefunded > 0
- && $curuser->access_right(\@rights)
+ && $curuser->access_right('Refund payment')
) {
$refund = qq! (<A HREF="${p}edit/cust_refund.cgi?payby=$1;!.
qq!paynum=!. $cust_pay->paynum. '"'.
diff --git a/httemplate/view/cust_main/payment_history/pending_payment.html b/httemplate/view/cust_main/payment_history/pending_payment.html
deleted file mode 100644
index 40805b1..0000000
--- a/httemplate/view/cust_main/payment_history/pending_payment.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<b><font size="+1" color="#FF0000">Pending payment </font></b> <% "$info $status ($link)" %>
-<%init>
-
-my( $cust_pay_pending, %opt ) = @_;
-
-my $conf = new FS::Conf;
-
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-my $payby = $cust_pay_pending->payby;
-
-my $payinfo;
-if ( $payby eq 'CARD' ) {
- $payinfo = $cust_pay_pending->paymask;
-} elsif ( $payby eq 'CHEK' ) {
- my( $account, $aba ) = split('@', $cust_pay_pending->paymask );
- $payinfo = "ABA $aba, Acct #$account";
-} else {
- $payinfo = $cust_pay_pending->payinfo;
-}
-
-my $target = "$payby$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$//;
-my $info = $payby ? "($payby$payinfo)" : '';
-
-my %statusaction = (
- 'new' => 'delete',
- 'pending' => 'complete',
- 'captured' => 'capture',
-);
-
-my $edit_pending =
- $FS::CurrentUser::CurrentUser->access_right('Edit customer pending payments');
-
-my $status = "Status: ".$cust_pay_pending->status;
-
-my $action = $statusaction{$cust_pay_pending->status};
-
-my $link = "";
-if ( $action && $edit_pending ) {
- $link = include('/elements/popup_link.html',
- 'action' => $p. 'edit/cust_pay_pending.html'.
- '?paypendingnum='. $cust_pay_pending->paypendingnum.
- ";action=$action",
- 'label' => $action,
- 'color' => '#ff0000',
- 'width' => 655,
- 'height' => ( $action eq 'delete' ? 480 : 575 ),
- 'actionlabel' => ucfirst($action). ' pending payment',
- );
-}
-
-</%init>
diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html
index 5d7f60c..be68ff0 100644
--- a/httemplate/view/cust_main/payment_history/voided_payment.html
+++ b/httemplate/view/cust_main/payment_history/voided_payment.html
@@ -1,10 +1,6 @@
-<DEL>Payment <% $info %> by <% $cust_pay_void->otaker %></DEL>
+<DEL>Payment <% $info %></DEL>
<I>voided <% time2str($date_format, $cust_pay_void->void_date) %>
-% my $void_user = $cust_pay_void->void_access_user;
-% if ($void_user) {
- by <% $void_user->username %></I>
-% }
-<% $unvoid %>
+by <% $cust_pay_void->otaker %></I><% $unvoid %>
<%init>
my( $cust_pay_void, %opt ) = @_;