summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-09-21 01:50:18 +0000
committerivan <ivan>2011-09-21 01:50:18 +0000
commit8afce93f57d2226835ee9225dede24b13e505655 (patch)
tree563a5654282777b0acbcb49a1d7649c0c3c0c800
parentb278e5d654ee0e1a429fa6177e69c8ab793181bb (diff)
add option to save temporary invoice typesetting files to help diagnose kc online's weird coupon problem
-rw-r--r--FS/FS/Misc.pm6
-rw-r--r--httemplate/pref/pref-process.html2
-rw-r--r--httemplate/pref/pref.html4
3 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm
index 6f6f2e2e5..3cc920f3b 100644
--- a/FS/FS/Misc.pm
+++ b/FS/FS/Misc.pm
@@ -698,7 +698,8 @@ sub generate_ps {
open(POSTSCRIPT, "<$file.ps")
or die "can't open $file.ps: $! (error in LaTeX template?)\n";
- unlink("$file.dvi", "$file.log", "$file.aux", "$file.ps", "$file.tex");
+ unlink("$file.dvi", "$file.log", "$file.aux", "$file.ps", "$file.tex")
+ unless $FS::CurrentUser::CurrentUser->option('save_tmp_typesetting');
my $ps = '';
@@ -756,7 +757,8 @@ sub generate_pdf {
open(PDF, "<$file.pdf")
or die "can't open $file.pdf: $! (error in LaTeX template?)\n";
- unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex");
+ unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex")
+ unless $FS::CurrentUser::CurrentUser->option('save_tmp_typesetting');
my $pdf = '';
while (<PDF>) {
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index 974b96dc2..588921f45 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -55,7 +55,7 @@ unless ( $error ) { # if ($access_user) {
vonage-fromnumber vonage-username vonage-password
cust_pkg-display_times
show_pkgnum show_confitem_counts export_getsettings
- show_db_profile save_db_profile
+ show_db_profile save_db_profile save_tmp_typesetting
height width availHeight availWidth colorDepth
);
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 8fd1eaa73..947ddccd3 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -128,6 +128,10 @@ Development
<TH>Save database profiling logs (when available): </TH>
<TD><INPUT TYPE="checkbox" NAME="save_db_profile" VALUE="1" <% $curuser->option('save_db_profile') ? 'CHECKED' : '' %>></TD>
</TR>
+ <TR>
+ <TH>Save temporary invoice typesetting files: </TH>
+ <TD><INPUT TYPE="checkbox" NAME="save_tmp_typesetting" VALUE="1" <% $curuser->option('save_tmp_typesetting') ? 'CHECKED' : '' %>></TD>
+ </TR>
</TABLE>
<BR>