Bank of America recorded a $10.4bn non-cash accounting charge that wiped out the lender’s quarterly earnings and underscored the sweeping effects that US financial industry reform legislation will have on banks’ business practices.The US lender wrote down goodwill to account for the effects on new debit-card fee restrictions at its credit-card division. The quarterly profit would have otherwise exceeded Wall Street’s estimates.“We are adapting to the regulatory environment, credit quality continues to improve, and we are managing risk and building capital,” Brian Moynihan, BofA’s chief executive, said Tuesday in a statement.“We are realistic about the near-challenges, and optimistic about the long-term opportunity.”The bank’s third-quarter net loss widened to $7.3bn, or 77 cents a share, from $1bn, or 26 cents, in the year-earlier period. Excluding the goodwill charge, BofA would have earned $3.1bn, or 27 cents a share. Analysts had expected 14 cents a share, according to a Bloomberg survey.The results capped a tumultuous week for BofA and other mortgage lenders now under scrutiny for the practices in processing foreclosures. BofA, which halted evictions throughout the US to review each case, said on Tuesday it would press ahead with foreclosures in 23 states.