X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=9e305c72ab970ee074f04956ae390e351cdbba97;hp=57d598a74428da36d6821ddb912a6ccd340c4e48;hb=ffc8927ad1df5a565256bdb47210006afa4b2f78;hpb=a98de57aee063b3ff737c283336f83b2e50e14a8 diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 57d598a74..9e305c72a 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2075,8 +2075,14 @@ Returns a list: an empty list on success or a list of errors. =cut sub suspend { - my $self = shift; - grep { $_->suspend(@_) } $self->unsuspended_pkgs; + my($self, %opt) = @_; + + my @pkgs = $self->unsuspended_pkgs; + + @pkgs = grep { ! $_->get('start_date') } @pkgs + if $opt{skip_future_startdate}; + + grep { $_->suspend(%opt) } @pkgs; } =item suspend_if_pkgpart HASHREF | PKGPART [ , PKGPART ... ]