'cust_main' => $cust_main,
'actionlabel' => emt('Enter check payment'),
'width' => 392,
+ 'height' => 392,
&>
% }
'cust_main' => $cust_main,
'actionlabel' => emt('Enter cash payment'),
'width' => 392,
+ 'height' => 392,
&>
% }
</TD>
<TD ALIGN="right" VALIGN="top">
-%# invoice reports
+%# invoice reports, combined statement
% if ( $curuser->access_right('List invoices') ) {
+% if ( $conf->exists('cust_main-print_statement_link')
+% and $num_cust_bill > 0 ) {
+ <A HREF="<% $p %>view/cust_main_statement-pdf.cgi?<% $custnum %>"><%
+ mt('Print a current statement') |h %></A>
+ <BR>
+% }
<A HREF="<% $p %>search/report_cust_bill.html?custnum=<% $custnum %>"><% mt('Invoice reports') |h %></A>
% }
<BR>
%
% my $charge = exists($item->{'charge'})
% ? sprintf("$money_char\%.2f", $item->{'charge'})
-% : '';
+% : exists($item->{'charge_nobal'})
+% ? sprintf("$money_char\%.2f", $item->{'charge_nobal'})
+% : '';
%
% my $payment = exists($item->{'payment'})
% ? sprintf("- $money_char\%.2f", $item->{'payment'})
)
);
+$opt{'date_format'} ||= '%m/%d/%Y';
+
+#legacy invoices
+foreach my $legacy_cust_bill ($cust_main->legacy_cust_bill) {
+ push @history, {
+ 'date' => $legacy_cust_bill->_date,
+ 'desc' => include('payment_history/legacy_invoice.html', $legacy_cust_bill, %opt ),
+ 'charge_nobal' => $legacy_cust_bill->charged,
+ };
+}
+
#invoices
+my $num_cust_bill = 0;
foreach my $cust_bill ($cust_main->cust_bill) {
push @history, {
'date' => $cust_bill->_date,
'desc' => include('payment_history/invoice.html', $cust_bill, %opt ),
'charge' => $cust_bill->charged,
};
+ $num_cust_bill++;
}
#statements