projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
suspend event option to skip packages with a start_date, RT#83847
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
57d598a
..
9e305c7
100644
(file)
--- 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 {
=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 ... ]
}
=item suspend_if_pkgpart HASHREF | PKGPART [ , PKGPART ... ]