},
'fieldorder' => [ 'cutoff_day', 'prorate_defer_bill', 'prorate_round_day', 'prorate_verbose' ],
'freq' => 'm',
- 'weight' => 20,
+ 'weight' => 23,
);
my %freq_max_days = ( # the length of the shortest period of each cycle type
sub cutoff_day {
my( $self, $cust_pkg ) = @_;
my @periods = @{ $freq_cutoff_days{$self->freq} };
- my @cutoffs = ($self->option('cutoff_day') || 1); # Jan 1 = 1
+ my $prorate_day = $cust_pkg->cust_main->prorate_day
+ || $self->option('cutoff_day')
+ || 1;
+
+ my @cutoffs = ($prorate_day);
pop @periods; # we don't care about the last one
foreach (@periods) {
push @cutoffs, $cutoffs[-1] + $_;