Incdt feature 21585

most of my comments are in here: https://github.com/tjwebb/xtuple/commit/f81b10d07c61b265b58e6894c96e0782db8094a2