[freeside-commits] branch master updated. 77c039757aa4733b1498bdfe25ab287f60698c72
Ivan
ivan at 420.am
Tue Mar 20 11:34:37 PDT 2012
The branch, master has been updated
via 77c039757aa4733b1498bdfe25ab287f60698c72 (commit)
from 4d912748b3db3981fd03cdf74df7da696320f46d (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 77c039757aa4733b1498bdfe25ab287f60698c72
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Mar 20 11:34:35 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