X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fradiator.pm;h=f09d36abbb0405fca6f94c05a54965061ab11e54;hb=e2a9dcac3b97254fc0a64ce3e2bf1ce582ce8162;hp=869c033eda8ffb70b911f667de9c8570d7fc7a93;hpb=1b7404720478fe7b24da79a440d811cc70b3618e;p=freeside.git
diff --git a/FS/FS/part_export/radiator.pm b/FS/FS/part_export/radiator.pm
index 869c033ed..f09d36abb 100644
--- a/FS/FS/part_export/radiator.pm
+++ b/FS/FS/part_export/radiator.pm
@@ -11,6 +11,8 @@ tie my %options, 'Tie::IxHash', %FS::part_export::sqlradius::options;
'desc' => 'Real-time export to RADIATOR',
'options' => \%options,
'nodomain' => '',
+ 'no_machine' => 1,
+ 'default_svc_class' => 'Internet',
'notes' => <<'END',
Real-time export of the radusers table to any SQL database in
Radiator-native format.
@@ -68,7 +70,7 @@ sub _radiator_hash {
my( $self, $svc_acct ) = @_;
my %hash = (
'username' => $self->export_username($svc_acct),
- 'pass_word' => $svc_acct->_password,
+ 'pass_word' => $svc_acct->crypt_password,
'fullname' => $svc_acct->finger,
map { my $method = "radius_$_"; $_ => $svc_acct->$method(); }
qw( framed_filter_id framed_mtu framed_netmask framed_protocol
@@ -81,8 +83,8 @@ sub _radiator_hash {
$hash{'servicename'} = ( $svc_acct->radius_groups )[0];
- my $cust_pkg = $self->cust_svc->cust_pkg;
- $hash{validto} = $cust_pkg->bill
+ my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
+ $hash{'validto'} = $cust_pkg->bill
if $cust_pkg && $cust_pkg->part_pkg->is_prepaid && $cust_pkg->bill;
#some other random stuff, should probably be attributes or virtual fields
@@ -93,6 +95,8 @@ sub _radiator_hash {
if $cust_pkg && $cust_pkg->setup;
$hash{'validfrom'} = $cust_pkg->last_bill || $cust_pkg->setup
if $cust_pkg && ( $cust_pkg->last_bill || $cust_pkg->setup );
+ $hash{'state'} = $cust_pkg->susp ? 1 : 0
+ if $cust_pkg;
%hash;
}