projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#14671: Usage for current day when billing outstanding usage (for cancelling custom...
[freeside.git]
/
FS
/
FS
/
cust_pkg.pm
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
0cb6209
..
7678a02
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-935,7
+935,11
@@
sub cancel {
}
foreach my $supp_pkg ( $self->supplemental_pkgs ) {
}
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";
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "canceling supplemental pkg#".$supp_pkg->pkgnum.": $error";