What do I do with closed bank accounts?

I have recently been switching to new bank accounts. I now have a bunch of accounts which have been closed, and have a balance of zero. Can I somehow delete or hide them in such a way that they don’t show up in my list of bank accounts? Obviously I need to keep the old transactions from them, and I guess it’d still be useful to see them in the Chart of Accounts. Just wondering if I can remove them from the “Banks” screen somehow.

Hi @chmac

There isn’t a way of hiding them in your banking list at the moment (although we can certainly consider adding this as future development). You can remove them from your dashboard however by going into the settings for those accounts.

The only way I can think to do it currently is with “custom scripts” in the advanced customisation area (this may only be available with a Power User subscription). Something like the following:

jQuery(function($) {
    // remove dead bank accounts
    $('body.page-bank-index .tblbank .dataRow')
        .filter((i, e) => {
            var nom = $('input.hdnbankNominalID', e).attr('value');
            return (nom == "1200")
                || (nom == "1261")
            ;
        }).remove();
});

The idea here is that I’m removing the rows for accounts with particular nominal codes - you can add as many || (nom == "12xx") lines as you need before the closing semicolon.

Removing them from the drop-down list of bank accounts that you get when logging a payment is trickier but it could be done with a similar trick - just before the final }); add:

    $(document).on('focus', 'select#dropBank', function(e) {
        $('option[value=1200-GBP], option[value=1261-GBP]', this).remove();
    });

again you can add extra nominals if you need to. What this does is intercept any time you’re about to pop-up the bank account selection box in a “log payment” and removes the options for the accounts you want to hide.

2 Likes

@ian_roberts Nice idea! I could probably do the same with a greasemonkey script. Guess I’m not that motivated, I can also just ignore the old bank accounts, but I love the concept of a script!

Any idea what happens if I delete a bank account which has reached a balance of zero?

You can’t delete an account that has any transactions in it, even if the final balance is zero.

1 Like

This topic was automatically closed after 7 days. New replies are no longer allowed.