The Florida House unanimously passed a bill that would end years of legal wrangling between the state and counties over juvenile-detention costs.

Wednesday’s vote sends the issue to Gov. Rick Scott, who will sign the bill, a spokeswoman said.