X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fprorate.pm;h=320fdb63ed72a69787d9bd2cbecf815a7a8f5f8c;hb=7f5e32275a5a2674fd1d220cd651b222b9831476;hp=a299cc5f28c3737eec4398e6bc06e44d3322019f;hpb=707906baea6674cefaebe19db2ee9912054dbcde;p=freeside.git diff --git a/FS/FS/part_pkg/prorate.pm b/FS/FS/part_pkg/prorate.pm index a299cc5f2..320fdb63e 100644 --- a/FS/FS/part_pkg/prorate.pm +++ b/FS/FS/part_pkg/prorate.pm @@ -24,8 +24,8 @@ use FS::part_pkg::flat; 'type' => 'checkbox', }, 'prorate_round_day'=> { - 'name' => 'When prorating first month, round to '. - 'the nearest full day', + 'name' => 'Round the prorated period to the nearest '. + 'full day', 'type' => 'checkbox', }, 'prorate_defer_bill'=> { @@ -40,8 +40,12 @@ use FS::part_pkg::flat; sub calc_recur { my $self = shift; - my $cutoff_day = $self->option('cutoff_day') || 1; - return $self->calc_prorate(@_, $cutoff_day) - $self->calc_discount(@_); + return $self->calc_prorate(@_, $self->cutoff_day) - $self->calc_discount(@_); +} + +sub cutoff_day { + my $self = shift; + $self->option('cutoff_day', 1) || 1; } 1;