quick list of area codes and a kludge to print DA numbers for all of them
[freeside.git] / httemplate / search / report_receivables.cgi
index 3e50006..58d87fa 100755 (executable)
@@ -127,7 +127,13 @@ my $count_sql = "select count(*) from cust_main $where";
 my $sql_query = {
   'table'     => 'cust_main',
   'hashref'   => {},
-  'select'    => "*, $owed_cols, $packages_cols",
+  'select'    => join(',',
+                   #'cust_main.*',
+                   'custnum',
+                   $owed_cols,
+                   $packages_cols,
+                   FS::UI::Web::cust_sql_fields(),
+                 ),
   'extra_sql' => $where,
   'order_by'  => "order by coalesce(lower(company), ''), lower(last)",
 };
@@ -174,7 +180,7 @@ sub balance {
   $start = $start ? "( $str2time now() $closing - ".($start * 86400). ' )' : '';
   $end   = $end   ? "( $str2time now() $closing - ".($end   * 86400). ' )' : '';
 
-  #$opt{'unapplied_date'} = 1;
+  $opt{'unapplied_date'} = 1;
 
   ( $opt{sum} ? 'SUM( ' : '' ). 
   FS::cust_main->balance_date_sql( $start, $end, %opt ).