[freeside-commits] branch master updated. dfe18a92acfb091dca8fdd79e329616bfc1af323
Nick Logan
nick at 420.am
Fri Nov 3 11:02:36 PDT 2017
The branch, master has been updated
via dfe18a92acfb091dca8fdd79e329616bfc1af323 (commit)
from f8eee0da9fb100baefa20fb8e4ef0e8a02c6382f (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 dfe18a92acfb091dca8fdd79e329616bfc1af323
Author: Nick Logan <nick at freeside.biz>
Date: Fri Nov 3 17:46:29 2017 +0000
RT# 74452 - address code format change request
- Wrap at col 80 for new code
- Use the more familiar destructive search-and-replace instead of
the non-destructive inline search and replace (s///r) from 5.14.
- Explicitly return.
diff --git a/FS/FS/part_event/Condition/has_referral_custnum.pm b/FS/FS/part_event/Condition/has_referral_custnum.pm
index 564c652..007ce45 100644
--- a/FS/FS/part_event/Condition/has_referral_custnum.pm
+++ b/FS/FS/part_event/Condition/has_referral_custnum.pm
@@ -1,6 +1,5 @@
package FS::part_event::Condition::has_referral_custnum;
-use v5.14;
use strict;
use FS::cust_main;
@@ -61,14 +60,19 @@ sub condition {
sub condition_sql {
my( $class, $table, %opt ) = @_;
- my $age = $class->condition_sql_option_age_from('age', $opt{'time'});
- my $balance_sql = FS::cust_main->balance_sql( $age ) =~ s/cust_main.custnum/cust_main.referral_custnum/r;
- my $balance_date_sql = FS::cust_main->balance_date_sql =~ s/cust_main.custnum/cust_main.referral_custnum/r;
- my $active_sql = FS::cust_main->active_sql =~ s/cust_main.custnum/cust_main.referral_custnum/r;
+ my $age = $class->condition_sql_option_age_from('age', $opt{'time'});
+ my $balance_sql = FS::cust_main->balance_sql( $age );
+ my $balance_date_sql = FS::cust_main->balance_date_sql;
+ my $active_sql = FS::cust_main->active_sql;
+ $balance_sql =~ s/cust_main.custnum/cust_main.referral_custnum/;
+ $balance_date_sql =~ s/cust_main.custnum/cust_main.referral_custnum/;
+ $active_sql =~ s/cust_main.custnum/cust_main.referral_custnum/;
my $sql = "cust_main.referral_custnum IS NOT NULL".
- " AND ( ". $class->condition_sql_option('active') . " IS NULL OR $active_sql )".
- " AND ( $balance_date_sql <= $balance_sql )";
+ " AND (".$class->condition_sql_option('active')." IS NULL OR $active_sql)".
+ " AND ($balance_date_sql <= $balance_sql)";
+
+ return $sql;
}
1;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_event/Condition/has_referral_custnum.pm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list