
    Elbridge G. Allen vs. James McKibbin.
    Where a party fails to comply substantially with an agreement, he can not sue or recover upon tho agreement at all, unless it is apportionahle.
    But where anything has been done under such agreement, from which the other party has ‘received substantial benefit, and which he has appropriated, a recovery, based upon that benefit, may be had on a quantum meruit. The basis of that recovery is not tho original contract, but a new implied agreement, deducible from the delivery and acceptance of some valuable service or thing.
    Where action is brought on a quantum meruit for labor done under a special contract, which has not been substantially performed by the plaintiff on his part the plaintiff can in no caso recover more than the contract-price; and can not recover that, if his work is not reasonably worth it, or if, hy paying it, the rest of the work will cost the defendant more than if the whole had been completed under the contract.
    The party in default, in such case, can never gain by his default, and the other party can never he permitted to lose hy it.
    And where, in such case, the Court excluded evidence offered hy defendant to prove that the work was not worth the contract-price, and charged the jury that, if there had been a partial performance, from which defendant had derived benefit, plaintiff was entitled to recover the contract-price, deducting any damages which defendant had sustained hy reason of non-performance*, — Held, That such exclusion of evidence and such charge were erroneous.
    If, in such case, thero are damages growing out of the non-performance of the special contract, which do not enter into the contract-price, the defendant may recoup them in the action brought hy plaintiff upon a quantum meruit.
    
    
      Heard June 11th.
    
    
      Decided July 15th.
    
    Error to Wayne Circuit, where judgment was rendered for defendant in error, wbo was plaintiff below, and the case brought up for review upon exceptions to the exclusion of evidence and to the charge of the Court.
    The case, so far as passed upon, is fully stated in the opinion.
    
      Burt & Maynard, for plaintiff in error:
    If plaintiff has performed services for which he would be entitled to recover in the absence of any special contract, he may recover upon the quantum meruit for services done under the contract but not according to its terms. In such case, the law implies a promise on the part of defendant to pay what the services are reasonably worth, but the contract-price shall not be exceeded, as the plaintiff shall not be permitted to gain by violating his contract. Plaintiff brings his action not upon the contract, but upon tbe implied promise of defendant, the same as though no special contract had ever been made; but defendant, il he elects to do so, may introduce the contract, and then plaintiff shall not recover to exceed the contract-price. The plaintiff can not give the contract in evidence, either to support the action, or to determine the rule of compensation. — Reed vs. Phillips, 4 Scam. 42; 
      Gazzam vs. Kirby, 8 Port. 258; Derby vs. Johnson, 21 Vt. 17; Merrill vs. Ithaca R. R. Co. 16 Wend. 586; Clark vs. Mayor, &c. of New York, 4 Comst. 343; Linningdale vs. Livingston, 10 Johns. 36; King vs. Boston, 7 East, 481, Note.
    
    The party who has been guilty of no default may waive the contract, if he elects to do so, as against the party in default; and may have his rights and liabilities determined precisely the same as if no contract had been made. If sued for services not performed by plaintiff according to the contract, when he himself is not in fault, he is bound by no stipulations in the contract, but can only be compelled to pay the value of the services rendered, though much less than the contract-price.
    
      Jerome <£ Swift, for defendant in error:
    All the law aims at in cases of breach of contract is to give the party compensation for the loss he has sustained. The plaintiff in error in this case claims, not merely to recover for the damages which he has sustained, but also the difference between .what the work, if done according to the agreement, would have been worth, and the price he agreed to pay. Now a party can not recover damages for a bad bargain. — Cothers vs. Keever, 4 Pa. S. R. 168; Goodwin vs. Morse, 9 Metc. 278; Wilkinson vs. Ferre, 24 Pa. S. R. 190.
    There being an acceptance of the work as done, the law implies a promise to pay for it as much as it is worth, at the rate fixed by the contract.
    The parties having mutually agreed what the work contracted for is worth, it would seem as if there could be no question that the price thus fixed should be the standard by which to determine the amount of recovery. — Thornton vs. Place, 1 M. & R. 218; Mondel vs. Steele, 8 M. & W. 858; Gleason vs. Smith, 9 Cush. 486; Booth vs. Tyson, 15 Vt. 515; Morrow vs. Huntoon, 25 Vt. 9; Hayden vs. Madison, 7 Greenl. 76; White vs. Oliver, 36 Maine, 92; Farmer vs. 
      
      Francis, 12 Ired. 282; McKinney vs. Springer, 3 Ind. 61; Lee vs. Ashbrook, 14 Mo. 383, 385; Vanderbilt vs. Eagle Iron Co. Works, 25 Wend. 664; Blood vs. Enos, 12 Vt. 625; Allen vs. Cameron, 1 C. & M. 832; Preston vs. Finney, 2 W. & S. 53; Liggett vs. Smith, 3 Watts, 331; Danville Bridge Co. vs. Pomroy, 15 Pa. S. R. 151; Allen vs. Robinson, 2 Barb. 341; Koon vs. Greenman, 7 Wend. 121; Jewett vs. Weston, 11 Maine, 346.
    There can not be an express contract binding one party to take a certain price, and at the same time an implied contract on the other side to pay only what it is reasonably worth, without reference to the agreement of the parties. — Golloway vs. Holmes, 1 Doug. Mich. 330; Selway vs. Fogg, 5 M. & W. 83.
    It was formerly the law that whenever anything had been' done under a special contract, but not in conformity thereto, the party for whom it was done must pay the stipulated price, and resort to a. cross action to indemnify himself for the deficiency in the consideration. But afterwards, to avoid circuity of action, it was held that the defendant, instead of bringing a cross action, might show, in mitigation of damages, that the thing agreed to be done had not boon done according to contract. Now it would seem that the change of remedy adopted for the benefit of the defendant, should not affect the plaintiff’s rights, or lessen the amount of his compensation. — Cutter vs. Powell, 2 Smith Lead. Cas. 29, 30; Mondel vs. Steele, 8 M. & W. 858; Goodwin vs. Morse, 9 Metc. 218.
   Campbell J.:

