projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
scalar cgi param
[freeside.git]
/
httemplate
/
graph
/
signupdate.cgi
diff --git
a/httemplate/graph/signupdate.cgi
b/httemplate/graph/signupdate.cgi
index
011817c
..
823ddb8
100644
(file)
--- a/
httemplate/graph/signupdate.cgi
+++ b/
httemplate/graph/signupdate.cgi
@@
-34,17
+34,18
@@
$where{'agentnum'} = $agentnum if $agentnum;
$where{'usernum'} = $usernum if $usernum;
my $sdate = DateTime->new(
$where{'usernum'} = $usernum if $usernum;
my $sdate = DateTime->new(
- year =>
$cgi->param('start_year'
),
- month =>
$cgi->param('start_month'
),
+ year =>
scalar($cgi->param('start_year')
),
+ month =>
scalar($cgi->param('start_month')
),
)->epoch();
my $edate = DateTime->new(
)->epoch();
my $edate = DateTime->new(
- year =>
$cgi->param('end_year'
),
- month =>
$cgi->param('end_month')
+ year =>
scalar($cgi->param('end_year')
),
+ month =>
scalar($cgi->param('end_month')),
)->add( months => 1 )->epoch();
)->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,
foreach my $cust (qsearch({ table => 'cust_main',
hashref => \%where,