add cust_pkg2 index on cust_pkg.pkgpart
[freeside.git] / FS / FS / cust_bill.pm
index 4424797..0cfe5c9 100644 (file)
@@ -838,7 +838,8 @@ sub spool_csv {
   if ( $opt{'dest'} ) {
     my %invoicing_list = map { /^(POST|FAX)$/ or 'EMAIL' =~ /^(.*)$/; $1 => 1 }
                              $self->cust_main->invoicing_list;
-    return unless $invoicing_list{$opt{'dest'}};
+    return 'N/A' unless $invoicing_list{$opt{'dest'}}
+                     || ! keys %invoicing_list;
   }
 
   #create file(s)
@@ -882,6 +883,8 @@ sub spool_csv {
   flock(CSV, LOCK_UN);
   close CSV;
 
+  return '';
+
 }
 
 =item print_csv OPTION => VALUE, ...