X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=5dd8a8d71ecdf5a0857f33210256460f71e97294;hp=ca0612d09cd0adacc2697f44b2967bba1dbcc091;hb=3081639bd119c6d281ef23139649b2e73ba62754;hpb=f7e1a877f69a8a144fc2da7a422c4e3f728321cb
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index ca0612d09..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;
@@ -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 <+