RT#37064: Add action link to manually refund a payment
[freeside.git] / httemplate / view / cust_main / payment_history.html
index fcc4470..1cd8386 100644 (file)
   <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline/POS) credit card payment') |h %></A>
 % } 
 
+% if ( $payby{'MCRD'} && $curuser->access_right('Post payment') ) { 
+  <% $s++ ? ' | ' : '' %>
+  <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCHK;custnum=<% $custnum %>"><% mt('Post manual (offline) electronic check payment') |h %></A>
+% } 
+
 <% $s ? '<BR>' : '' %>
 
 %# credit links
   <A HREF="<% $p %>edit/cust_refund.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline/POS) credit card refund') |h %></A>
 % } 
 
+% if ( $payby{'MCHK'} && $curuser->access_right('Post refund') ) { 
+  <% $s++ ? ' | ' : '' %>
+  <A HREF="<% $p %>edit/cust_refund.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline) electronic check refund') |h %></A>
+% } 
+
     </TD>
     <TD ALIGN="right" VALIGN="top">
 
 %# invoice reports, combined statement
 % if ( $curuser->access_right('List invoices') ) { 
-%   if ( $num_cust_bill > 0 ) {
-  <A HREF="<% $p %>view/cust_main_statement-pdf.cgi?<% $custnum %>"><%
-  mt('Download typeset statement PDF') |h %></A>
+%   if ( $curuser->access_right('Resend invoices')
+%          && $cust_main->invoicing_list_emailonly ) {
+
+  <A HREF="<% $p %>misc/email-customer-statement.html?table=cust_main;agent_virt_agentnum=<% $cust_main->agentnum %>;custnum=<% $custnum %>"><% mt('Email statement to this customer') |h %></A>
   <BR>
+
+%   }
+%   if ( $num_cust_bill > 0
+%          && $curuser->access_right('View legacy typeset statements')
+%   ) {
+      <A HREF="<% $p %>view/cust_main_statement-pdf.cgi?<% $custnum %>"><%
+      mt('Download typeset statement PDF') |h %></A>
+      <BR>
 %   }
   <A HREF="<% $p %>search/report_cust_bill.html?custnum=<% $custnum %>"><% mt('Invoice reports') |h %></A>
 % } 
@@ -413,9 +432,10 @@ my %opt = (
       (
         'View invoices', 'Void invoices', 'Unvoid invoices', 'Delete invoices',
         'Apply payment', 'Refund credit card payment', 'Refund Echeck payment',
+        'Post refund', 'Post check refund', 'Post cash refund ', 'Refund payment',
         'Credit card void', 'Echeck void', 'Void payments', 'Unvoid payments',
         'Delete payment', 'Unapply payment',
-        'Apply credit', 'Delete credit', 'Unapply credit',
+        'Apply credit', 'Delete credit', 'Unapply credit', 'Void credit', 'Unvoid credit',
         'Delete refund',
         'Billing event reports', 'View customer billing events',
       )