Skip to content

Commit

Permalink
fix: Postal code filter sql on bp field.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Dec 17, 2024
1 parent 47addab commit 7b7182f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static ListBusinessPartnersInfoResponse.Builder listBusinessPartnersInfo(
final String eMail = ValueManager.getDecodeUrl(
request.getEmail()
);
if (!Util.isEmpty(eMail)) {
if (!Util.isEmpty(eMail, true)) {
whereClause.append(" AND C_BPartner.C_BPartner_ID IN (SELECT C_BPartner_ID FROM AD_User AS c ")
.append("WHERE UPPER(c.EMail) LIKE '%' || UPPER(?) || '%') ");
parametersList.add(eMail);
Expand All @@ -194,7 +194,7 @@ public static ListBusinessPartnersInfoResponse.Builder listBusinessPartnersInfo(
);
if (!Util.isEmpty(postalCode)) {
whereClause.append(" AND C_BPartner_ID IN (SELECT C_BPartner_ID FROM C_BPartner_Location bpl, C_Location AS l ")
.append("WHERE l.C_Location_ID = bpl.C_Location_ID AND UPPER(Postal) '%' || UPPER(?) || '%') ")
.append("WHERE l.C_Location_ID = bpl.C_Location_ID AND UPPER(Postal) LIKE '%' || UPPER(?) || '%') ")
;
parametersList.add(postalCode);
}
Expand Down

0 comments on commit 7b7182f

Please sign in to comment.