issue #23878 - merge bankrec functions

The functions have been merged and a test added. There are a number of commented-out TODO lines in the test which would fail if uncommented. They might represent misunderstandings of the desired gltrans and tax history behavior. @garyhgohoos should review the test before this PR is merged to figure out whether the test or the function should be changed.