IDEMPIERE-3649 Location can use CityID from another tenant
This commit is contained in:
parent
1153e4d159
commit
1e20f020ab
|
@ -647,8 +647,8 @@ public class MLocation extends X_C_Location implements Comparator<Object>
|
|||
if (getC_City_ID() <= 0 && getCity() != null && getCity().length() > 0) {
|
||||
int city_id = DB.getSQLValue(
|
||||
get_TrxName(),
|
||||
"SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=?",
|
||||
new Object[] {getC_Country_ID(), getC_Region_ID(), getCity()});
|
||||
"SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=? AND AD_Client_ID IN (0,?)",
|
||||
new Object[] {getC_Country_ID(), getC_Region_ID(), getCity(), getAD_Client_ID()});
|
||||
if (city_id > 0)
|
||||
setC_City_ID(city_id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue