-my $balance_sql = FS::cust_main->balance_sql();
-
-push @where, map { s/current_balance/$balance_sql/; $_ }
- FS::UI::Web::parse_lt_gt($cgi, 'current_balance');
-
-##
-# setup queries, subs, etc. for the search
-##
-
-$orderby ||= 'ORDER BY custnum';
-
-# here is the agent virtualization
-push @where, $FS::CurrentUser::CurrentUser->agentnums_sql;
-
-my $extra_sql = scalar(@where) ? ' WHERE '. join(' AND ', @where) : '';
+$search_hash{'current_balance'} =
+ [ FS::UI::Web::parse_lt_gt($cgi, 'current_balance') ];