[freeside-commits] branch FREESIDE_3_BRANCH updated. 1c1acee279d419551ad27e3ea9a70fca5d3fd7dc
Mark Wells
mark at 420.am
Wed Nov 20 16:23:36 PST 2013
The branch, FREESIDE_3_BRANCH has been updated
via 1c1acee279d419551ad27e3ea9a70fca5d3fd7dc (commit)
from 9c8ee335eed13794665715919acc344e47e4504f (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 1c1acee279d419551ad27e3ea9a70fca5d3fd7dc
Author: Mark Wells <mark at freeside.biz>
Date: Wed Nov 20 16:22:18 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