McKibbin agreed to cut and haul to the borders of Millington Creek, in Tuscola county, all the pine timber upon an eighty acre lot; to be cut into logs of twelve, fourteen, and sixteen feet in length, and laid on the bank not more than eight abreast, and the bank to be cleared of obstructions opposite where the logs were laid. The logs were to be scaled after delivery on the bank. For the work done as agreed upon, $2.25 per thousand feet was to be paid by Allen, of which various sums, not to exceed half the price of the logs delivered, were to be paid from time to time as needed, and the balance in ninety days# after the logs were delivered and scaled.

MeKibbin cut and delivered thirteen hundred and sixty-four logs, and sued for payment therefor on the common counts. Allen pleaded the general issue with notice of recoupment; and introduced evidence to show that the logs were not cut of proper lengths;_ that in some places they were laid more than eight abreast; that the creek was not properly cleared of obstructions; that sixty-four logs, and from fifteen to thirty standing pine trees, were left; and that great loss was suffered from non-performance of the agreement. Evidence was offered to show that the work was not worth the contract-price, and excluded by the Court.

The Court charged the jury that the plaintiff below was not entitled to recover upon the contract at all, unless he had performed it; but that if there had been a partial performance, from which the defendant had derived benefit, the plaintiff was entitled to recover the contract-price, deducting therefrom any damages which the defendant had sustained by reason of non-performance.

The questions arising are, First, Whether the Court erred in excluding evidence of the value of the work, to reduce it below the contract-price; and, Second, Whether the rule of damages laid down was correct.

There is nothing in the case, so far as it appears, which would show that this contract was apportionable. Not only would the value of cutting and delivering logs on the bank differ according- to their location and accessibility, but the condition of the stream on which they were to be floated to market was very essential in determining their value on the bank; For if that was obstructed, the cost of removing the obstructions would necessarily enter into the account; as. without the means of floatage, the logs would be comparatively valueless. From the case as stated; we must infer that the jury would have been warranted, if they believed the testimony, in determining that the contract had fallen considerably short of a substantial compliance. And it is to that part of the charge and rulings of the Court which acts upon this hypothesis, that both the objections referred to apply.

