projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix discounts not appearing for one-time charge packages, RT#13654
[freeside.git]
/
FS
/
FS
/
svc_acct.pm
diff --git
a/FS/FS/svc_acct.pm
b/FS/FS/svc_acct.pm
index
1c4b574
..
7ef8ed3
100644
(file)
--- a/
FS/FS/svc_acct.pm
+++ b/
FS/FS/svc_acct.pm
@@
-993,6
+993,10
@@
sub replace {
}
}
+ return "can't change username"
+ if $old->username ne $new->username
+ && $conf->exists('svc_acct-no_edit_username');
+
#change homdir when we change username
$new->setfield('dir', '') if $old->username ne $new->username;
#change homdir when we change username
$new->setfield('dir', '') if $old->username ne $new->username;
@@
-2223,20
+2227,19
@@
sub _op_overlimit {
my $cust_pkg = $self->cust_svc->cust_pkg;
my $cust_pkg = $self->cust_svc->cust_pkg;
- my
$
conf_overlimit =
+ my
@
conf_overlimit =
$cust_pkg
? $conf->config('overlimit_groups', $cust_pkg->cust_main->agentnum )
: $conf->config('overlimit_groups');
foreach my $part_export ( $self->cust_svc->part_svc->part_export ) {
$cust_pkg
? $conf->config('overlimit_groups', $cust_pkg->cust_main->agentnum )
: $conf->config('overlimit_groups');
foreach my $part_export ( $self->cust_svc->part_svc->part_export ) {
- my $groups = $conf_overlimit || $part_export->option('overlimit_groups');
- next unless $groups;
-
- my $gref = &{ $self->_fieldhandlers->{'usergroup'} }( $self, $groups );
+ my @groups = scalar(@conf_overlimit) ? @conf_overlimit
+ : split(' ',$part_export->option('overlimit_groups'));
+ next unless scalar(@groups);
my $other = new FS::svc_acct $self->hashref;
my $other = new FS::svc_acct $self->hashref;
- $other->usergroup(
$gref
);
+ $other->usergroup(
\@groups
);
my($new,$old);
if ($action eq 'suspend') {
my($new,$old);
if ($action eq 'suspend') {
@@
-2559,7
+2562,13
@@
sub radius_groups {
unless ref($self->usergroup) eq 'ARRAY';
#when provisioning records, export callback runs in svc_Common.pm before
#radius_usergroup records can be inserted...
unless ref($self->usergroup) eq 'ARRAY';
#when provisioning records, export callback runs in svc_Common.pm before
#radius_usergroup records can be inserted...
- @{$self->usergroup};
+ my $groups = join(',',@{$self->usergroup});
+ my @groups;
+ return @groups unless length($groups);
+ @groups = qsearch({ 'table' => 'radius_group',
+ 'extra_sql' => "where groupnum in ($groups)",
+ });
+ map { $_->groupname } @groups;
} else {
my $format = shift || '';
my @groups = qsearch({ 'table' => 'radius_usergroup',
} else {
my $format = shift || '';
my @groups = qsearch({ 'table' => 'radius_usergroup',