String country = externalsales.encodeString(remoteUser.getCountry());
String phone = externalsales.encodeString(remoteUser.getPhone());
String mobile = externalsales.encodeString(remoteUser.getMobile());
String zipcode = externalsales.encodeString(remoteUser.getZipcode());
CustomerSync copyCustomer = new CustomerSync(remoteUser.getId());
if (firstname==null || firstname.equals(""))
firstname =" ";
copyCustomer.setFirstname(firstname.toUpperCase());
if (lastname==null || lastname.equals(""))
lastname =" ";
copyCustomer.setLastname(lastname.toUpperCase());
copyCustomer.setTaxid(remoteUser.getLogin());
copyCustomer.setSearchkey(remoteUser.getLogin()+name.toUpperCase());
if (name==null || name.equals(""))
name =" ";
copyCustomer.setName(name.toUpperCase());
if (description==null || description.equals(""))
description =" ";
copyCustomer.setNotes(description);
copyCustomer.setEmail(remoteUser.getEmail());
if (address==null || address.equals(""))
address =" ";
copyCustomer.setAddress(address);
if (address2==null || address2.equals(""))
address2 =" ";
copyCustomer.setAddress2(address2);
if (city==null || city.equals(""))
city ="Brussels";
copyCustomer.setCity(city);
if (country==null || country.equals(""))
country ="Belgium";
copyCustomer.setCountry(country);
copyCustomer.setMaxdebt(10000.0);
if (phone==null || phone.equals(""))
phone=" ";
copyCustomer.setPhone(phone);
if (mobile==null || mobile.equals(""))
mobile =" ";
copyCustomer.setPhone2(mobile);
if (zipcode==null || zipcode.equals(""))
zipcode =" ";
copyCustomer.setPostal(zipcode);
// SYNC ONLY EMAIL USER FOR OGONE (ZAV)
if (TicketInfo.isWS()
&& TicketInfo.getPayID()==2
&& remoteUser.getEmail().contains("@DONOTSENDME")) {
notToSync.add(copyCustomer.getTaxid());
continue;
}
//Updates local user
dlintegration.syncCustomer(copyCustomer);
notToSync.add(copyCustomer.getTaxid());
}
}
} while (remoteUsers.length > 0 );