Issue #23459 Issue #23937 Support external pre-auths with no card_id.

Uses:
https://github.com/xtuple/qt-client/pull/381
Since the query is getting rewritten, it would be nice to move the join conditions for `custinfo` and `ccard` from the `where` clause to `from ... join`. Please also throw in the syntactic sugar `outer`  to clarify the `left join` for the less experienced reader.