Officers charged with the disbursement of public moneys shall not pay any warrant or other evidence of indebtedness against the State, county, or city when it has been purchased, sold, received, or transferred contrary to any of the provisions of this article.