% if ( ( $conf->exists('batch-enable') || $conf->config('batch-enable_payby') )
% && $curuser->access_right('View customer batched payments')
-% ) {
- View batched payments:
+% )
+% {
+ 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>
+ <BR>
% }
+%# pending payment links
+
+% if ( $curuser->access_right('View customer pending payments')
+% && scalar($cust_main->cust_pay_pending)
+% )
+% {
+ <A HREF="<% $p %>search/cust_pay_pending.html?magic=_date;statusNOT=done;custnum=<% $custnum %>">View pending payments</A><BR>
+% }
+
%# and now the table
<% include("/elements/table-grid.html") %>
%#display payment history
+%my $money_char = $conf->config('money_char') || '$';
+%
%sub balance_forward_row {
-% my( $b, $date ) = @_;
-% my $conf = new FS::Conf;
-% my $money_char = $conf->config('money_char') || '$';
+% my( $b, $date, $money_char ) = @_;
% ( my $balance_forward = $money_char. $b ) =~ s/^\$\-/- \$/;
<TR ID="balance_forward_row">
<TD CLASS="grid" BGCOLOR="#dddddd"></TD>
<TD CLASS="grid" BGCOLOR="#dddddd"></TD>
<TD CLASS="grid" BGCOLOR="#dddddd"></TD>
- <TD CLASS="grid" BGCOLOR="#dddddd"><I><% $balance_forward %></I></TD>
+ <TD CLASS="grid" BGCOLOR="#dddddd" ALIGN="right"><I><% $balance_forward %></I></TD>
</TR>
%}
%
%my $balance = 0;
%my %target = ();
-%my $money_char = $conf->config('money_char') || '$';
%
%my $years = $conf->config('payment_history-years') || 2;
%my $older_than = time - $years * 31556736; #60*60*24*365.24
% $display = '';
%
% if ( $hidden && ! $seen++ ) {
-% balance_forward_row($balance, $item->{'date'});
+% balance_forward_row($balance, $item->{'date'}, $money_char);
% }
%
% }
% }
%if ( scalar(@history) && $hidden && ! $seen++ ) {
-% balance_forward_row($balance, $lastdate);
+% balance_forward_row($balance, $lastdate, $money_char);
%}
</TABLE>