X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_credit_bill.html;h=be43e9235828033832431e463acbdedb0ac2edee;hb=3eb9352aabb1e04711bd233fbeed468fe3736aa0;hp=7f9eb788738115b703ba2550566bbaf40ede26c8;hpb=5fdd19665fb7c0ad425a99d3dbf9ad7e27fbf44a;p=freeside.git diff --git a/httemplate/search/cust_credit_bill.html b/httemplate/search/cust_credit_bill.html index 7f9eb7887..be43e9235 100644 --- a/httemplate/search/cust_credit_bill.html +++ b/httemplate/search/cust_credit_bill.html @@ -1,4 +1,4 @@ -<% include( 'elements/search.html', +<& elements/search.html, 'title' => $title, 'name' => 'net credits', 'query' => $sql_query, @@ -64,8 +64,8 @@ '', FS::UI::Web::cust_styles(), ], - ) -%> + +&> <%init> die "access denied" @@ -85,6 +85,13 @@ if ( $cgi->param('agentnum') && $cgi->param('agentnum') =~ /^(\d+)$/ ) { $title = $agent->agent. " $title"; } +if ( $cgi->param('refnum') && $cgi->param('refnum') =~ /^(\d+)$/ ) { + push @search, "refnum = $1"; + my $part_referral = qsearchs('part_referral', { 'refnum' => $1 } ); + die "unknown refnum $1" unless $part_referral; + $title = $part_referral->referral. " $title"; +} + my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi); push @search, "cust_bill._date >= $beginning ", "cust_bill._date <= $ending";