From e614e538496f9069fca2fff6da6b248db9750792 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 12 May 2016 13:52:41 -0700 Subject: [PATCH] fix sync_bill_date when customer has no other packages, minor fallout from #39822 --- FS/FS/part_pkg/flat.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 7b5a3f6bb..3e63242ae 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -174,7 +174,7 @@ sub cutoff_day { my $cust_pkg = shift; if ( $self->option('sync_bill_date',1) ) { my $next_bill = $cust_pkg->cust_main->next_bill_date; - if ( defined($next_bill) ) { + if ( $next_bill ) { # careful here. if the prorate calculation is going to round to # the nearest day, this needs to always return the same result if ( $self->option('prorate_round_day', 1) ) { -- 2.11.0