[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 33106f75b1cec97c1ced05460bb706a9ee17a317
Ivan
ivan at 420.am
Tue Mar 20 11:34:40 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 33106f75b1cec97c1ced05460bb706a9ee17a317 (commit)
from a655e41afacdc0bbfbde4c8ee07e8656ed2b6b57 (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 33106f75b1cec97c1ced05460bb706a9ee17a317
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Mar 20 11:34:37 2012 -0700
fix multiple services w/cust_bill_has_service condition, RT#17035
diff --git a/FS/FS/part_event/Condition/cust_bill_has_service.pm b/FS/FS/part_event/Condition/cust_bill_has_service.pm
index 3f3c908..80c47cf 100644
--- a/FS/FS/part_event/Condition/cust_bill_has_service.pm
+++ b/FS/FS/part_event/Condition/cust_bill_has_service.pm
@@ -6,7 +6,7 @@ use FS::cust_bill;
use base qw( FS::part_event::Condition );
sub description {
- 'Invoice is billing for a certain service type';
+ 'Invoice is billing for certain service definitions';
}
sub eventtable_hashref {
@@ -34,10 +34,10 @@ sub condition {
#my($self, $cust_bill, %opt) = @_;
my($self, $cust_bill) = @_;
- my $servicenum = $self->option('has_service');
+ my $servicenum = $self->option('has_service') || {};
- grep { $servicenum == $_->svcpart }
- map { $_->cust_svc }
+ grep $servicenum->{ $_->svcpart },
+ map $_->cust_svc,
$cust_bill->cust_pkg;
}
@@ -45,13 +45,13 @@ sub condition_sql {
my( $class, $table, %opt ) = @_;
my $servicenum =
- $class->condition_sql_option_integer('has_service', $opt{'driver_name'});
+ $class->condition_sql_option_option('has_service');
my $sql = qq| 0 < ( SELECT COUNT(cs.svcpart)
FROM cust_bill_pkg cbp, cust_svc cs
WHERE cbp.invnum = cust_bill.invnum
AND cs.pkgnum = cbp.pkgnum
- AND cs.svcpart = $servicenum
+ AND cs.svcpart IN $servicenum
)
|;
return $sql;
-----------------------------------------------------------------------
Summary of changes:
.../part_event/Condition/cust_bill_has_service.pm | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list