[freeside-commits] freeside/httemplate/edit/process svc_acct.cgi, 1.9, 1.10

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Jul 6 16:55:29 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail:/tmp/cvs-serv30518

Modified Files:
	svc_acct.cgi 
Log Message:
manually editing usage counters removes overlimit status (#1706)

Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/svc_acct.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- svc_acct.cgi	19 Apr 2007 23:30:40 -0000	1.9
+++ svc_acct.cgi	6 Jul 2007 23:55:26 -0000	1.10
@@ -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;



More information about the freeside-commits mailing list