1 <& elements/cust_main_dayranges.html,
2 'title' => emt('Accounts Receivable Aging Summary'),
3 'range_sub' => \&balance,
5 'email_checkboxes' => 1,
10 unless $FS::CurrentUser::CurrentUser->access_right('Receivables report')
11 or $FS::CurrentUser::CurrentUser->access_right('Financial reports');
18 # my $balance = balance(
19 # $start, $end, $offset,
20 # 'no_as' => 1, #set to true when using in a WHERE clause (supress AS clause)
21 # #or 0 / omit when using in a SELECT clause as a column
22 # # ("AS balance_$start_$end")
23 # 'sum' => 1, #set to true to get a SUM() of the values, for totals
25 # #obsolete? options for totals (passed to cust_main::balance_date_sql)
26 # 'total' => 1, #set to true to remove all customer comparison clauses
27 # 'join' => $join, #JOIN clause
28 # 'where' => \@where, #WHERE clause hashref (elements "AND"ed together)
32 my($start, $end, $cutoff) = @_; #, %opt ?
34 FS::cust_main->balance_date_sql( $start, $end,