Commit daa5e6cf authored by Thomas Huster's avatar Thomas Huster
Browse files

[16526] enabled mandant responsible text place holders

parent 92de6f3f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ package ch.elexis.data;
import java.util.Objects;

import ch.elexis.core.constants.StringConstants;
import ch.elexis.core.model.IPersistentObject;
import ch.rgw.tools.JdbcLink;

/**
@@ -130,4 +131,16 @@ public class Mandant extends Anwender {
		return Kontakt.TABLENAME;
	}
	
	public IPersistentObject getReferencedObject(String fieldl){
		if (fieldl != null) {
			if ("Responsible".equals(fieldl)) {
				String responsibleId =
					(String) getExtInfoStoredObjectByKey("ch.elexis.tarmedprefs.responsible");
				if (responsibleId != null && !responsibleId.isEmpty()) {
					return Mandant.load(responsibleId);
				}
			}
		}
		return null;
	}
}
+8 −0
Original line number Diff line number Diff line
@@ -452,6 +452,14 @@ public class TextContainer {
			Fall fall = (Fall) parent;
			
			return fall.getReferencedObject(fieldl);
		} else if (parent instanceof Mandant) {
			String fieldl = field;
			if (fieldl.substring(0, 1).equalsIgnoreCase(DONT_SHOW_REPLACEMENT_ERRORS)) {
				fieldl = fieldl.substring(1);
			}
			Mandant mandant = (Mandant) parent;
			
			return mandant.getReferencedObject(fieldl);
		} else {
			// not yet supported
			return null;