From 6ade5ff57d96defa64cea7c48f3603c2e1b8efc7 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 29 Aug 2012 23:38:48 -0500 Subject: [PATCH] IDEMPIERE-222 I suggest improvement on ImportBpartner.class to include checking of null for C_Region_ID when updating C_BPartner_Location Thanks to Simbarashe Musabaike --- .../src/org/compiere/process/ImportBPartner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java index 55b575e4df..be27f2c990 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java @@ -254,7 +254,8 @@ implements ImportProcess + " AND (i.City=l.City OR (i.City IS NULL AND l.City IS NULL))" + " AND (i.Postal=l.Postal OR (i.Postal IS NULL AND l.Postal IS NULL))" + " AND (i.Postal_Add=l.Postal_Add OR (l.Postal_Add IS NULL AND l.Postal_Add IS NULL))" - + " AND i.C_Region_ID=l.C_Region_ID AND i.C_Country_ID=l.C_Country_ID) " + + " AND (i.C_Region_ID=l.C_Region_ID OR (l.C_Region_ID IS NULL AND i.C_Region_ID IS NULL))" + + " AND i.C_Country_ID=l.C_Country_ID) " + "WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL" + " AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName());