diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/AccessRight.pm | 1 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 2 | ||||
-rw-r--r-- | FS/FS/part_bill_event.pm | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 27486da35..856a5f523 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -112,6 +112,7 @@ assigned to users and/or groups. 'Unsuspend customer package', 'Cancel customer package immediately', 'Cancel customer package later', + 'Delay suspension events', 'Add on-the-fly cancel reason', #NEW 'Add on-the-fly suspend reason', #NEW 'Edit customer package invoice details', #NEW diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 697f478ff..c0cdfba0a 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -227,6 +227,8 @@ Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit nu =item spool_cdr - Enable individual CDR spooling, empty or `Y' +=item dundate - a suggestion to events (see L<FS::part_bill_event">) to delay until this unix timestamp + =back =head1 METHODS diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index 683f48423..7d0011764 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -4,6 +4,8 @@ use strict; use vars qw( @ISA $DEBUG @EXPORT_OK ); use FS::Record qw( dbh qsearch qsearchs ); use FS::Conf; +use FS::cust_main; +use FS::cust_bill; @ISA = qw( FS::Record ); @EXPORT_OK = qw( due_events ); @@ -234,6 +236,9 @@ sub due_events { sort { $a->seconds <=> $b->seconds || $a->weight <=> $b->weight || $a->eventpart <=> $b->eventpart } + grep { ref($record) ne 'FS::cust_bill' || $_->eventcode !~ /honor_dundate/ + || $event_time > $record->cust_main->dundate + } grep { $_->seconds <= ( $interval ) && ! qsearch( 'cust_bill_event', { 'invnum' => $record->get($record->dbdef_table->primary_key), |