The complaint in this action avers that the plaintiffs, at divers times between certain specified dates, sold and delivered to the defendant “ lumber and building materials of various kinds, at and for prices mutually agreed upon, which were worth and' amounted at the prices so agreed upon as aforesaid, to the sum of $16,702.30, which said price and value the defendant promised to pay to the *253plaintiffs for said goods, wares and merchandise.” It then proceeds to aver that $16,228.14 of such sum has been paid; also that the defendant is entitled to a further credit of $12.17 and $76.11, and prays judgment for_the balance, viz., $385.88.
The answer admits, substantially, that all the materials charged to have been delivered were purchased by the defendant and delivered at prices mutually agreed upon. But it denies that, at the prices so fixed and agreed upon, such materials amounted to the sum of $16,702.30, and denies that the balance of $385.88, claimed by the plaintiffs, is due and owing to them. The defendant’s claim is, and was upon the trial, that at the prices agreed upon the aggregate price of materials so delivered did not amount to more than the payments conceded to have been made.
On the trial the plaintiffs, under the persistent objection and exceptions of the defendant, proved the market value of the lumber and materials so delivered, and the referee found as a fact “ that the vahee of the lumber and building materials furnished by the plaintiffs to the defendant amounted to the sum of $16,702.30.” He then deducted therefrom the credits above stated, as being allowed to the defendant in the complaint, and ordered judgment for the balance. He makes no finding whatever as to what the prices agreed upon between the parties were, or what sum they amounted to, although he does find that for some of the articles delivered the prices were agreed upon, and for the others the plaintiffs were to have the market prices at the time of delivery. He makes no finding as to what portion of the whole amount delivered was sold at agreed prices and what portion was sold at market prices; and an exception is filed to this finding upon this particular ground.
Judgment was entered in accordance with this report, and from such judgment this appeal is taken.
Olearly this trial has proceeded in entire disregard of the well-settled rule that the recovery must be had in accordance with the -claim made in the complaint. (Romeyn v. Sickles, 108 N. Y. 650.)
The complaint sets up a claim for lumber sold at agreed prices. The answer concedes that such a contract was made, and differs only as to what such prices were. Here was a distinct and narrow issue tendered by the plaintiffs and accepted by the defendant, and the defendant had the right to expect that upon the trial such issue, and *254that only, would be tried. .He was under' no obligations to prepare to meet. the other and distinct issue as to what was the market value of the goods so sold. Evidently, the trial of that issue would require a preparation very different from the one tenderedand it violates the first principles of pleading to permit the defendant to be lured into court upon the issue framed by these pleadings and compelled to meet the one upon which judgment has been rendered: against him.
' It. has been held that where, as in this case, neither party denies the making of the express contract, but the difference is only as to the price, evidence of the market value may be given as bearing upon the.question : What was the actual price agreed upon ? But in those cases the evidence must be received for- that limited purpose only, and the contract price, whatever it is found to be, must determine the amount to be recovered. (See Cornish v. Graff, 36 Hun, 160, 164; Knallakan v. Beck, 47 id. 117; Barney v. Fuller, 133 N. Y. 607.) And such- cases are authority for the position above taken, that it is not proper evidence upon which to base a recovery. (See, also, Dennison v. Musgrave, 29 Misc. Rep. 627.)
It is suggested that the complaint in this action does not limit the issue tendered to . a cause of action .upon an express contract. To sustain such a claim it must be held either that the language above given may be as well construed as stating a cause-of action'upon a qua/ntum, valébat, as one upon an express contract to pay á stipulated price; or else it must be treated as stating both causes of action in one count.
But,, very clearly, a claim to recover based upon an implied promise to pay what the materials were reasonably worth, cannot be ascribed to the language there used. Ho such cause of action could be sustained upon the averments there found. It is elementary law that there cannot be an express and an implied contract, embracing the same subject-matter, at the same time. (15 Am. & Eng. Ency. of Law [2d ed.], 1078.) If, as the averments in this complaint charge, the parties mutually agreed upon a price, then no implication of law can arise as to what should be paid. It is only when there is no agreement as to price that the law implies an agreement to pay what the goods received were reasonably worth; and á party cannot recover on an implied agreement to pay their value when *255he could have recovered upon a special contract fixing their price. (Id. 1111.)
How, this complaint distinctly avers that the goods in question were sold and delivered “ at and for prices mutually agreed upon.” This is an averment that there was an express contract or agreement fixing the prices; and, that being so, it excludes all possibility of their having been sold under such circumstances that the law would imply a contract to pay what they were reasonably worth. Instead of there being statements enough in the complaint to constitute a cause of action to recover upon a quantum valebat, the very facts stated exclude the possibility of such a recovery.
I do not deny but that two counts, the one upon an express and the other upon the implied contract, may be now joined in the same complaint; but that two such counts have not been merged in the language above quoted is clear. The facts averred show clearly the existence of the express contract and necessarily exclude the existence of an implied one. It is true that in addition to the averments that show that the lumber was purchased at prices mutually agreed upon, there is also a statement that it was worth as much as such prices. Concede that it was, such fact, in connection with all others averred, does not show a right to recover on a qucmtum valebat. On the contrary, it still appears that such a right of recovery does not exist, because there was an express contract as to price, which is controlling. If it had been intended to state a cause of action upon an implied contract to pay the market prices, no averment was proper, nor would one have been made, that prices for the same had been agreed upon. Hence, we must assume that the averments of value are mere surplusage. But the following cases have construed just such a pleading, and are authority for the conclusion which I reach: Evans v. Kalbfleisch (16 Abb. Pr. [N. S.] 13); Meissner v. Brennen (39 N. Y. St. Repr. 443 ; 15 N. Y. Supp. 611).
It was error, therefore, for the referee to receive evidence upon the value of the lumber sold, and to make up his decision upon that as a basis, instead of from the prices agreed upon. Under the complaint as it now "stands, such a recovery ought not to be had. The judgment must, therefore, be reversed and a new trial granted.
All concurred, except Kellogg, J., dissenting.