[freeside-commits] branch master updated. 2b62f0042d6e9eb004372bc25c5ea281f0cb8d5b
Mark Wells
mark at 420.am
Fri Feb 1 08:53:55 PST 2013
The branch, master has been updated
via 2b62f0042d6e9eb004372bc25c5ea281f0cb8d5b (commit)
from eb26deab89a94f5ba7a2d21fa2a5a98cb7bb8885 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2b62f0042d6e9eb004372bc25c5ea281f0cb8d5b
Author: Mark Wells <mark at freeside.biz>
Date: Fri Feb 1 08:34:26 2013 -0800
show declined batch payments in customer display, #21117
diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index 8745cac..7701cb6 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -501,6 +501,17 @@ foreach my $cust_pay_pending ($cust_main->cust_pay_pending_attempt) {
#'target' => $target, #XXX
};
}
+#declined batch payments
+foreach my $cust_pay_batch (
+ $cust_main->cust_pay_batch(hashref => {status => 'Declined'})
+) {
+ my $pay_batch = $cust_pay_batch->pay_batch;
+ push @history, {
+ 'date' => $pay_batch->upload,
+ 'desc' => include('payment_history/attempted_batch_payment.html', $cust_pay_batch, %opt),
+ 'void_payment' => $cust_pay_batch->amount,
+ };
+}
#credits (some false laziness w/payments)
foreach my $cust_credit ($cust_main->cust_credit) {
diff --git a/httemplate/view/cust_main/payment_history/attempted_batch_payment.html b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
new file mode 100644
index 0000000..95947f5
--- /dev/null
+++ b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
@@ -0,0 +1,13 @@
+<I><% mt('Payment attempt') |h %> <% $info |h %></I>
+<%init>
+
+my( $cust_pay_batch, %opt ) = @_;
+
+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);
+
+</%init>
-----------------------------------------------------------------------
Summary of changes:
httemplate/view/cust_main/payment_history.html | 11 +++++++++++
.../payment_history/attempted_batch_payment.html | 13 +++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
create mode 100644 httemplate/view/cust_main/payment_history/attempted_batch_payment.html
More information about the freeside-commits
mailing list