summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-02-11 23:25:30 -0800
committerIvan Kohler <ivan@freeside.biz>2014-02-11 23:25:30 -0800
commit6a9d67e128bbcd6a32ef806c8bed10faab535ab5 (patch)
tree7076d49fc602ce27818d04a000e7c103777dd5f9
parent86c592adf680559e167f0aed340038fa57df5922 (diff)
add ;plaintext=1 to view a plaintext invoice for debugging
-rw-r--r--httemplate/elements/freeside.css4
-rwxr-xr-xhttemplate/view/cust_bill.cgi4
2 files changed, 6 insertions, 2 deletions
diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css
index 82eb9b562..3933e9d6e 100644
--- a/httemplate/elements/freeside.css
+++ b/httemplate/elements/freeside.css
@@ -3,6 +3,10 @@
/* font-family: Verdana, Arial, Helvetica, sans-serif; */
}
+pre {
+ font-family: monospace;
+}
+
A:link IMG, A:visited { border-style: none }
/* A:focus {text-decoration: underline } */
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 4822ab718..344030404 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -135,10 +135,10 @@ function change_invoice_mode(obj) {
<% $br ? '<BR><BR>' : '' %>
-% if ( $conf->exists('invoice_html') ) {
+% if ( $conf->exists('invoice_html') && ! $cgi->param('plaintext') ) {
<% join('', $cust_bill->print_html(\%opt) ) %>
% } else {
- <PRE><% join('', $cust_bill->print_text(\%opt) ) %></PRE>
+ <PRE><% join('', $cust_bill->print_text(\%opt) ) |h %></PRE>
% }
<& /elements/footer.html &>