[freeside-commits] freeside/FS/FS/part_pkg flat.pm,1.29,1.30
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Mar 17 17:30:45 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv4724/FS/FS/part_pkg
Modified Files:
flat.pm
Log Message:
hide unused usage columns
Index: flat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- flat.pm 22 Feb 2009 10:58:50 -0000 1.29
+++ flat.pm 18 Mar 2009 00:30:42 -0000 1.30
@@ -195,12 +195,17 @@
0; #no, we're postpaid
}
+sub usage_valuehash {
+ my $self = shift;
+ map { $_, $self->option($_) }
+ grep { $self->option($_, 'hush') }
+ qw(seconds upbytes downbytes totalbytes);
+}
+
sub reset_usage {
my($self, $cust_pkg, %opt) = @_;
warn " resetting usage counters" if $opt{debug} > 1;
- my %values = map { $_, $self->option($_) }
- grep { $self->option($_, 'hush') }
- qw(seconds upbytes downbytes totalbytes);
+ my %values = $self->usage_valuehash;
if ($self->option('usage_rollover', 1)) {
$cust_pkg->recharge(\%values);
}else{
More information about the freeside-commits
mailing list