projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix phone# usage search, RT#
[freeside.git]
/
httemplate
/
search
/
svc_phone.cgi
diff --git
a/httemplate/search/svc_phone.cgi
b/httemplate/search/svc_phone.cgi
index
6ee7d1d
..
21e1a92
100644
(file)
--- a/
httemplate/search/svc_phone.cgi
+++ b/
httemplate/search/svc_phone.cgi
@@
-81,8
+81,8
@@
if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
$redirect = '';
$redirect = '';
- my $and_date = " AND startdate >= $beginning ".
-
" AND start
date <= $ending ";
+ #my $and_date = " AND startdate >= $beginning AND startdate <= $ending ";
+
my $and_date = " AND enddate >= $beginning AND end
date <= $ending ";
my $fromwhere = " FROM cdr WHERE cdr.svcnum = svc_phone.svcnum $and_date";
my $fromwhere = " FROM cdr WHERE cdr.svcnum = svc_phone.svcnum $and_date";
@@
-106,7
+106,7
@@
if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
$and_date;
push @select,
$and_date;
push @select,
- " ( SELECT SUM(billsec) $f_w ) AS term_billsec "
.
+ " ( SELECT SUM(billsec) $f_w ) AS term_billsec "
,
" ( SELECT SUM(cdr_termination.rated_price) $f_w ) AS term_rated_price";
push @header, 'Term Min', 'Term Billed';
" ( SELECT SUM(cdr_termination.rated_price) $f_w ) AS term_rated_price";
push @header, 'Term Min', 'Term Billed';
@@
-157,8
+157,9
@@
my $sql_query = {
'select' => join(', ',
'svc_phone.*',
'part_svc.svc',
'select' => join(', ',
'svc_phone.*',
'part_svc.svc',
- 'cust_main.custnum',
- FS::UI::Web::cust_sql_fields(),
+ @select,
+ 'cust_main.custnum',
+ FS::UI::Web::cust_sql_fields(),
),
'extra_sql' => "$extra_sql $orderby",
'addl_from' => $addl_from,
),
'extra_sql' => "$extra_sql $orderby",
'addl_from' => $addl_from,