Wrong account balance

I am confused by this:

The GL shows the correct balance for this account

However, on the account tree I have this wrong balance. The utility function get_balance_on also shows the wrong balance

The transactions are created programmatically from a Google Sheet so I may have messed up something but I have failed to figure out

Have you tried this Rubber duck debugging - Wikipedia

It beats trying to explain what you have done to your audience for someone to respond