The deal was cut behind closed doors, and its details were in flux until late Saturday. The full Legislature took final votes Sunday, almost two weeks after the June 30 statutory deadline.