X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=5dd8a8d71ecdf5a0857f33210256460f71e97294;hp=34f533196d57dbea008dbd761e83453ceac6683a;hb=3081639bd119c6d281ef23139649b2e73ba62754;hpb=b0511ff939fe1622503ac8e53333fabb1ad9bd37 diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 34f533196..5dd8a8d71 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -7,6 +7,8 @@ $query =~ /^((.+)-)?(\d+)$/; my $templatename = $2; my $invnum = $3; +my $conf = new FS::Conf; + my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; my $custnum = $cust_bill->getfield('custnum'); @@ -27,9 +29,11 @@ if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { qq!Re-email this invoice!; } +print qq! | Refax this invoice! + if ($conf->exists('hylafax')); + print '

'; -my $conf = new FS::Conf; if ( $conf->exists('invoice_latex') ) { my $link = "${p}view/cust_bill-pdf.cgi?"; $link .= "$templatename-" if $templatename; @@ -47,7 +51,7 @@ unless ( $templatename ) { sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event ) { my $status = $cust_bill_event->status; - $status .= ': '. $cust_bill_event->statustext + $status .= ': '. encode_entities($cust_bill_event->statustext) if $cust_bill_event->statustext; my $part_bill_event = $cust_bill_event->part_bill_event; print ''. $part_bill_event->event; @@ -58,7 +62,7 @@ unless ( $templatename ) { ) { my $templatename = $1; print qq! ( !. - 'view text | '. + 'view | '. qq!!. 'view typeset )'; } @@ -70,11 +74,15 @@ unless ( $templatename ) { print '
'; } -print '
', $cust_bill->print_text('', $templatename);
+if ( $conf->exists('invoice_html') ) {
+  print $cust_bill->print_html('', $templatename);
+} else {
+  print '
', $cust_bill->print_text('', $templatename), '
'; +} #formatting print < + END