X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=62cb633627e77974cace11937549d5917cc69c78;hb=0692ff47a2eac65616bf24104a51e558506f1b8f;hp=e36dbbd69164030cd97ce9f86add045c190ea2ee;hpb=efa799391aeba085b65145428cab1cf1074d3f6d;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index e36dbbd69..62cb63362 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1,13 +1,13 @@ package FS::svc_acct; - -use strict; -use base qw( FS::svc_Domain_Mixin - FS::svc_CGP_Mixin - FS::svc_CGPRule_Mixin +use base qw( FS::svc_Domain_Mixin FS::svc_PBX_Mixin + FS::svc_CGP_Mixin FS::svc_CGPRule_Mixin FS::svc_Radius_Mixin FS::svc_Tower_Mixin FS::svc_IP_Mixin - FS::svc_Common ); + FS::svc_Common + ); + +use strict; use vars qw( $DEBUG $me $conf $skip_fuzzyfiles $dir_prefix @shells $usernamemin $usernamemax $passwordmin $passwordmax @@ -55,7 +55,6 @@ use FS::part_export; use FS::svc_forward; use FS::svc_www; use FS::cdr; -use FS::acct_snarf; use FS::tower_sector; $DEBUG = 0; @@ -1895,20 +1894,14 @@ sub email { $self->username. '@'. $self->domain(@_); } + =item acct_snarf Returns an array of FS::acct_snarf records associated with the account. =cut -sub acct_snarf { - my $self = shift; - qsearch({ - 'table' => 'acct_snarf', - 'hashref' => { 'svcnum' => $self->svcnum }, - #'order_by' => 'ORDER BY priority ASC', - }); -} +# unused as originally intended, but now by Communigate Pro "RPOP" =item cgp_rpop_hashref @@ -2367,60 +2360,6 @@ sub seconds_since { $self->cust_svc->seconds_since(@_); } -=item seconds_since_sqlradacct TIMESTAMP_START TIMESTAMP_END - -Returns the numbers of seconds this account has been online between -TIMESTAMP_START (inclusive) and TIMESTAMP_END (exclusive), according to an -external SQL radacct table, specified via sqlradius export. Sessions which -started in the specified range but are still open are counted from session -start to the end of the range (unless they are over 1 day old, in which case -they are presumed missing their stop record and not counted). Also, sessions -which end in the range but started earlier are counted from the start of the -range to session end. Finally, sessions which start before the range but end -after are counted for the entire range. - -TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see -L. Also see L and L for conversion -functions. - -=cut - -#note: POD here, implementation in FS::cust_svc -sub seconds_since_sqlradacct { - my $self = shift; - $self->cust_svc->seconds_since_sqlradacct(@_); -} - -=item attribute_since_sqlradacct TIMESTAMP_START TIMESTAMP_END ATTRIBUTE - -Returns the sum of the given attribute for all accounts (see L) -in this package for sessions ending between TIMESTAMP_START (inclusive) and -TIMESTAMP_END (exclusive). - -TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see -L. Also see L and L for conversion -functions. - -=cut - -#note: POD here, implementation in FS::cust_svc -sub attribute_since_sqlradacct { - my $self = shift; - $self->cust_svc->attribute_since_sqlradacct(@_); -} - -=item get_session_history TIMESTAMP_START TIMESTAMP_END - -Returns an array of hash references of this customers login history for the -given time range. (document this better) - -=cut - -sub get_session_history { - my $self = shift; - $self->cust_svc->get_session_history(@_); -} - =item last_login_text Returns text describing the time of last login.