add option to save temporary invoice typesetting files to help diagnose kc online...
authorivan <ivan>
Wed, 21 Sep 2011 01:50:18 +0000 (01:50 +0000)
committerivan <ivan>
Wed, 21 Sep 2011 01:50:18 +0000 (01:50 +0000)
FS/FS/Misc.pm
httemplate/pref/pref-process.html
httemplate/pref/pref.html

index 6f6f2e2..3cc920f 100644 (file)
@@ -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>) {
index 974b96d..588921f 100644 (file)
@@ -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
                     );
 
index 8fd1eaa..947ddcc 100644 (file)
@@ -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>