X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=9e305c72ab970ee074f04956ae390e351cdbba97;hb=c2dbe36096332d1e09bc58d7d9903e05247f0c9b;hp=57d598a74428da36d6821ddb912a6ccd340c4e48;hpb=a98de57aee063b3ff737c283336f83b2e50e14a8;p=freeside.git 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 ... ]