Mike.Sheen wrote:If you're wanting to come up with a query for the user to select an account, is there any reason why you wouldn't want the user to select a distribution account?
Not sure. As it happens, this particular customer has no distribution accounts, so it's moot.
That said, I will remove that restriction and allow the customers' accountants to make their own choices

This is for selecting an account for credit card surcharges attached to a sales invoice.
The code will hardly ever be used (probably only once when the plugin is activated), and I probably don't need to filter it at all, but I thought I might as well at least filter out obviously wrong accounts.