X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMisc.pm;h=5e89abc0c6e08dd031265a0d58c3f595f910d31d;hb=fc8d730d0a7b31b617c963c5619bd3f45c5c3eb6;hp=6f6f2e2e5f3401efba60f2c579de90be8b4cf66a;hpb=94db42b47263cf72ce248da59898f82a1364b0fa;p=freeside.git diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm index 6f6f2e2e5..5e89abc0c 100644 --- a/FS/FS/Misc.pm +++ b/FS/FS/Misc.pm @@ -274,6 +274,7 @@ sub send_email { }); $cust_msg->insert; # ignore errors } + $error; } @@ -375,7 +376,7 @@ sub generate_email { ' '. encode_entities($return{'subject'}), ' ', ' ', - ' ', + ' ', @html_data, ' ', '', @@ -799,16 +800,32 @@ sub _pslatex { } -=item print ARRAYREF +=item do_print ARRAYREF [, OPTION => VALUE ... ] Sends the lines in ARRAYREF to the printer. +Options available are: + +=over 4 + +=item agentnum + +Uses this agent's 'lpr' configuration setting override instead of the global +value. + +=item lpr + +Uses this command instead of the configured lpr command (overrides both the +global value and agentnum). + =cut sub do_print { - my $data = shift; + my( $data, %opt ) = @_; - my $lpr = $conf->config('lpr'); + my $lpr = ( exists($opt{'lpr'}) && $opt{'lpr'} ) + ? $opt{'lpr'} + : $conf->config('lpr', $opt{'agentnum'} ); my $outerr = ''; run3 $lpr, $data, \$outerr, \$outerr;