#20229 Refactoring WIP

Work-in-progress of some refactor ideas. Feel free to review and offer feedback. Most of these changes are relevant to issues I ran into while implementing Issue #22029: CashReceipt in SalesOrder Workspace