RT# 81961 Repair broken links in POD documentation
[freeside.git] / FS / FS / cust_main_Mixin.pm
index acce28c..097111f 100644 (file)
@@ -358,7 +358,7 @@ Queue job for status updates.  Required.
 
 =item search
 
-Hashref of params to the L<search()> method.  Required.
+Hashref of params to the L<FS::Record/search> method.  Required.
 
 =item msgnum
 
@@ -406,7 +406,7 @@ sub email_search_result {
   my($class, $param) = @_;
 
   my $conf = FS::Conf->new;
-  my $send_to_domain = $conf->config('send-to-domain');
+  my $send_to_domain = $conf->config('email-to-voice_domain');
 
   my $msgnum = $param->{msgnum};
   my $from = delete $param->{from};
@@ -465,8 +465,7 @@ sub email_search_result {
       next; # unlinked object; nothing else we can do
     }
 
-    my %to = {};
-    if ($to) { $to{'to'} = $to; }
+    my %to = ( to => $to ) if $to;
 
     if ( $msg_template ) {
       # Now supports other context objects.
@@ -487,7 +486,7 @@ sub email_search_result {
       if (!@classes) {
         @classes = ( 'invoice' );
       }
-      my @to = $cust_main->contact_list_email(@classes);
+      my @to = $to ? split(',', $to) : $cust_main->contact_list_email(@classes);
       next if !@to;
 
       %message = (
@@ -716,7 +715,9 @@ sub unsuspend_balance {
   }
   my $balance = $cust_main->balance || 0;
   if ($balance <= $maxbalance) {
-    my @errors = $cust_main->unsuspend;
+    my @errors = $cust_main->unsuspend(
+                  'reason_type' => $conf->config('unsuspend_reason_type')
+                );
     # side-fx with nested transactions?  upstack rolls back?
     warn "WARNING:Errors unsuspending customer ". $cust_main->custnum. ": ".
          join(' / ', @errors)