[freeside-commits] freeside/FS/FS cust_svc.pm,1.58,1.59
Ivan,,,
ivan at wavetail.420.am
Mon Nov 28 08:21:52 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv4748
Modified Files:
cust_svc.pm
Log Message:
update cust_svc::seconds_since_sqlradacct to deal with any usage-capable export
Index: cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_svc.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- cust_svc.pm 3 Oct 2005 01:41:44 -0000 1.58
+++ cust_svc.pm 28 Nov 2005 16:21:50 -0000 1.59
@@ -410,14 +410,7 @@
$str2time = 'extract(epoch from ';
}
- my $username;
- if ( $part_export->exporttype eq 'sqlradius' ) {
- $username = $svc_x->username;
- } elsif ( $part_export->exporttype eq 'sqlradius_withdomain' ) {
- $username = $svc_x->email;
- } else {
- die 'unknown exporttype '. $part_export->exporttype;
- }
+ my $username = $part_export->export_username($svc_x);
my $query;
@@ -567,11 +560,8 @@
#$attrib ???
- #my @part_export = $cust_svc->part_svc->part_export->can('usage_sessions');
- my @part_export = $self->part_svc->part_export('sqlradius');
- push @part_export, $self->part_svc->part_export('sqlradius_withdomain');
- die "no sqlradius or sqlradius_withdomain export configured for this".
- "service type"
+ my @part_export = $self->part_svc->part_export_usage;
+ die "no accounting-capable exports are enabled for this service definition"
unless @part_export;
#or return undef;
More information about the freeside-commits
mailing list