[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.87, 1.88
Ivan,,,
ivan at wavetail.420.am
Mon Jul 13 02:19:04 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv2255/FS/FS/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
fix self-service agent-specific logos
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- MyAccount.pm 2 Jul 2009 01:26:46 -0000 1.87
+++ MyAccount.pm 13 Jul 2009 09:19:02 -0000 1.88
@@ -654,7 +654,14 @@
#sessioning for this? how do we get the session id to the backend invoice
# template so it can add it to the link, blah
- my $templatename = $p->{'templatename'};
+ my $agentnum = '';
+ if ( $p->{'invnum'} ) {
+ my $cust_bill = qsearchs('cust_bill', { 'invnum' => $p->{'invnum'} } )
+ or return { 'error' => 'unknown invnum' };
+ $agentnum = $cust_bill->cust_main->agentnum;
+ }
+
+ my $templatename = $p->{'template'} || $p->{'templatename'};
#false laziness-ish w/view/cust_bill-logo.cgi
@@ -668,7 +675,7 @@
my $filename = "logo$templatename.png";
return { 'error' => '',
- 'logo' => $conf->config_binary($filename),
+ 'logo' => $conf->config_binary($filename, $agentnum),
'content_type' => 'image/png', #should allow gif, jpg too
};
}
More information about the freeside-commits
mailing list