summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-08-15 16:59:05 -0700
committerMark Wells <mark@freeside.biz>2013-08-15 16:59:05 -0700
commit8f47076c27dd065fa130fd6b1af7dd90c2125d5f (patch)
treecafdc08b3e4208c00a30c6bb79680df5989ab682 /httemplate
parent7a51c5cf922048cf1478920b3fec496e0bb26aef (diff)
capture B:OP and B:BP failure_status values from payment attempts, #21117
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_pay_batch.cgi4
-rwxr-xr-xhttemplate/search/cust_pay_pending.html3
-rw-r--r--httemplate/view/cust_main/payment_history/attempted_batch_payment.html11
-rw-r--r--httemplate/view/cust_main/payment_history/attempted_payment.html12
4 files changed, 24 insertions, 6 deletions
diff --git a/httemplate/search/cust_pay_batch.cgi b/httemplate/search/cust_pay_batch.cgi
index 9f9eb30ce..d5fe52ba5 100755
--- a/httemplate/search/cust_pay_batch.cgi
+++ b/httemplate/search/cust_pay_batch.cgi
@@ -30,10 +30,10 @@
sub {
sprintf('%.02f', $_[0]->amount)
},
- 'status',
+ sub { $_[0]->display_status },
'error_message',
],
- 'align' => 'rrrlllcrll',
+ 'align' => 'rrrlllcrlll',
'links' => [ '',
["${p}view/cust_bill.cgi?", 'invnum'],
(["${p}view/cust_main.cgi?", 'custnum']) x 2,
diff --git a/httemplate/search/cust_pay_pending.html b/httemplate/search/cust_pay_pending.html
index 54c9935ef..fe82268f6 100755
--- a/httemplate/search/cust_pay_pending.html
+++ b/httemplate/search/cust_pay_pending.html
@@ -28,6 +28,9 @@ my $edit_pending =
my $status_sub = sub {
my $pending = shift;
my $return = $pending->status;
+ if ( $pending->failure_status ) {
+ $return = $pending->display_status;
+ }
my $action = $statusaction{$pending->status};
return $return unless $action && $edit_pending;
my $link = include('/elements/popup_link.html',
diff --git a/httemplate/view/cust_main/payment_history/attempted_batch_payment.html b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
index 95947f512..765e54281 100644
--- a/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
+++ b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
@@ -7,7 +7,14 @@ my ($payby,$payinfo) = translate_payinfo($cust_pay_batch);
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
-$info .= ': '. $cust_pay_batch->error_message
- if length($cust_pay_batch->error_message);
+my $detail = '';
+if ( $cust_pay_batch->failure_status ) {
+ $detail = $cust_pay_batch->display_status;
+ $detail .= ' ('.$cust_pay_batch->error_message.')'
+ if $cust_pay_batch->error_message;
+} else {
+ $detail = $cust_pay_batch->error_message;
+}
+$info .= ': '.$detail if length($detail);
</%init>
diff --git a/httemplate/view/cust_main/payment_history/attempted_payment.html b/httemplate/view/cust_main/payment_history/attempted_payment.html
index f044fc0d4..63209c7c7 100644
--- a/httemplate/view/cust_main/payment_history/attempted_payment.html
+++ b/httemplate/view/cust_main/payment_history/attempted_payment.html
@@ -12,7 +12,15 @@ if ( $opt{'pkg-balances'} && $cust_pay_pending->pkgnum ) {
$info .= ' for '. $cust_pkg->pkg_label_long;
}
-$info .= ': '. $cust_pay_pending->statustext
- if length($cust_pay_pending->statustext);
+my $detail = '';
+if ( $cust_pay_pending->failure_status ) {
+ $detail = $cust_pay_pending->display_status;
+ $detail .= ' (' . $cust_pay_pending->statustext . ')'
+ if $cust_pay_pending->statustext;
+} else {
+ $detail = $cust_pay_pending->statustext;
+}
+
+$info .= ': '.$detail if length($detail);
</%init>