RT# 81961 Repair broken links in POD documentation
[freeside.git] / FS / FS / cust_main_Mixin.pm
index 169e1eb..e31a310 100644 (file)
@@ -372,7 +372,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
 
@@ -399,10 +399,10 @@ Text body
 
 This field contains a comma-separated list.  This list may contain:
 
-- the text "invoice" indicating emails should only be sent to contact_email
-  addresses with the invoice_dest flag set
-- the text "message" indicating emails should only be sent to contact_email
-  addresses with the message_dest flag set
+- the text "invoice" indicating contacts with invoice_dest flag should
+  be included
+- the text "message" indicating contacts with message_dest flag should
+  be included
 - numbers representing classnum id values for email contact classes.
   If any classnum are present, emails should only be sent to contact_email
   addresses where contact_email.classnum contains one of these classes.
@@ -660,13 +660,13 @@ sub time2str_local {
 
   $self->{_date_format} ||= {};
   if (!exists($self->{_dh})) {
-    my $cust_main = $self->cust_main;
-    my $locale = $cust_main->locale  if $cust_main;
-    $locale ||= 'en_US';
+    my $locale = $self->cust_main->locale if $self->cust_main;
+    $locale ||= FS::Conf->new->config('locale') || 'en_US';
+
     my %info = FS::Locales->locale_info($locale);
-    my $dh = eval { Date::Language->new($info{'name'}) } ||
-             Date::Language->new(); # fall back to English
-    $self->{_dh} = $dh;
+
+    $self->{_dh} = eval { Date::Language->new($info{'name'}) }
+      || Date::Language->new(); # fall back to English
   }
 
   if ($format eq 'short') {
@@ -737,7 +737,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)