}
-=item get_session_history_sqlradacct TIMESTAMP_START TIMESTAMP_END
+=item get_session_history TIMESTAMP_START TIMESTAMP_END
-See L<FS::svc_acct/get_session_history_sqlradacct>. Equivalent to
-$cust_svc->svc_x->get_session_history_sqlradacct, but more efficient.
-Meaningless for records where B<svcdb> is not "svc_acct".
+See L<FS::svc_acct/get_session_history>. Equivalent to
+$cust_svc->svc_x->get_session_history, but more efficient. Meaningless for
+records where B<svcdb> is not "svc_acct".
=cut
push @sessions, $part_export->usage_sessions( $start, $end, $self->svc_x );
}
- \@sessions;
+ @sessions;
}
package FS::part_pkg::voip_sqlradacct;
use strict;
-use vars qw(@ISA %info);
+use vars qw(@ISA $DEBUG %info);
use FS::Record qw(qsearchs qsearch);
use FS::part_pkg;
#use FS::rate;
@ISA = qw(FS::part_pkg);
+$DEBUG = 0;
+
%info = (
'name' => 'VoIP rating by plan of CDR records in an SQL RADIUS radacct table',
'fields' => {
foreach my $session (
$cust_svc->get_session_history( $last_bill, $$sdate )
) {
+ warn "rating session $session" if $DEBUG;
###
# look up rate details based on called station id
$self->cust_svc->attribute_since_sqlradacct(@_);
}
-=item get_session_history_sqlradacct TIMESTAMP_START TIMESTAMP_END
+=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_sqlradacct {
+sub get_session_history {
my $self = shift;
- $self->cust_svc->get_session_history_sqlradacct(@_);
+ $self->cust_svc->get_session_history(@_);
}
=item radius_groups