Incdt feature 21585

most of the comments for this are here: https://github.com/tjwebb/xtuple/commit/f81b10d07c61b265b58e6894c96e0782db8094a2