In all cases when a tender shall be made and full payment be offered, by discount or otherwise, as the party by contract or agreement ought to do, and the party to whom such tender shall be made doth refuse the same, and yet afterwards will sue for the debt or goods so tendered, the plaintiff shall not recover any costs in such suit.
815 ILCS 170/3