You cannot enumerate a collection in a foreach block and modify the collection in the same block.
Usually the solution is to get back to a plain old index iteration, starting from the end of the collection. In clear, change
foreach (account_funds f in account_Funds)
{
if (trsBalance(f.accfunds_ID) == 0) { account_Funds.Remove(f); }
}
to
for (int i = account_Funds.Count - 1; i > -1; --i)
{
var f = account_Funds[i];
if (trsBalance(f.accfunds_ID) == 0) { account_Funds.RemoveAt(i); }
}