State poised to end year with surplus