[freeside-commits] branch master updated. 60ca6141ee3efd2479dc89615504433a0d950356
Ivan
ivan at 420.am
Wed Sep 23 10:51:30 PDT 2015
The branch, master has been updated
via 60ca6141ee3efd2479dc89615504433a0d950356 (commit)
from 7427404751de534a767b44541f93915b35477116 (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 60ca6141ee3efd2479dc89615504433a0d950356
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Sep 23 10:51:29 2015 -0700
fix searches for cust_pay events, RT#35167
diff --git a/FS/FS/cust_event.pm b/FS/FS/cust_event.pm
index c35e118..1d8af1e 100644
--- a/FS/FS/cust_event.pm
+++ b/FS/FS/cust_event.pm
@@ -9,6 +9,7 @@ use FS::Record qw( qsearch qsearchs dbdef );
use FS::cust_main;
use FS::cust_pkg;
use FS::cust_bill;
+use FS::cust_pay;
use FS::svc_acct;
$DEBUG = 0;
@@ -305,11 +306,13 @@ sub join_sql {
LEFT JOIN cust_pay ON ( eventtable = 'cust_pay' AND tablenum = paynum )
LEFT JOIN cust_svc ON ( eventtable = 'svc_acct' AND tablenum = svcnum )
LEFT JOIN cust_pkg AS cust_pkg_for_svc ON ( cust_svc.pkgnum = cust_pkg_for_svc.pkgnum )
- LEFT JOIN cust_main ON ( ( eventtable = 'cust_main' AND tablenum = cust_main.custnum )
- OR ( eventtable = 'cust_bill' AND cust_bill.custnum = cust_main.custnum )
- OR ( eventtable = 'cust_pkg' AND cust_pkg.custnum = cust_main.custnum )
- OR ( eventtable = 'svc_acct' AND cust_pkg_for_svc.custnum = cust_main.custnum )
- )
+ LEFT JOIN cust_main ON (
+ ( eventtable = 'cust_main' AND tablenum = cust_main.custnum )
+ OR ( eventtable = 'cust_bill' AND cust_bill.custnum = cust_main.custnum )
+ OR ( eventtable = 'cust_pkg' AND cust_pkg.custnum = cust_main.custnum )
+ OR ( eventtable = 'cust_pay' AND cust_pay.custnum = cust_main.custnum )
+ OR ( eventtable = 'svc_acct' AND cust_pkg_for_svc.custnum = cust_main.custnum )
+ )
";
}
@@ -389,6 +392,11 @@ sub search_sql_where {
"tablenum = '$1'";
}
+ if ( $param->{'paynum'} =~ /^(\d+)$/ ) {
+ push @search, "part_event.eventtable = 'cust_pay'",
+ "tablenum = '$1'";
+ }
+
if ( $param->{'svcnum'} =~ /^(\d+)$/ ) {
push @search, "part_event.eventtable = 'svc_acct'",
"tablenum = '$1'";
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_event.pm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list