[freeside-commits] branch FREESIDE_2_3_BRANCH updated. beb8de491440154f2dad96188c815d225b0edee8
Ivan
ivan at 420.am
Tue Mar 20 16:38:13 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via beb8de491440154f2dad96188c815d225b0edee8 (commit)
from 4bcf77b01371a888e49882de396fd2761aee3025 (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 beb8de491440154f2dad96188c815d225b0edee8
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Mar 20 16:38:07 2012 -0700
fix multiple services w/cust_bill_has_service condition, RT#17035
diff --git a/FS/FS/part_event/Condition.pm b/FS/FS/part_event/Condition.pm
index 826d4d6..ef3d0b5 100644
--- a/FS/FS/part_event/Condition.pm
+++ b/FS/FS/part_event/Condition.pm
@@ -339,11 +339,35 @@ sub condition_sql_option_option {
)";
"( SELECT optionname FROM part_event_condition_option_option
- WHERE optionnum = $optionnum
+ WHERE optionnum IN $optionnum
)";
}
+#used for part_event/Condition/cust_bill_has_service.pm
+#a little false laziness w/above and condition_sql_option_integer
+sub condition_sql_option_option_integer {
+ my( $class, $option, $driver_name ) = @_;
+
+ ( my $condname = $class ) =~ s/^.*:://;
+
+ my $optionnum =
+ "( SELECT optionnum FROM part_event_condition_option
+ WHERE part_event_condition_option.eventconditionnum =
+ cond_$condname.eventconditionnum
+ AND part_event_condition_option.optionname = '$option'
+ AND part_event_condition_option.optionvalue = 'HASH'
+ )";
+
+ my $integer = ($driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER';
+
+ my $optionname = "CAST(optionname AS $integer)";
+
+ "( SELECT $optionname FROM part_event_condition_option_option
+ WHERE optionnum IN $optionnum
+ )";
+
+}
=item condition_sql_option_age_from OPTION FROM_TIMESTAMP
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_event/Condition.pm | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list