[freeside-commits] freeside/httemplate/search/elements cust_main_dayranges.html, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Thu Jul 9 13:36:31 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/search/elements
In directory wavetail.420.am:/tmp/cvs-serv20320
Modified Files:
cust_main_dayranges.html
Log Message:
no idea how i missed fixing this before
Index: cust_main_dayranges.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/elements/cust_main_dayranges.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cust_main_dayranges.html 8 Jul 2009 03:33:45 -0000 1.1
+++ cust_main_dayranges.html 9 Jul 2009 20:36:28 -0000 1.2
@@ -88,7 +88,7 @@
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 $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 @@
'select' => join(',',
#'cust_main.*',
'custnum',
- $owed_cols,
+ $range_cols,
$packages_cols,
FS::UI::Web::cust_sql_fields(),
),
@@ -167,7 +167,7 @@
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 format_range { #closures help alot
+sub format_rangecol { #closures help alot
my $range = shift;
sub { sprintf( $money_char.'%.2f', shift->get("rangecol_$range") ) };
}
More information about the freeside-commits
mailing list