diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-11 22:53:46 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-11 22:53:46 -0800 |
commit | 7dd026a106a667317a64568708a727c6e5bec55a (patch) | |
tree | 783ee24ed544a7850bb269ae732f6bda325c02e9 /FS/FS/svc_PBX_Mixin.pm | |
parent | 0ddb95ef7e09ada82657f30ce459fe229b2851c0 (diff) |
indosoft integration, RT#25555
Diffstat (limited to 'FS/FS/svc_PBX_Mixin.pm')
-rw-r--r-- | FS/FS/svc_PBX_Mixin.pm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/FS/FS/svc_PBX_Mixin.pm b/FS/FS/svc_PBX_Mixin.pm new file mode 100644 index 0000000..41aabd0 --- /dev/null +++ b/FS/FS/svc_PBX_Mixin.pm @@ -0,0 +1,52 @@ +package FS::svc_PBX_Mixin; + +use strict; +use FS::Record qw( qsearchs ); # qw(qsearch qsearchs); +use FS::svc_pbx; + +=head1 NAME + +FS::svc_PBX_Mixin - Mixin class for svc_classes with a pbxsvc field + +=head1 SYNOPSIS + +package FS::svc_table; +use base qw( FS::svc_PBX_Mixin FS::svc_Common ); + +=head1 DESCRIPTION + +This is a mixin class for svc_ classes that contain a pbxsvc field linking to +a PBX (see L<FS::svc_pbx>). + +=head1 METHODS + +=over 4 + +=item svc_pbx + +Returns the FS::svc_pbx record for this account's domain (see +L<FS::svc_pbx>). + +=cut + +# FS::h_svc_acct has a history-aware svc_domain override + +sub svc_pbx { + my $self = shift; + #$self->{'_pbxsvc'} + # ? $self->{'_pbxsvc'} + # : + qsearchs( 'svc_pbx', { 'svcnum' => $self->pbxsvc } ); +} + +=back + +=head1 BUGS + +=head1 SEE ALSO + +L<FS::svc_Common>, L<FS::Record> + +=cut + +1; |