projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
agent-specific logos for html invoices too
[freeside.git]
/
FS
/
FS
/
cust_bill.pm
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
a603310
..
7d10411
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-414,10
+414,18
@@
sub generate_email {
$args{'from'} =~ /\@([\w\.\-]+)/ or $1 = 'example.com';
my $content_id = join('.', rand()*(2**32), $$, time). "\@$1";
$args{'from'} =~ /\@([\w\.\-]+)/ or $1 = 'example.com';
my $content_id = join('.', rand()*(2**32), $$, time). "\@$1";
+ my $path = "$FS::UID::conf_dir/conf.$FS::UID::datasrc";
+ my $file;
+ if ( [ -e "$path/logo_". $args{'_template'}. ".png" ] ) {
+ $file = "$path/logo_". $args{'_template'}. ".png";
+ } else {
+ $file = "$path/logo.png";
+ }
+
my $image = build MIME::Entity
'Type' => 'image/png',
'Encoding' => 'base64',
my $image = build MIME::Entity
'Type' => 'image/png',
'Encoding' => 'base64',
- 'Path' =>
"$FS::UID::conf_dir/conf.$FS::UID::datasrc/logo.png"
,
+ 'Path' =>
$file
,
'Filename' => 'logo.png',
'Content-ID' => "<$content_id>",
;
'Filename' => 'logo.png',
'Content-ID' => "<$content_id>",
;
@@
-1760,6
+1768,7
@@
sub print_html {
'terms' => $conf->config('invoice_default_terms')
|| 'Payable upon receipt',
'cid' => $cid,
'terms' => $conf->config('invoice_default_terms')
|| 'Payable upon receipt',
'cid' => $cid,
+ 'template' => $template,
# 'conf_dir' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
);
# 'conf_dir' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
);