X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fmsg_template.pm;h=cb13696a58c35c53fd92adacbb2b9ae51fd64c4d;hb=453d0509426c36f94868c06823327bb58871a763;hp=a2682eb84476596f96bc4c346d1842aec227cb12;hpb=7fe9f776655a9a7fc3b93b4f0e06c8b8193834b6;p=freeside.git diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index a2682eb84..cb13696a5 100644 --- a/FS/FS/msg_template.pm +++ b/FS/FS/msg_template.pm @@ -397,10 +397,7 @@ sub prepare { $from_addr = scalar( $conf->config($opt{'from_config'}, $cust_main->agentnum) ); } - $from_addr ||= $conf->config('invoice_from_name', $cust_main->agentnum) ? - $conf->config('invoice_from_name', $cust_main->agentnum) . ' <' . - $conf->config('invoice_from', $cust_main->agentnum) . '>' : - $conf->config('invoice_from', $cust_main->agentnum); + $from_addr ||= $conf->invoice_from_full($cust_main->agentnum); } # my @cust_msg = (); # if ( $conf->exists('log_sent_mail') and !$opt{'preview'} ) { @@ -465,9 +462,11 @@ sub render { # Graphics/stylesheets should probably go in /var/www on the Freeside # machine. + my $script_path = `/usr/bin/which freeside-wkhtmltopdf`; + chomp $script_path; my $kit = PDF::WebKit->new(\$html); #%options # hack to use our wrapper script - $kit->configure(sub { shift->wkhtmltopdf('freeside-wkhtmltopdf') }); + $kit->configure(sub { shift->wkhtmltopdf($script_path) }); $kit->to_pdf; } @@ -599,8 +598,9 @@ sub substitutions { _date _date_pretty due_date - due_date2str - )], + ), + [ due_date2str => sub { shift->due_date2str('short') } ], + ], #XXX not really thinking about cust_bill substitutions quite yet # for welcome and limit warning messages