No, not unless the contract itself in some way gives the client the right to apply set-offs from prior jobs. Each contract stands on its own otherwise: the client must pay for the work done as per this contract, and if the client does not pay, you could sue them for breach of contract. If the client feels that there was breach of a prior contract, or professionally negligent work, they could try to sue (if you don't sue them) for that, or to interpose a counterclaim (if you do) for it, subject, of course, to still being within the statutes of limitations; such a suit or counterclaim would be grounded in the prior contract.