From 4ba6cdd8ec90f9b887bf8187671d117fd7d6c922 Mon Sep 17 00:00:00 2001 From: Edwin Betancourt Date: Tue, 17 Dec 2024 17:58:23 -0400 Subject: [PATCH] fix: Postal code filter sql on bp field. (#952) --- .../service/field/business_partner/BusinessPartnerLogic.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/spin/grpc/service/field/business_partner/BusinessPartnerLogic.java b/src/main/java/org/spin/grpc/service/field/business_partner/BusinessPartnerLogic.java index cb8b555b..8a34697a 100644 --- a/src/main/java/org/spin/grpc/service/field/business_partner/BusinessPartnerLogic.java +++ b/src/main/java/org/spin/grpc/service/field/business_partner/BusinessPartnerLogic.java @@ -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); @@ -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); }