[freeside-commits] freeside/FS/FS cust_bill.pm, 1.168, 1.169 Conf.pm, 1.193, 1.194

Ivan,,, ivan at wavetail.420.am
Tue Apr 24 17:54:57 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv16401/FS/FS

Modified Files:
	cust_bill.pm Conf.pm 
Log Message:
add lpr-postscript_prefix and lpr-postscript_suffix config options for printer commands to place printer in postscript mode

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- Conf.pm	23 Apr 2007 03:41:29 -0000	1.193
+++ Conf.pm	25 Apr 2007 00:54:55 -0000	1.194
@@ -649,6 +649,20 @@
   },
 
   {
+    'key'         => 'lpr-postscript_prefix',
+    'section'     => 'billing',
+    'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'lpr-postscript_suffix',
+    'section'     => 'billing',
+    'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'money_char',
     'section'     => '',
     'description' => 'Currency symbol - defaults to `$\'',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- cust_bill.pm	23 Apr 2007 03:41:30 -0000	1.168
+++ cust_bill.pm	25 Apr 2007 00:54:54 -0000	1.169
@@ -2105,10 +2105,21 @@
   unlink("$lfile");
 
   my $ps = '';
+  
+  if ( $conf->exists('lpr-postscript_prefix') ) {
+    my $prefix = $conf->config('lpr-postscript_prefix');
+    $ps .= eval qq("$prefix");
+  }
+
   while (<POSTSCRIPT>) {
     $ps .= $_;
   }
 
+  if ( $conf->exists('lpr-postscript_suffix') ) {
+    my $suffix = $conf->config('lpr-postscript_suffix');
+    $ps .= eval qq("$suffix");
+  }
+
   close POSTSCRIPT;
 
   return $ps;



More information about the freeside-commits mailing list