summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-04-27 09:23:28 -0700
committerIvan Kohler <ivan@freeside.biz>2017-04-27 09:23:28 -0700
commit693bd5cfef9f51ee6115159c369b728d269455ab (patch)
tree5be832b33baae40d9d5bc6e4ef636fea9a4f6b7e /FS/FS/cust_pkg.pm
parent591811b46fb6f51aa93868db6eaba0242d1257ad (diff)
now that quotations in v4 simulate a real billing, need a workaround for packages that start on hold, RT#75646
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r--FS/FS/cust_pkg.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 3d54439..5410573 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -60,6 +60,8 @@ our $upgrade = 0; #go away after setup+start dates cleaned up for old customers
our $cache_enabled = 0;
+our $disable_start_on_hold = 0;
+
sub _simplecache {
my( $self, $hashref ) = @_;
if ( $cache_enabled && $hashref->{'pkg'} && $hashref->{'plan'} ) {
@@ -397,7 +399,10 @@ sub insert {
$self->start_date( timelocal_nocheck(0,0,0,1,$mon,$year) );
}
- if ($self->susp eq 'now' or $part_pkg->start_on_hold) {
+ if ( $self->susp eq 'now'
+ or ( $part_pkg->start_on_hold && ! $disable_start_on_hold )
+ )
+ {
# if the package was ordered on hold:
# - suspend it
# - don't set the start date (it will be started manually)