2910425 Import BP fails to match existing address on Postgres
https://sourceforge.net/tracker/?func=detail&aid=2910425&group_id=176962&atid=879332
This commit is contained in:
parent
1152bf59a8
commit
f526073e2b
|
@ -249,8 +249,9 @@ implements ImportProcess
|
||||||
+ "SET C_BPartner_Location_ID=(SELECT C_BPartner_Location_ID"
|
+ "SET C_BPartner_Location_ID=(SELECT C_BPartner_Location_ID"
|
||||||
+ " FROM C_BPartner_Location bpl INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)"
|
+ " FROM C_BPartner_Location bpl INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)"
|
||||||
+ " WHERE i.C_BPartner_ID=bpl.C_BPartner_ID AND bpl.AD_Client_ID=i.AD_Client_ID"
|
+ " WHERE i.C_BPartner_ID=bpl.C_BPartner_ID AND bpl.AD_Client_ID=i.AD_Client_ID"
|
||||||
+ " AND DUMP(i.Address1)=DUMP(l.Address1) AND DUMP(i.Address2)=DUMP(l.Address2)"
|
+ " AND COALESCE(i.Address1, 'NULL')=COALESCE(l.Address1, 'NULL') AND COALESCE(i.Address2, 'NULL')=COALESCE(l.Address2, 'NULL')"
|
||||||
+ " AND DUMP(i.City)=DUMP(l.City) AND DUMP(i.Postal)=DUMP(l.Postal) AND DUMP(i.Postal_Add)=DUMP(l.Postal_Add)"
|
+ " AND COALESCE(i.City, 'NULL')=COALESCE(l.City, 'NULL') AND COALESCE(i.Postal, 'NULL')=COALESCE(l.Postal, 'NULL')"
|
||||||
|
+ " AND COALESCE(i.Postal_Add, 'NULL')=COALESCE(l.Postal_Add, '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 AND i.C_Country_ID=l.C_Country_ID) "
|
||||||
+ "WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL"
|
+ "WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL"
|
||||||
+ " AND I_IsImported='N'").append(clientCheck);
|
+ " AND I_IsImported='N'").append(clientCheck);
|
||||||
|
|
Loading…
Reference in New Issue