summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-04-22 18:58:25 -0700
committerIvan Kohler <ivan@freeside.biz>2014-04-22 18:58:25 -0700
commitb16a852177d55dc3e5dfa5d290c2eb51417c1ee9 (patch)
tree70176074e3ef580fda8cbcf736da7523557a80a3
parent7db3b36f7ecde4fc4425749db64cf75d709f3b7c (diff)
even with flag set to do so, don't adjust bill dates forward on a package which is billing while suspended, RT#27882
-rw-r--r--FS/FS/cust_pkg.pm21
1 files changed, 11 insertions, 10 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 82cb479cf..098baf2cd 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1566,16 +1566,17 @@ sub unsuspend {
my $conf = new FS::Conf;
- 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{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive
+ 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)
+ )
+ && ! $self->option('suspend_bill',1)
+ && ( ! $self->part_pkg->option('suspend_bill',1)
+ || $self->option('no_suspend_bill',1)
+ );
$hash{'susp'} = '';
$hash{'adjourn'} = '' if $hash{'adjourn'} and $hash{'adjourn'} < time;