X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=4d98f3ebc8fb53683a29d36ed6e816d8317a0cf1;hb=13481802b29a511fa0aa1d10e2ad463e362bf8ed;hp=6bc1568167223aaee2863988506f488d7d955723;hpb=8cbba53b09bb5b09355316b7ff8948500c3b4b76;p=freeside.git
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 6bc156816..4d98f3ebc 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,4 +1,4 @@
-
+
<%
#untaint invnum
@@ -20,10 +20,28 @@ print header('Invoice View', menubar(
print qq!Enter payments (check/cash) against this invoice | !
if $cust_bill->owed > 0;
-print qq!Reprint this invoice!.
-# "
(Printed $printed times)".
-#print cust_bill_events
- '
'. +print qq!Reprint this invoice!. '
'; + +my $conf = new FS::Conf; +if ( $conf->exists('invoice_latex') ) { + print menubar( + 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum", + ), '
'; +} + +#false laziness with search/cust_bill_event.cgi + +print table(). ''; +foreach my $cust_bill_event ( + sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event +) { + my $status = $cust_bill_event->status; + $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; + print ' Event Date Status '; +} +print ' '. $cust_bill_event->part_bill_event->event. ' '. + time2str("%a %b %e %T %Y", $cust_bill_event->_date). ' '. + $status. ' '; print $cust_bill->print_text;