projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 75095 - added comment
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
b8d8f10
..
7c9868d
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-3033,7
+3033,7
@@
contacts with a matching cust_contact.classnum are returned. When a
classnum of 0 is given, contacts with a null classnum are also included.
Arguments may also contain the dest flag names 'invoice' or 'message'.
classnum of 0 is given, contacts with a null classnum are also included.
Arguments may also contain the dest flag names 'invoice' or 'message'.
-If given, contacts who's invoice_dest and/or
invoice_message
flags are
+If given, contacts who's invoice_dest and/or
message_dest
flags are
not set to 'Y' will be excluded.
=cut
not set to 'Y' will be excluded.
=cut
@@
-3072,14
+3072,15
@@
sub contact_list {
# WHERE ...
# AND (
# WHERE ...
# AND (
- # ( cust_contact.classnum IN (1,2,3) )
- # OR
- # ( cust_contact.classnum IS NULL )
- #
+ # (
+ # cust_contact.classnum IN (1,2,3)
+ # OR
+ # cust_contact.classnum IS NULL
+ # )
# AND (
# AND (
- #
( cust_contact.invoice_dest = 'Y' )
+ #
cust_contact.invoice_dest = 'Y'
# OR
# OR
- #
( cust_contact.message_dest = 'Y' )
+ #
cust_contact.message_dest = 'Y'
# )
# )
# )
# )
@@
-3105,12
+3106,14
@@
sub contact_list {
$search->{extra_sql} .= ' AND ( ';
if (@or_classnum) {
$search->{extra_sql} .= ' AND ( ';
if (@or_classnum) {
- $search->{extra_sql} .= join ' OR ', map {" ($_) "} @or_classnum;
+ $search->{extra_sql} .= ' ( ';
+ $search->{extra_sql} .= join ' OR ', map {" $_ "} @or_classnum;
+ $search->{extra_sql} .= ' ) ';
$search->{extra_sql} .= ' AND ( ' if @and_dest;
}
if (@and_dest) {
$search->{extra_sql} .= ' AND ( ' if @and_dest;
}
if (@and_dest) {
- $search->{extra_sql} .= join ' OR ', map {"
($_)
"} @and_dest;
+ $search->{extra_sql} .= join ' OR ', map {"
$_
"} @and_dest;
$search->{extra_sql} .= ' ) ' if @or_classnum;
}
$search->{extra_sql} .= ' ) ' if @or_classnum;
}