Optional subject for a ticket created and attached to this customer
-=item ticket_subject
+=item ticket_queue
Optional queue name for ticket additions
sub suspended_pkgs {
my $self = shift;
+ return $self->num_suspended_pkgs unless wantarray;
grep { $_->susp } $self->ncancelled_pkgs;
}
sub unsuspended_pkgs {
my $self = shift;
+ return $self->num_unsuspended_pkgs unless wantarray;
grep { ! $_->susp } $self->ncancelled_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;
}
shift->num_pkgs("( cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0 )");
}
+sub num_suspended_pkgs {
+ shift->num_pkgs(" ( cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0 )
+ AND cust_pkg.susp IS NOT NULL AND cust_pkg.susp != 0 ");
+}
+
+sub num_unsuspended_pkgs {
+ shift->num_pkgs(" ( cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0 )
+ AND ( cust_pkg.susp IS NULL OR cust_pkg.susp = 0 ) ");
+}
+
sub num_pkgs {
my( $self ) = shift;
my $sql = scalar(@_) ? shift : '';