summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/docs/billing.html9
-rwxr-xr-xhttemplate/view/cust_bill.cgi10
2 files changed, 15 insertions, 4 deletions
diff --git a/httemplate/docs/billing.html b/httemplate/docs/billing.html
index 7097fda24..adaac17dc 100644
--- a/httemplate/docs/billing.html
+++ b/httemplate/docs/billing.html
@@ -14,7 +14,7 @@
<ul>
<li>Install teTeX and Ghostscript (included with most distributions).
<li>Place your logo in EPS (Encapsulated PostScript) format with size 90pt X 36pt (<code>epsffit -c 0 0 90 33 yourlogo.eps &gt;logo.eps</code>) at <code>/usr/local/etc/freeside/conf.<i>your_datasrc</i>/logo.eps</code>.
- <li>Edit the <b>invoice_latexfooter</b>, <b>invoice_latexnotes</b>, and <b>invoice_latexsmallfooter</b> configuration files. If you are adventurous, edit <b>invoice_latex</b> as well.
+ <li>Edit the <b>invoice_latexreturnaddress</b>, <b>invoice_latexfooter</b>, <b>invoice_latexnotes</b>, and <b>invoice_latexsmallfooter</b> configuration options. If you are adventurous, edit <b>invoice_latex</b> as well.
</ul>
<li>Plaintext invoice templates
<ul>
@@ -30,6 +30,13 @@
<!-- <li>$overdue - true if this invoice is overdue -->
</ul>
</ul>
+ <li>HTML invoice templates
+ <ul>
+ <li>Place your logo in PNG format at <code>/usr/local/etc/freeside/conf.<i>your_datasrc</i>/logo.png</code>.
+ <li>HTML invoices also use <a href="http://search.cpan.org/~mjd/Text-Template/lib/Text/Template.pm">Text::Template</a>.
+ <li>Edit the <b>invoice_html</b> configuration option.
+ <li>The following configuration options can be set to override the default behaviour of using the invoice_latex* data: <b>invoice_htmlreturnaddress</b>, and <b>invoice_htmlfooter</b>, <b>invoice_htmlnotes</b>.
+ </ul>
<!-- <li>Batch credit card processing
<ul>
<li>After <a href="man/bin/freeside-daily.html"><b>freeside-daily</b></a> is run, a credit card batch will be in the <a href="schema.html#cust_pay_batch">cust_pay_batch</a> table. Export this table to your credit card batching.
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index c217cc389..5dd8a8d71 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -62,7 +62,7 @@ unless ( $templatename ) {
) {
my $templatename = $1;
print qq! ( <A HREF="${p}view/cust_bill.cgi?$templatename-$invnum">!.
- 'view text</A> | '.
+ 'view</A> | '.
qq!<A HREF="${p}view/cust_bill-pdf.cgi?$templatename-$invnum.pdf">!.
'view typeset</A> )';
}
@@ -74,11 +74,15 @@ unless ( $templatename ) {
print '</TABLE><BR>';
}
-print '<PRE>', $cust_bill->print_text('', $templatename);
+if ( $conf->exists('invoice_html') ) {
+ print $cust_bill->print_html('', $templatename);
+} else {
+ print '<PRE>', $cust_bill->print_text('', $templatename), '</PRE>';
+}
#formatting
print <<END;
- </PRE></FONT>
+ </FONT>
</BODY>
</HTML>
END