projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efa8709
)
RT#14671: Usage for current day when billing outstanding usage (for cancelling custom...
author
Jonathan Prykop
<jonathan@freeside.biz>
Mon, 16 Feb 2015 21:30:37 +0000
(15:30 -0600)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Mon, 2 Mar 2015 20:46:44 +0000
(14:46 -0600)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
079a865
..
69f7bc0
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-949,7
+949,11
@@
sub cancel {
}
foreach my $supp_pkg ( $self->supplemental_pkgs ) {
- $error = $supp_pkg->cancel(%options, 'from_main' => 1);
+ if ($delay_cancel) {
+ $error = $supp_pkg->suspend(%options, 'from_main' => 1, 'reason' => undef);
+ } else {
+ $error = $supp_pkg->cancel(%options, 'from_main' => 1);
+ }
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "canceling supplemental pkg#".$supp_pkg->pkgnum.": $error";