diff options
author | ivan <ivan> | 2009-07-09 20:36:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-07-09 20:36:28 +0000 |
commit | 9b5e892a9c7c56f77a941e8243e284226be5e833 (patch) | |
tree | 725dffc691cbf84b0528fc639cc89c944ae01bec /httemplate/search/elements | |
parent | 9e785148c48b0afc21343eb207489f10589710db (diff) |
no idea how i missed fixing this before
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r-- | httemplate/search/elements/cust_main_dayranges.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html index 3ab594181..cc014923f 100644 --- a/httemplate/search/elements/cust_main_dayranges.html +++ b/httemplate/search/elements/cust_main_dayranges.html @@ -88,7 +88,7 @@ Example: my %opt = @_; #actually need to auto-generate other things too for a passed-in ranges to work -my @ranges = $opt{'ranges'} ? @{ delete($opt{'ranges'}) } : [ +my $ranges = $opt{'ranges'} ? delete($opt{'ranges'}) : [ [ 0, 30 ], [ 30, 60 ], [ 60, 90 ], @@ -99,7 +99,7 @@ my @ranges = $opt{'ranges'} ? @{ delete($opt{'ranges'}) } : [ my $range_sub = delete($opt{'range_sub'}); #or die #my $range_cols = join(',', map &{$range_sub}( @$_ ), @ranges ); -my $range_cols = join(',', map call_range_sub($range_sub, @$_ ), @ranges ); +my $range_cols = join(',', map call_range_sub($range_sub, @$_ ), @$ranges ); my $select_count_pkgs = FS::cust_main->select_count_pkgs_sql; @@ -157,7 +157,7 @@ my $sql_query = { 'select' => join(',', #'cust_main.*', 'custnum', - $owed_cols, + $range_cols, $packages_cols, FS::UI::Web::cust_sql_fields(), ), @@ -167,7 +167,7 @@ my $sql_query = { my $total_sql = "SELECT ". - join(',', map call_range_sub( $range_sub, @$_, 'sum'=>1 ), @ranges). + join(',', map call_range_sub( $range_sub, @$_, 'sum'=>1 ), @$ranges). " FROM cust_main $where"; my $total_sth = dbh->prepare($total_sql) or die dbh->errstr; @@ -211,7 +211,7 @@ sub call_range_sub { } -sub format_range { #closures help alot +sub format_rangecol { #closures help alot my $range = shift; sub { sprintf( $money_char.'%.2f', shift->get("rangecol_$range") ) }; } |