X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill-logo.cgi;h=d55ec041ebf1a0bba7b0da0c7ba60c2dc74f2e7c;hb=822645aade15a4c4ac0558b116f7aacf9491002c;hp=ad2ff5430937d586e041e487e2c3ebbb7e5d5caa;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi index ad2ff5430..d55ec041e 100755 --- a/httemplate/view/cust_bill-logo.cgi +++ b/httemplate/view/cust_bill-logo.cgi @@ -5,7 +5,7 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('View invoices') or $FS::CurrentUser::CurrentUser->access_right('Configuration'); -my $conf = new FS::Conf; +my $conf; my $templatename; my $agentnum = ''; @@ -13,8 +13,11 @@ if ( $cgi->param('invnum') ) { $templatename = $cgi->param('template') || $cgi->param('templatename'); my $cust_bill = qsearchs('cust_bill', { 'invnum' => $cgi->param('invnum') } ) or die 'unknown invnum'; + $conf = $cust_bill->conf; $agentnum = $cust_bill->cust_main->agentnum; } else { + # assume the default config + $conf = FS::Conf->new; my($query) = $cgi->keywords; $query =~ /^([^\.\/]*)$/ or die 'illegal query'; $templatename = $1;