projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d8484ba
)
change interaction between unsuspend_adjust_bill and unused_credit_suspend, #31651
author
Mark Wells
<mark@freeside.biz>
Sat, 28 Feb 2015 21:20:39 +0000
(13:20 -0800)
committer
Mark Wells
<mark@freeside.biz>
Sat, 28 Feb 2015 21:20:39 +0000
(13:20 -0800)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
ae86ca0
..
8eb4ce3
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-1684,15
+1684,20
@@
sub unsuspend {
and ! $self->option('no_suspend_bill',1)
)
or $hash{'order_date'} == $hash{'susp'}
and ! $self->option('no_suspend_bill',1)
)
or $hash{'order_date'} == $hash{'susp'}
- or $self->part_pkg->option('unused_credit_suspend')
- or ( ref($reason) and $reason->unused_credit )
) {
$adjust_bill = 0;
}
) {
$adjust_bill = 0;
}
- # then add the length of time suspended to the bill date
if ( $adjust_bill ) {
if ( $adjust_bill ) {
- $hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive
+ if ( $self->part_pkg->option('unused_credit_suspend')
+ or ( ref($reason) and $reason->unused_credit ) ) {
+ # then the customer was credited for the unused time before suspending,
+ # so their next bill should be immediate
+ $hash{'bill'} = time;
+ } else {
+ # add the length of time suspended to the bill date
+ $hash{'bill'} = ( $hash{'bill'} || $hash{'setup'} ) + $inactive;
+ }
}
$hash{'susp'} = '';
}
$hash{'susp'} = '';