diff options
Diffstat (limited to 'httemplate/graph')
-rw-r--r-- | httemplate/graph/signupdate.cgi | 5 |
1 files changed, 3 insertions, 2 deletions
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, |