<% mt('Payment attempt') |h %> <% $info |h %> <%init> my( $cust_pay_pending, %opt ) = @_; my ($payby,$payinfo) = translate_payinfo($cust_pay_pending); $payby = translate_payby($payby,$payinfo); my $info = $payby ? "($payby$payinfo)" : ''; if ( $opt{'pkg-balances'} && $cust_pay_pending->pkgnum ) { my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum'=>$cust_pay_pending->pkgnum } ); $info .= ' for '. $cust_pkg->pkg_label_long; } 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);