X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_inbound.pm;h=4937bb86b8e3df7d5f6f534e3b9f1f0ff01995f4;hb=4117c20f85ce085d7dd42b8970ce9c65b95d7e27;hp=15291e31b78d2c7a977ba30c955d125a129c3d13;hpb=b540a4a1b7e6ae2e48b2c3b63fc1a5ad79cfe63e;p=freeside.git diff --git a/FS/FS/part_pkg/voip_inbound.pm b/FS/FS/part_pkg/voip_inbound.pm index 15291e31b..4937bb86b 100644 --- a/FS/FS/part_pkg/voip_inbound.pm +++ b/FS/FS/part_pkg/voip_inbound.pm @@ -163,7 +163,6 @@ tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities(); use_duration output_format usage_mandate summarize_usage usage_section bill_every_call - count_available_phones ) ], 'weight' => 40, @@ -366,15 +365,8 @@ sub is_free { # to indicate it represents a line sub calc_units { my($self, $cust_pkg ) = @_; - my $count = 0; - if ( $self->option('count_available_phones', 1)) { - map { $count += ( $_->quantity || 0 ) } - grep { $_->part_svc->svcdb eq 'svc_phone' } - $cust_pkg->part_pkg->pkg_svc; - } else { - $count = + my $count = scalar(grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc); - } $count; }