X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Frate_detail.pm;h=7b90452055627016ff445c0cf64ca1de8468cff7;hb=c8cd96b69c9c1ede44c06c04f2703079d1afdf2b;hp=f6cdedf6e07da9e41f6b941c024499b55ae5b2f6;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/FS/FS/rate_detail.pm b/FS/FS/rate_detail.pm index f6cdedf6e..7b9045205 100644 --- a/FS/FS/rate_detail.pm +++ b/FS/FS/rate_detail.pm @@ -5,6 +5,7 @@ use vars qw( @ISA $DEBUG $me ); use FS::Record qw( qsearch qsearchs dbh ); use FS::rate; use FS::rate_region; +use FS::rate_time; use Tie::IxHash; @ISA = qw(FS::Record); @@ -54,6 +55,8 @@ inherits from FS::Record. The following fields are currently supported: =item classnum - usage class (see L) if any for this rate +=item ratetimenum - rating time period (see Ldest_region->prefixes_short; } +=item rate_time + +Returns the L object associated with this call +plan rate, if there is one. + +=cut + +sub rate_time { + my $self = shift; + $self->ratetimenum ? FS::rate_time->by_key($self->ratetimenum) : (); +} + +=item rate_time_name + +Returns the I field of the L object +associated with this rate plan. + +=cut + +sub rate_time_name { + my $self = shift; + $self->ratetimenum ? $self->rate_time->ratetimename : '(default)'; +} + =item classname Returns the name of the usage class (see L) associated with