[freeside-commits] freeside/FS/FS Conf.pm, 1.288, 1.289 svc_acct.pm, 1.259, 1.260
Ivan,,,
ivan at wavetail.420.am
Fri May 29 19:31:41 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv8710
Modified Files:
Conf.pm svc_acct.pm
Log Message:
require svc_acct-usage_threshold to be set explicitly, don't default to 80%
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -d -r1.288 -r1.289
--- Conf.pm 29 May 2009 23:17:24 -0000 1.288
+++ Conf.pm 30 May 2009 02:31:39 -0000 1.289
@@ -2014,7 +2014,7 @@
{
'key' => 'svc_acct-usage_threshold',
'section' => 'billing',
- 'description' => 'The threshold (expressed as percentage) of acct.seconds or acct.up|down|totalbytes at which a warning message is sent to a service holder. Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd. Defaults to 80.',
+ 'description' => 'The threshold (expressed as percentage) of acct.seconds or acct.up|down|totalbytes at which a warning message is sent to a service holder. Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
'type' => 'text',
},
Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- svc_acct.pm 27 May 2009 07:50:40 -0000 1.259
+++ svc_acct.pm 30 May 2009 02:31:39 -0000 1.260
@@ -539,12 +539,13 @@
my %values = $part_pkg->usage_valuehash;
my $multiplier = $conf->exists('svc_acct-usage_threshold')
? 1 - $conf->config('svc_acct-usage_threshold')/100
- : 0.20;
+ : 0.20; #doesn't matter
foreach ( keys %values ) {
next if $self->getfield($_);
$self->setfield( $_, $values{$_} );
- $self->setfield( $_. '_threshold', int( $values{$_} * $multiplier ) );
+ $self->setfield( $_. '_threshold', int( $values{$_} * $multiplier ) )
+ if $conf->exists('svc_acct-usage_threshold');
}
}
More information about the freeside-commits
mailing list