diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 14 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 93ecf30c7..b54d6f54f 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -649,6 +649,20 @@ httemplate/docs/config.html }, { + '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 `$\'', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 877d364e8..3af0c54a8 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2105,10 +2105,21 @@ sub print_ps { 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; |