From ad4bf730d6e96f0acf589c00ff31eaa64f60b0b7 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 16 Jan 2014 01:46:44 -0800 Subject: don't allow a start date for packages definitions with prorate_defer_bill, RT#25650 --- FS/FS/part_pkg/flat.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'FS') diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 7bc44e176..1594a132b 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -269,7 +269,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; } -- cgit v1.2.1