freeside/FS/FS cust_bill.pm,1.128,1.129
Ivan Kohler
ivan at pouncequick.420.am
Wed Jun 8 23:56:35 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv29911/FS/FS
Modified Files:
cust_bill.pm
Log Message:
agent-specific logos for html invoices too
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- cust_bill.pm 9 Jun 2005 06:36:37 -0000 1.128
+++ cust_bill.pm 9 Jun 2005 06:56:31 -0000 1.129
@@ -414,10 +414,18 @@
$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',
- 'Path' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc/logo.png",
+ 'Path' => $file,
'Filename' => 'logo.png',
'Content-ID' => "<$content_id>",
;
@@ -1760,6 +1768,7 @@
'terms' => $conf->config('invoice_default_terms')
|| 'Payable upon receipt',
'cid' => $cid,
+ 'template' => $template,
# 'conf_dir' => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
);
More information about the freeside-commits
mailing list