1 <DEL><% mt("Payment [_1] by [_2]", $info, $cust_pay_void->otaker ) |h %></DEL>
3 % my $void_user = $cust_pay_void->void_access_user;
5 by <% $void_user->username %>
7 % my $reason = $cust_pay_void->reason;
11 <% mt("on [_1]", time2str($date_format, $cust_pay_void->void_date) ) |h %>
16 my( $cust_pay_void, %opt ) = @_;
18 my $date_format = $opt{'date_format'} || '%m/%d/%Y';
20 my ($payby,$payinfo) = translate_payinfo($cust_pay_void);
21 $payby = translate_payby($payby,$payinfo);
22 my $info = $payby ? "($payby$payinfo)" : '';
24 if ( $opt{'pkg-balances'} && $cust_pay_void->pkgnum ) {
25 my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay_void->pkgnum } );
26 $info .= ' for '. $cust_pkg->pkg_label_long;
30 my $unvoidmsg = $cust_pay_void->payby =~ /^(CARD|CHEK)$/
31 ? ' ('.emt('do not send anything to the payment gateway') .')'
33 $unvoid = areyousure_link("${p}misc/unvoid-cust_pay_void.cgi?".$cust_pay_void->paynum,
34 emt('Are you sure you want to unvoid this payment?'),
35 emt('Unvoid this payment from the database') . $unvoidmsg,
38 if $cust_pay_void->closed !~ /^Y/i && $opt{'Unvoid payments'};