diff options
-rw-r--r-- | FS/FS/cust_svc.pm | 4 | ||||
-rw-r--r-- | FS/FS/part_export.pm | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index ce2b969f9..b74cfd685 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -367,6 +367,8 @@ sub seconds_since_sqlradacct { my $seconds = 0; foreach my $part_export ( @part_export ) { + next if $part_export->option('ignore_accounting'); + my $dbh = DBI->connect( map { $part_export->option($_) } qw(datasrc username password) ) or die "can't connect to sqlradius database: ". $DBI::errstr; @@ -483,6 +485,8 @@ sub attribute_since_sqlradacct { foreach my $part_export ( @part_export ) { + next if $part_export->option('ignore_accounting'); + my $dbh = DBI->connect( map { $part_export->option($_) } qw(datasrc username password) ) or die "can't connect to sqlradius database: ". $DBI::errstr; diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index a27213773..16f91eb6e 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -698,12 +698,20 @@ tie my %sqlradius_options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, + 'ignore_accounting' => { + type => 'checkbox', + label=>'Ignore accounting records from this database' + }, ; tie my %sqlradius_withdomain_options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, + 'ignore_accounting' => { + type => 'checkbox', + label=>'Ignore accounting records from this database' + }, ; tie my %cyrus_options, 'Tie::IxHash', |