X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Fsignupdate.cgi;h=8261257f39a5e2e9638ddb2539aa40a48802ad8a;hb=fa0223015fe6c03491b1d0d43524e03ac5fdb899;hp=011817c3a96ae5e0bd4fe24c81f04fd5e51e7d16;hpb=656a9b83e02e5eb5aea314b23546b156631ac51a;p=freeside.git diff --git a/httemplate/graph/signupdate.cgi b/httemplate/graph/signupdate.cgi index 011817c3a..8261257f3 100644 --- a/httemplate/graph/signupdate.cgi +++ b/httemplate/graph/signupdate.cgi @@ -43,8 +43,9 @@ my $edate = DateTime->new( 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', hashref => \%where,