diff options
author | ivan <ivan> | 2009-09-15 20:45:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-09-15 20:45:46 +0000 |
commit | 0681cc7e7224bf00988d7851c233dca6a2b0d5d7 (patch) | |
tree | 7819d98e371d995cba0f8d14aea990cb712a8265 /httemplate/search/svc_phone.cgi | |
parent | cc7fae653653e27325a616a0497d9d59bbb55852 (diff) |
fix phone# usage search, RT#
Diffstat (limited to 'httemplate/search/svc_phone.cgi')
-rw-r--r-- | httemplate/search/svc_phone.cgi | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/httemplate/search/svc_phone.cgi b/httemplate/search/svc_phone.cgi index 6ee7d1d07..21e1a9233 100644 --- a/httemplate/search/svc_phone.cgi +++ b/httemplate/search/svc_phone.cgi @@ -81,8 +81,8 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { $redirect = ''; - my $and_date = " AND startdate >= $beginning ". - " AND startdate <= $ending "; + #my $and_date = " AND startdate >= $beginning AND startdate <= $ending "; + my $and_date = " AND enddate >= $beginning AND enddate <= $ending "; 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, - " ( 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'; @@ -157,8 +157,9 @@ my $sql_query = { '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, |