boolean changed = false;
if (enabledExtensions.contains(PoHeader.ID)) {
PoHeader poHeaderExt = from.findByType(PoHeader.class);
if (poHeaderExt != null) {
HPoHeader poHeader = to.getPoHeader();
if (poHeader == null) {
log.debug("create a new HPoHeader");
poHeader = new HPoHeader();
}
changed |= transferFromPoHeader(poHeaderExt, poHeader);
if (to.getPoHeader() == null && changed) {
to.setPoHeader(poHeader);