The complaint sets forth a cause of action for goods sold and delivered. The answer is, first, a general denial; second, a counterclaim. This counterclaim relates to a contract for the purchase by the defendant from the plaintiff of the precise quantity and character of goods specified in the complaint — at the same time and for the same price. The averment on that head is, that the plaintiff agreed not to sell similar goods to others at a less price than that agreed- to be paid by the defendant, and that in violation of this *384agreement the plaintiff did sell similar goods at a less price. The defendant claims that he thereupon became entitled to an allowance equal to the difference between the price he agreed to pay and the price at which similar goods were sold. For this allowance (which is less than the amount claimed by the plaintiff) the defendant demands judgment. The court below deducted this allowance from the plaintiff’s demand, and gave the plaintiff judgment for the balance. The motion for judgment was made and granted upon the assumption that the counterclaim admitted a part of the plaintiff’s claim to be just, within the intent and meaning of section 511 of the Code of Civil Procedure. The admission, under that section, must be express, or by not denying. There was no such admission here. On the contrary, the answer contains the general denial. The counterclaim does not relate in terms to the goods referred to in the complaint. It probably does refer to them, but not necessarily so. That is a matter of inference. What the section requires is an express admission. We are thus asked to construe the counterclaim as impliedly admitting what is expressly denied. Clearly that cannot be done. But, further, this section 511 relates to an admission of the justice of part of the plaintiff’s claim as such, not to the establishment of a just balance by the deduction from the plaintiff’s claim of the amount due upon a conceded counterclaim. The only provision on the latter head is found in section 512. Under that section, however, the deduction of the admitted counterclaim, with judgment for the excess, is permitted only when the plaintiff’s claim is undenied.
The judgment must, therefore, be reversed, with costs to the appellant.
Van Brunt, P. J., Rumsey, O’Brien and Ingraham, JJ., concurred.
Judgment reversed, with costs to appellant.