if a party has done what was substantially required under the contract then the doctrine of substantial performance may apply. There must be payment of the amount appropriate to what has been done.
Hoenig V Isaacs- defective furniture, paid on quantum meruit.
Bolton V Mahadeva- heating did not work properly, not substantial performance.