[freeside-commits] branch FREESIDE_3_BRANCH updated. ddbea80d28f423a9e5ad3f879545cff4434a4ed8
Ivan
ivan at 420.am
Wed Sep 23 10:51:33 PDT 2015
The branch, FREESIDE_3_BRANCH has been updated
via ddbea80d28f423a9e5ad3f879545cff4434a4ed8 (commit)
from 70054fbcf1d7172deba9d5aca04beab37bbe53e6 (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 ddbea80d28f423a9e5ad3f879545cff4434a4ed8
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Sep 23 10:51:32 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 07a9701..1ef511a 100644
--- a/FS/FS/cust_event.pm
+++ b/FS/FS/cust_event.pm
@@ -10,6 +10,7 @@ use FS::part_event;
use FS::cust_main;
use FS::cust_pkg;
use FS::cust_bill;
+use FS::cust_pay;
use FS::svc_acct;
$DEBUG = 0;
@@ -313,11 +314,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 )
+ )
";
}
@@ -401,6 +404,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