summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-16 01:46:47 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-16 01:46:47 -0800
commit7070356f09267ce78440bff9f36d7ce6cfcd1802 (patch)
treeff9ade8491baba2da18b8270c3cde7ed6667a537 /FS
parent9796215df2641f8f7c635b567b2186db1b25e291 (diff)
don't allow a start date for packages definitions with prorate_defer_bill, RT#25650
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_pkg/flat.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm
index 757e1ceb6..f3a2b85a5 100644
--- a/FS/FS/part_pkg/flat.pm
+++ b/FS/FS/part_pkg/flat.pm
@@ -253,7 +253,15 @@ sub is_free_options {
sub is_prepaid { 0; } #no, we're postpaid
-sub can_start_date { ! shift->option('start_1st', 1) }
+sub can_start_date {
+ my $self = shift;
+ my %opt = @_;
+
+ ! $self->option('start_1st', 1) && ( ! $self->option('sync_bill_date',1)
+ || ! $self->option('prorate_defer_bill',1)
+ || ! $opt{'num_ncancelled_pkgs'}
+ );
+}
sub can_discount { 1; }