Where a party fails to comply substantially with an agreement, unless it,is apportionable, the rule is well settled that he can not sue upon the agreement, or recover upon it at all. And under the strict common law rule he was remediless. But the doctrine has now grown up, based upon equitable principles, that where anything has been done from which the other party has received substantial benefit, and which he has appropriated, a recovery may be had upon a quantum meruit, based on that benefit. And the basis of this recovery is not the original contract, but a' new implied agreement, deducible from the delivery and acceptance of some valuable service or thing. The idea is well expressed in Read vs. Rann, 10 B. & C. 438, by Parke J., who says: “In some cases a special contract, not executed, may give rise to a claim in the nature of a quantum meruit, e. g. where a special contract has been made for goods, and goods sent, not according to the contract, are retained by the party, there a claim for the value, on a quantum valebant, may be supported; but then, from the circumstances, a new contract may be implied.'1'1 Taking this as the basis of a recovery, there certainly could be no good reason for allowing a party who is in default to recover in any case more than his work or goods maybe worth; for that would allow him to speculate out of his own fraud or default; and he should not be allowed more than the same could be obtained for from any one else. To allow him the contract-price for what is worth much less, would not, in any sense, be allowing a quantum, meruit. Parties may, and do frequently, for their own reasons, agree to give excessive prices to have an entire contract literally performed, when a partial performance would never have been contracted for at all; and'it does not lie in the mouth of a defaulter to say that the contract is evidence of the true value. It is only by the mercy of the law that he can have any standing in court. We think that the Court erred in rejecting evidence that the work was worth less than the contract-price.

And we also think the rule of damages laid down was erroneous. Upon a review of the authorities, they do not, in general, lay down any rule applicable to all cases. In several of them, the rule is given very much as the judge gave it to the jury in this case. But in nearly all, if not. all, of those cases, it appears either that there had been a completion of the thing contracted for, but with some variations in the method of constructing some complete thing, or else the plaintiff showed the work to have been worth more than the contract-price, and this rule was laid down to prevent the recovery of an excess, and to prevent his profiting by his own wrong. The same principle would forbid the application of the rule where the excess was in the contract-price. Without reviewing the cases in detail, we think that the only rule which harmonizes them may be laid down substantially as follows: The defaulting plaintiff can in no case recover more than the contract-price, and can not recover that, if his work is not reasonably worth it, or if, by paying it, the rest of the work wifi cost the defendant more than if the whole had been completed under the contract. The party in default can never gain by his default, and the other party can never be permitted to lose by it; and the price thus determined is the true amount recoverable on a quantum meruit.

There are, or may be, other damages growing out of the non-performance, which do not properly enter into the price, and which therefore can not be allowed or recovered without either a cross action, or some- analogous proceeding.— Mondel vs. Steele, 8 M. & W. 858; 2 Smith's Lead. Cas. 47 (Am. Ed. of 1852). In the case "before us there was a notice of recoupment, which was equivalent to a cross action, and under it the defendant could have such damages allowed him, if any existed. On the right to recoup no question was raised; and we think none could bo, as the damages, if any, arose out of the same transaction. The allowance of it tends greatly to diminish litigation, and it is a wholesome and fair method of terminating controversies. The case of Ward vs. Fellers, 8 Mich. 281, and the cases there cited, place this doctrine upon a very broad foundation.

We think the Court erred in rejecting evidence to reduce the value of the work done, and also in laying down the rule of damages, and for this reason the judgment below must be reversed, and a new trial granted.

Manning and Ci-iristiancy JJ.

concurred. Martin Ch. J. gave no opinion on the legal questions, not being satisfied from the evidence that the plaintiff had failed in a eubstantial performance of his agreement.  