1. Formerly it was the practice when an action was brought for an agreed price of work which was to be performed according to contract, to allow the plaintiff to recover the stipulated sum, leaving the defendant to his cross action for breach of the contract; because the law construed the contract *562as not importing that the performance of every portion of the work should be a condition precedent to the payment of the stipulated price, otherwise the least deviation would deprive the plaintiff of the whole price, and therefore the defendant was obliged to pay the price and recover for any breach of contract on the other side. Such seems to have been bis Honor’s view in this case, for in effect he charged the jury that the de fendant, having by his acts accepted the work without complaint, was obliged to pay the contract price, although it was done in an unworkmanlike manner. y
2. But after the case of Barton v. Butler, 9. East. 479, a A' A t' ’ new departure in the practice began, and being attended with great convenience, has since been generally followed. The defendant was permitted to show that the work, in consequence of the non performance of tbe contract, was diminished in value, and the rule was established that it was competent for tbe defendant not to set off by a procedure, in the nature of a cross action, the amount of damages which he had sustained by a broach of the contract, but simply to defend himself by showing how much less the subject matter of the action was worth by reason of the breach of the contract, and to the extent that he obtained an abatement of the price he was considered as having received satisfaction for tbe breach of contract, and to that extent, but no more, he was precluded from recovery in another action. So it became established, 1st, that the buyer might set up the objective quality of tbe work in diminution of the price ; and 2d, that be might bring a cross action if be desired to claim special or consequential damages, which latter action was not barred by reason of his having obtained a diminution of the price in a previous action brought by the vendor.
3. Tbe third and last improvement in pleading and practice, is that introduced by C. C. P., secs. 100 aud 101, wherein the defendant may not only set up the defence of a defect in the quality of his purchase and reduce the judgment by the amount of the difference in value of the article as contracted for and *563as received, but he also bas the benefit of the cross action, and can, by counter claim, obtain affirmative relief to the extent of any special or consequential damage sustained.
Numerous cases establish the foregoing propositions. In Poulton v. Lattimore, 9 B. & C. 239, the buyer’s defence in an action for the price was successful for the whole amount of the price. The vendor sued to recover the price of seed, warranted to be good growing seed, which the purchaser had sold to two other persons, who proved that the seed was worthless, and that they neither had paid or would pay for it. And it. was further held in the same case, that the buyer might insist: on his defence without returning or offering to return the seed,, and might even sustain a direct action for damages against the-vendor without previous notice. In Mondell v. Steel, M. & W. 858, a leading case, it is held that although the buyer, by his acceptance of the article, has the title indefeasibly vested1 in him so that he cannot return it, yet that does not constitute-an abandonment of his remedy by cross action, or his right to insist in defence on the reduction of the price. And in Dengle v. Hare, 7 C. & B. (N. S.) 145, the Court went farther and held that the jury bad properly allowed the purchaser the-difference of value between the article delivered and the article-as warranted ; and in Jones v. Just, 3 Q. B. 197, the buyer recovered as damages £750, although by reason of a rise in the-market be sold the inferior article for about as much as he originally gave for it. In Randall v. Raper, 27, Q. B. 266, it' was held that the buyer could recover all the damages be would be liable for to his sub-vendees, although- the plaintiff? bad not paid the claims of the sub-vendees, because-the bnyer. was liable over, and therefore these damages were the necessary consequence of the breach of contract by the original, vendor.
In onr case the defendant, by his conduct, accepted the machinery aud made it his own, and he is liable for the value of' the work as done and delivered. The rule for ascertaining the-amount due, is “ if the work contracted for isAworth the sum:. *564agreed, what is it worth as done ?” Farmer v. Francis, 12 Ired. 282; Benjamin on Sales, 572-3.
As the plaintiff appears to be entitled to recover something under onr liberal system of pleading, we cannot allow the motion to dismiss because of the variance between the allegation and proof, bnt suggest that the plaintiff amend his complaint .so as to conform to his proof.
Pee GueiaM. Venire de novo.