summaryrefslogtreecommitdiff
path: root/fs_selfservice/FS-SelfService
diff options
context:
space:
mode:
authorivan <ivan>2009-07-13 09:19:02 +0000
committerivan <ivan>2009-07-13 09:19:02 +0000
commitff27089dd05a3d9ff0b0b9898d7104d18c0174ac (patch)
tree920c3c72c2c035a6182c15a6c193c826995ddb39 /fs_selfservice/FS-SelfService
parentb0137008c06198cbb14f42804d33c31de5e3c6c2 (diff)
fix self-service agent-specific logos
Diffstat (limited to 'fs_selfservice/FS-SelfService')
-rw-r--r--fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi
index 5f344a32e..253f853f8 100644
--- a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi
+++ b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi
@@ -7,10 +7,16 @@ use FS::SelfService qw( invoice_logo );
my $cgi = new CGI;
-my($query) = $cgi->keywords;
-$query =~ /^([^\.\/]*)$/ or '' =~ /^()$/;
-my $templatename = $1;
-my $hashref = invoice_logo('templatename' => $templatename);
+my %hash = ();
+if ( $cgi->param('invnum') ) {
+ $hash{$_} = scalar($cgi->param($_)) foreach qw( invnum template );
+} else {
+ my($query) = $cgi->keywords;
+ $query =~ /^([^\.\/]*)$/ or '' =~ /^()$/;
+ $hash{'template'} = $1;
+}
+
+my $hashref = invoice_logo(%hash);
print $cgi->header( '-type' => $hashref->{'content_type'},
'-expires' => 'now',