summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2007-07-06 23:55:02 +0000
committerjeff <jeff>2007-07-06 23:55:02 +0000
commitd1b6ce295f658915a8291e68a56c91c914ea3025 (patch)
tree63f33c705d8932e12dc879040fcfd1f9b4d808d0
parent0ac49f12dc2b79f48bea613942461192eebd1107 (diff)
manually editing usage counters removes overlimit status (#1706)
-rwxr-xr-xhttemplate/edit/process/svc_acct.cgi10
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi
index a4a6c0015..d9aac9fac 100755
--- a/httemplate/edit/process/svc_acct.cgi
+++ b/httemplate/edit/process/svc_acct.cgi
@@ -38,7 +38,15 @@
%
%my $error;
%if ( $svcnum ) {
-% $error = $new->replace($old);
+% foreach (grep { $old->$_ != $new->$_ } qw( seconds upbytes downbytes totalbytes )) {
+% my %hash = map { $_ => $new->$_ }
+% grep { $new->$_ }
+% qw( seconds upbytes downbytes totalbytes );
+%
+% $error = $new->set_usage(\%hash); #unoverlimit and trigger radius changes
+% last; #once is enough
+% }
+% $error ||= $new->replace($old);
%} else {
% $error = $new->insert;
% $svcnum = $new->svcnum;