$owed_cols =~
s/cust_bill\.custnum/cust_bill.custnum AND cust_main.agentnum = '$agentnum'/g;
}
- my $total_sql = "select $owed_cols";
+ my $total_sql = "select $owed_cols from cust_main";
my $total_sth = dbh->prepare($total_sql) or die dbh->errstr;
$total_sth->execute or die $total_sth->errstr;
my $row = $total_sth->fetchrow_hashref();
my $align = join('', map { /#/ ? 'r' : 'l' } FS::UI::Web::cust_header() ).
'crrrrr';
+ my $clink = [ "${p}view/cust_main.cgi?", 'custnum' ];
+
%><%= include( 'elements/search.html',
'title' => 'Accounts Receivable Aging Summary',
'name' => 'customers',
shift->get('owed_total') ) },
],
'links' => [
- [ "${p}view/cust_main.cgi?", 'custnum' ],
- [ "${p}view/cust_main.cgi?", 'custnum' ],
+ ( map $clink, FS::UI::Web::cust_header() ),
'',
#'',
'',