X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main_Mixin.pm;h=e31a3103148fb32b17479ac3d2a26efda748b51f;hb=48e65eb4bd1773dfb7076047df4f366538b81459;hp=cceaa4bc70a0576fa616aecbdd372869f15fe919;hpb=280c44682a79e586af941e869e7a78ca8f367cf2;p=freeside.git diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index cceaa4bc7..e31a31031 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -372,7 +372,7 @@ Queue job for status updates. Required. =item search -Hashref of params to the L method. Required. +Hashref of params to the L method. Required. =item msgnum @@ -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)