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
This commit is contained in:
Carlos Ruiz 2012-08-29 23:38:48 -05:00
parent 1a7f975e8e
commit 6ade5ff57d
1 changed files with 2 additions and 1 deletions

View File

@ -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());