diff options
author | mark <mark> | 2010-08-27 02:10:14 +0000 |
---|---|---|
committer | mark <mark> | 2010-08-27 02:10:14 +0000 |
commit | fff0c848e4c9933934b8da41d23e45b204cac11b (patch) | |
tree | a8aa00721e2715f9ade970e6efdb2f992192bd2b /FS/FS/cust_pkg.pm | |
parent | b2d209dec4f00bd444a68c201940ef90f2af050f (diff) |
per-package option to adjust bill date on unsuspend, RT#8434
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r-- | FS/FS/cust_pkg.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index f367fd3..c27d458 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -1024,10 +1024,16 @@ sub unsuspend { my $conf = new FS::Conf; - $hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive - if ( $opt{'adjust_next_bill'} - || $conf->exists('unsuspend-always_adjust_next_bill_date') ) - && $inactive > 0 && ( $hash{'bill'} || $hash{'setup'} ); + if ( $inactive > 0 && + ( $hash{'bill'} || $hash{'setup'} ) && + ( $opt{'adjust_next_bill'} || + $conf->exists('unsuspend-always_adjust_next_bill_date') || + $self->part_pkg->option('unsuspend_adjust_bill', 1) ) + ) { + + $hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive; + + } $hash{'susp'} = ''; $hash{'adjourn'} = '' if $hash{'adjourn'} < time; |