if ( $self->option('sync_bill_date',1) ) {
my $next_bill = $cust_pkg->cust_main->next_bill_date;
if ( defined($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) ) {
+ my $hour = (localtime($next_bill))[2];
+ $next_bill += 64800 if $hour >= 12;
+ }
return (localtime($next_bill))[3];
}
}
sub can_start_date {
my $self = shift;
my %opt = @_;
+ return 0 if $self->start_on_hold;
! $self->option('start_1st', 1) && ( ! $self->option('sync_bill_date',1)
|| ! $self->option('prorate_defer_bill',1)