Fixes issue 21588: FIN_BankStatementImport.finBPByName method needs correction.
authorIoritz Cia <ioritz.cia@openbravo.com>
Fri, 14 Sep 2012 13:17:34 +0200
changeset 17971 1ba52792abc2
parent 17970 f7344c95ba24
child 17972 4e6bdb057dbd
Fixes issue 21588: FIN_BankStatementImport.finBPByName method needs correction.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Mon Sep 17 18:52:35 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Fri Sep 14 13:17:34 2012 +0200
@@ -261,7 +261,7 @@
 
   private BusinessPartner matchBusinessPartnerByName(String partnername, Organization organization,
       FIN_FinancialAccount account) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     final StringBuilder whereClause = new StringBuilder();
@@ -296,7 +296,7 @@
   }
 
   private BusinessPartner finBPByName(String partnername, Organization organization) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     final StringBuilder whereClause = new StringBuilder();
@@ -329,7 +329,7 @@
 
   private BusinessPartner matchBusinessPartnerByNameTokens(String partnername,
       Organization organization) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     StringTokenizer st = new StringTokenizer(partnername);