diff options
author | ivan <ivan> | 2007-12-01 01:34:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-12-01 01:34:31 +0000 |
commit | a35cfbfa48b66141fbe28d774de5a677af57b8bc (patch) | |
tree | 18e3c183e0f8fb85e17ddd6ea713f25f7ddf8554 /FS | |
parent | d842371b1e41ae0204ffb8b0d788e9100e3a467d (diff) |
add date_inserted method and reorganize things slightly
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_svc.pm | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index af54f2230..bcf66e7c7 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -321,6 +321,34 @@ sub cust_pkg { qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } ); } +=item pkg_svc + +Returns the pkg_svc record for for this service, if applicable. + +=cut + +sub pkg_svc { + my $self = shift; + my $cust_pkg = $self->cust_pkg; + return undef unless $cust_pkg; + + qsearchs( 'pkg_svc', { 'svcpart' => $self->svcpart, + 'pkgpart' => $cust_pkg->pkgpart, + } + ); +} + +=item date_inserted + +Returns the date this service was inserted. + +=cut + +sub date_inserted { + my $self = shift; + $self->h_date('insert'); +} + =item label Returns a list consisting of: @@ -643,23 +671,6 @@ sub get_cdrs_for_update { @cdrs; } -=item pkg_svc - -Returns the pkg_svc record for for this service, if applicable. - -=cut - -sub pkg_svc { - my $self = shift; - my $cust_pkg = $self->cust_pkg; - return undef unless $cust_pkg; - - qsearchs( 'pkg_svc', { 'svcpart' => $self->svcpart, - 'pkgpart' => $cust_pkg->pkgpart, - } - ); -} - =back =head1 BUGS |