didn't need this, but more future-proof, RT#5083
[freeside.git] / FS / FS / cust_main.pm
index 1766b45..256eb73 100644 (file)
@@ -1883,11 +1883,12 @@ sub ncancelled_pkgs {
          $self->custnum. "\n"
       if $DEBUG > 1;
 
+    $extra_qsearch->{'extra_sql'} .= ' AND ( cancel IS NULL OR cancel = 0 ) ';
+
     @cust_pkg = qsearch({
       %$extra_qsearch,
       'table'     => 'cust_pkg',
       'hashref'   => { 'custnum' => $self->custnum },
-      'extra_sql' => ' AND ( cancel IS NULL OR cancel = 0 ) ',
     });
 
   }