my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
return 0
- if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
+ if $self->recur_temporality eq 'preceding' && $last_bill == 0;
my $charge = $self->base_recur($cust_pkg, $sdate);
if ( my $cutoff_day = $self->cutoff_day($cust_pkg) ) {
- $charge = $self->calc_prorate(@_);
+ $charge = $self->calc_prorate(@_, $cutoff_day);
}
elsif ( $param->{freq_override} ) {
# XXX not sure if this should be mutually exclusive with sync_bill_date.
$self->freq =~ /^\d+$/ && $self->freq > 0;
}
+sub recur_temporality {
+ my $self = shift;
+ $self->option('recur_temporality', 1);
+}
+
sub usage_valuehash {
my $self = shift;
map { $_, $self->option($_) }