RT#39958 Service Provisioning History - New Requirement [bug fix]
authorJonathan Prykop <jonathan@freeside.biz>
Fri, 1 Apr 2016 04:07:19 +0000 (23:07 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Fri, 1 Apr 2016 04:19:04 +0000 (23:19 -0500)
httemplate/view/cust_main/change_history.html

index fe11b95..d46a4ff 100644 (file)
@@ -159,10 +159,10 @@ foreach my $table ( keys %tables ) {
 #   but it would spoil database optimizations on this lookup
 my @svcnumobj = qsearch({
   'select' => 'DISTINCT svcnum',
-  'hashref'   => { 'custnum' => $cust_main->custnum,
-                   'history_date' =>  { op=>'>=', value=>$newer_than } },
+  'hashref'   => { 'history_date' =>  { op=>'>=', value=>$newer_than } },
   'table'  => 'h_cust_svc',
   'addl_from' => 'JOIN cust_pkg USING (pkgnum)',
+  'extra_sql' => ' AND custnum = '. $cust_main->custnum,
 });
 
 # now grab those svcs explicitly