X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fpayment.html;fp=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fpayment.html;h=7df16cf875ed90e7da566dc09ffb1a3e26bcf502;hb=d21d7864c1f1bc4fed05a01c0b037628a4ca5b99;hp=61486518ee5bea19910196fb4786f6361fa0e1ce;hpb=170aa1e8078280e7c03a6ebfc67280de66fa1b9d;p=freeside.git
diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html
index 61486518e..7df16cf87 100644
--- a/httemplate/view/cust_main/payment_history/payment.html
+++ b/httemplate/view/cust_main/payment_history/payment.html
@@ -169,7 +169,15 @@ if ( $cust_pay->closed !~ /^Y/i
}
my $void = '';
-if ( $cust_pay->closed !~ /^Y/i
+my $voidmsg = $cust_pay->payby =~ /^(CARD|CHEK)$/
+ ? ' (' . mt('do not send anything to the payment gateway').')'
+ : '';
+$void = areyousure_link("${p}misc/void-cust_pay.cgi?".$cust_pay->paynum,
+ mt('Are you sure you want to void this payment?'),
+ mt('Void this payment from the database') . $voidmsg,
+ mt('void')
+ )
+ if ( $cust_pay->closed !~ /^Y/i
&& ( ( $cust_pay->payby eq 'CARD'
&& $curuser->access_right('Credit card void')
)
@@ -180,43 +188,24 @@ if ( $cust_pay->closed !~ /^Y/i
&& $curuser->access_right('Regular void')
)
)
- )
-{
- $void = qq! (void)!;
-}
+ );
my $delete = '';
-if ( $cust_pay->closed !~ /^Y/i
- && $opt{'deletepayments'}
- && $curuser->access_right('Delete payment')
- )
-{
- $delete = qq! (delete)!;
-}
+$delete = areyousure_link("${p}misc/delete-cust_pay.cgi?".$cust_pay->paynum,
+ mt('Are you sure you want to delete this payment?'),
+ mt('Delete this payment from the database completely - not recommended'),
+ mt('delete')
+ )
+ if ( $cust_pay->closed !~ /^Y/i && $opt{'deletepayments'}
+ && $curuser->access_right('Delete payment') );
my $unapply = '';
-if ( $cust_pay->closed !~ /^Y/i
- && scalar(@cust_bill_pay)
- && $curuser->access_right('Unapply payment')
- )
-{
- $unapply = qq! (unapply)!;
-}
+$unapply = areyousure_link("${p}misc/unapply-cust_pay.cgi?".$cust_pay->paynum,
+ mt('Are you sure you want to unapply this payment?'),
+ mt('Keep this payment, but dissociate it from the invoices it is currently applied against'),
+ mt('unapply')
+ )
+ if ( $cust_pay->closed !~ /^Y/i && scalar(@cust_bill_pay)
+ && $curuser->access_right('Unapply payment') );
%init>