summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main/Billing.pm5
-rw-r--r--FS/FS/cust_main/Packages.pm6
-rw-r--r--FS/FS/cust_pkg.pm7
-rw-r--r--FS/FS/domain_record.pm3
4 files changed, 16 insertions, 5 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index e7b953060..bab94c31d 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -968,7 +968,10 @@ sub _make_lines {
my @recur_discounts = ();
my $sdate;
if ( ! $cust_pkg->start_date
- and ( ! $cust_pkg->susp || $part_pkg->option('suspend_bill', 1) )
+ and ( ! $cust_pkg->susp || $cust_pkg->option('suspend_bill',1)
+ || ( $part_pkg->option('suspend_bill', 1) )
+ && ! $cust_pkg->option('no_suspend_bill',1)
+ )
and
( $part_pkg->freq ne '0' && ( $cust_pkg->bill || 0 ) <= day_end($time) )
|| ( $part_pkg->plan eq 'voip_cdr'
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index 957043a84..11c13e5dd 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -412,7 +412,11 @@ sub billing_pkgs {
my $self = shift;
grep { my $part_pkg = $_->part_pkg;
$part_pkg->freq ne '' && $part_pkg->freq ne '0'
- && ( ! $_->susp || $part_pkg->option('suspend_bill', 1) );
+ && ( ! $_->susp || $_->option('suspend_bill',1)
+ || ( $part_pkg->option('suspend_bill', 1)
+ && ! $_->option('no_suspend_bill',1)
+ )
+ );
}
$self->ncancelled_pkgs;
}
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 22559e95f..627a7fc3e 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1189,8 +1189,13 @@ sub suspend {
$hash{'resume'} = $resume_date;
}
+ $options{options} ||= {};
+
my $new = new FS::cust_pkg ( \%hash );
- $error = $new->replace( $self, options => { $self->options } );
+ $error = $new->replace( $self, options => { $self->options,
+ %{ $options{options} },
+ }
+ );
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
diff --git a/FS/FS/domain_record.pm b/FS/FS/domain_record.pm
index 8d767d510..cd881ae08 100644
--- a/FS/FS/domain_record.pm
+++ b/FS/FS/domain_record.pm
@@ -3,8 +3,7 @@ package FS::domain_record;
use strict;
use vars qw( @ISA $noserial_hack $DEBUG $me );
use FS::Conf;
-#use FS::Record qw( qsearch qsearchs );
-use FS::Record qw( qsearchs dbh );
+use FS::Record qw( qsearchs dbh ); #qsearch
use FS::svc_domain;
use FS::svc_www;