add advertising source to sales/credits/receipts summary, RT#18349
[freeside.git] / FS / FS / cust_bill.pm
index d94ab20..498025f 100644 (file)
@@ -1753,7 +1753,7 @@ Options are:
 
 =over 4
 
-=item format - any of FS::Misc::spool_formats
+=item format - any of FS::Misc::::Invoicing::spool_formats
 
 =item dest - if set (to POST, EMAIL or FAX), only sends spools invoices if the
 customer has the corresponding invoice destinations set (see
@@ -5693,7 +5693,12 @@ sub search_sql_where {
     push @search, "cust_main.agentnum = $1";
   }
 
-  #agentnum
+  #refnum
+  if ( $param->{'refnum'} =~ /^(\d+)$/ ) {
+    push @search, "cust_main.refnum = $1";
+  }
+
+  #custnum
   if ( $param->{'custnum'} =~ /^(\d+)$/ ) {
     push @search, "cust_bill.custnum = $1";
   }