X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fprorate.pm;h=a0f579f73ef78c2b37c4ec0153ede2c560fe8960;hb=cdad865fc29a4ed47449f28b0aff6d7e59c95936;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..a0f579f73 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;