X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=0015140101094dc9ba2ebcd5c3caf85bc6c5b6bd;hb=6b03e02d41a9c90ff88d060f16d570b4d2a3d626;hp=6a681ca89ed6bc5a654ea24afc3ddba028db85c3;hpb=ff40e4713971790ef6e334bfb34c3657b7d23d80;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 6a681ca89..001514010 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1518,6 +1518,29 @@ sub _op_usage { my $action = $op2action{$op}; + if ( &{$op2condition{$op}}($self, $column, $amount) ) { + my $cust_pkg = $self->cust_svc->cust_pkg; + foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { + if ($part_export->option('overlimit_groups')) { + my ($new,$old); + my $other = new FS::svc_acct $self->hashref; + my $groups = &{ $self->_fieldhandlers->{'usergroup'} } + ($self, $part_export->option('overlimit_groups')); + $other->usergroup( $groups ); + if ($action eq 'suspend'){ + $new = $other; $old = $self; + }else{ + $new = $self; $old = $other; + } + my $error = $part_export->export_replace($new, $old); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return "Error replacing radius groups in export, ${op}: $error"; + } + } + } + } + if ( $conf->exists("svc_acct-usage_$action") && &{$op2condition{$op}}($self, $column, $amount) ) { #my $error = $self->$action();