X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Fsignupdate.cgi;h=8261257f39a5e2e9638ddb2539aa40a48802ad8a;hb=990d718978480aa02b0031a2ec6753e64975fd34;hp=43deddc8dc600593ebd9a12e0b1a03af4fc4fca2;hpb=2f16e6d6e40950637f714d2fdebfd44db1cf8db7;p=freeside.git diff --git a/httemplate/graph/signupdate.cgi b/httemplate/graph/signupdate.cgi index 43deddc8d..8261257f3 100644 --- a/httemplate/graph/signupdate.cgi +++ b/httemplate/graph/signupdate.cgi @@ -36,19 +36,18 @@ $where{'usernum'} = $usernum if $usernum; my $sdate = DateTime->new( year => $cgi->param('start_year'), month => $cgi->param('start_month'), - time_zone => 'America/Los_Angeles', )->epoch(); my $edate = DateTime->new( year => $cgi->param('end_year'), - month => $cgi->param('end_month'), - time_zone => 'America/Los_Angeles', -)->epoch(); + month => $cgi->param('end_month') +)->add( months => 1 )->epoch(); -my $where .= " AND signupdate >= $sdate ". - " AND signupdate <= $edate "; +my $where = (%where ? ' AND ' : ' WHERE '); +$where .= " signupdate >= $sdate ". + " AND signupdate < $edate "; -foreach my $cust (qsearch({ table => 'cust_main', +foreach my $cust (qsearch({ table => 'cust_main', hashref => \%where, extra_sql => $where } )) { next if !$cust->signupdate;