[freeside-commits] branch master updated. 60540a339512bf608553e5c54ec9bfbb5bc6edbc
Mark Wells
mark at 420.am
Wed Nov 20 16:23:36 PST 2013
The branch, master has been updated
via 60540a339512bf608553e5c54ec9bfbb5bc6edbc (commit)
from 4ed0a352b2319c2fc14ee7af09a21caf727e7b12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 60540a339512bf608553e5c54ec9bfbb5bc6edbc
Author: Mark Wells <mark at freeside.biz>
Date: Wed Nov 20 16:23:31 2013 -0800
package quantities + CCH per-available-line taxes, #25918
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index 5a27f06..f23b7a7 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -611,9 +611,12 @@ 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;
+ foreach my $pkg_svc ($cust_pkg->part_pkg->pkg_svc) {
+ if ($pkg_svc->part_svc->svcdb eq 'svc_phone') { # svc_pbx?
+ $count += $pkg_svc->quantity || 0;
+ }
+ }
+ $count *= $cust_pkg->quantity;
} else {
$count =
scalar(grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc);
diff --git a/FS/FS/part_pkg/voip_inbound.pm b/FS/FS/part_pkg/voip_inbound.pm
index 811329d..ec95c90 100644
--- a/FS/FS/part_pkg/voip_inbound.pm
+++ b/FS/FS/part_pkg/voip_inbound.pm
@@ -399,6 +399,7 @@ sub is_free {
# This equates svc_phone records; perhaps svc_phone should have a field
# to indicate it represents a line
+# #XXX no count_available_phones?
sub calc_units {
my($self, $cust_pkg ) = @_;
my $count =
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/voip_cdr.pm | 9 ++++++---
FS/FS/part_pkg/voip_inbound.pm | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list