ommitted file
[freeside.git] / httemplate / view / cust_main / payment_history.html
index a23ca9a..b2d98cc 100644 (file)
   <BR>
 % } 
 
+% if ( $conf->exists('batch-enable')
+%      #&& $curuser->access_right('View customer tax exemptions')
+%    ) { 
+  View batched payments:
+%   foreach my $status (qw( Queued In-transit Complete All )) {
+      <A HREF="<% $p %>search/cust_pay_batch.cgi?status=<% $status{$status} %>;custnum=<% $custnum %>"><% $status %></A> 
+      <% $status ne 'All' ? '|' : '' %>
+%   }
+  <BR>
+% } 
+
 %#get payment history
 %my @history = ();
 %
 %  $payby =~ s/^CHEK$/Electronic check /;
 %  $payby =~ s/^(CARD|COMP)$/$1 /;
 %
+%  my $delete = '';
+%  if ( $cust_refund->closed !~ /^Y/i
+%       && $conf->exists('deleterefunds')
+%       && $curuser->access_right('Delete refund')
+%     )
+%  {
+%    $delete = qq! (<A HREF="javascript:areyousure('!.
+%              qq!${p}misc/delete-cust_refund.cgi?!. $cust_refund->refundnum.
+%              qq!', 'Are you sure you want to delete this refund?')"!.
+%              qq! TITLE="Delete this refund from the database completely - not recommended"!.
+%              qq!>delete</A>)!;
+%  }
+%
 %  push @history, {
 %    'date'   => $cust_refund->_date,
-%    'desc'   => "Refund ($payby$payinfo) by ". $cust_refund->otaker,
+%    'desc'   => "Refund ($payby$payinfo) by ". $cust_refund->otaker. "<BR>".
+%                $delete,
 %    'refund' => $cust_refund->refund,
 %  };
 %
@@ -570,4 +595,11 @@ my @payby = grep /\w/, $conf->config('payby');
   unless @payby;
 my %payby = map { $_=>1 } @payby;
 
+my %status = (
+  'Queued'     => 'O', #Open
+  'In-transit' => 'I',
+  'Complete'   => 'R', #Resolved
+  'All'        => '',
+);
+
 </%init>