
    Thomas W. Reilly and Another, Respondents, v. John R. Lee, Appellant.
    
      Counterclaim — must be a complete ca/ase of action — action on contract — defense of its breach and of a counterclaim of damages — defendant’s costs — taxation thereof.
    
    It is just as necessary for a defendant to have a complete cause of action, in order to set it up by way of counterclaim in his answer, as it would be if he had brought an independent action thereon.
    When the defendant, in an action brought upon a contract, interposes the plaintiff’s breach of contract to prevent any recovery against him and obtains a decision in his favor upon such defense, he thereby deprives himself of the right to recover in that action damages against the plaintiff because of such breach. If, however, the defendant permits a recovery by the plaintiff for the amount due the plaintiff under the contract, he is entitled to set up, by way of counterclaim, the damages sustained by him by reason of the plaintiff’s breach of the contract, although they may largely exceed the amount due the plaintiff under the contract, and for such excess the defendant is entitled to an affirmative judgment against the plaintiff.
    Where both the parties to an action are entitled to costs under section 3234 of the Code of Civil Procedure, the defendant should present his hill of costs to the clerk and have them taxed, and, if the clerk refuses to enter them in the judgment, the defendant should make a motion that they be so entered.
    Appeal by the defendant, John R. Lee, from a judgment of the Supreme Court in favor of the plaintiffs, entered in the office of the clerk of the county of New York on the 10th day of April, 1894, upon the report of a referee.
    
      Artemas B. Smith, for the appellant.
    
      B- Lafiin, Kellogg, for the respondents.
   Parker, J.:

The complaint alleged two separate canses of action growing out of two different contracts. As to one there is no dispute, and for convenience we shall treat the matters in controversy as if but one cause of action was pleaded in the complaint. In brief it was for a balance claimed to be due under a written contract entered into between the parties to this action in June, 1889, by which the plaintiffs agreed to build, construct and finish in the most substantial and workmanlike manner, and to the satisfaction and acceptance of the engineer or engineers in charge of the Pennsylvania, Poughkeepsie and .Poston Railroad Company, all the masonry work required to be done by the first party (this defendant) for the bridge to be constructed by it across the Lehigh river at or near Slating-ton, Pennsylvania.” And the defendant engaged that whenever, in the opinion of the said engineer or engineers in charge, the said work should be completely finished in every respect and performed agreeably to the various stipulations and specifications in the said agreement contained, and the said engineer or engineers in charge should have furnished to the defendant a certificate to that effect, together with an estimate of the quantity of work done by the plaintiffs, he would, within twenty days thereafter, pay the plaintiffs the amount found to be due.

Performance by the plaintiffs and the making and delivery of the required certificate and estimate by the engineer in charge, under which they claimed to be due $1,671.95, was also alleged. The answer put in issue the allegations of performance and the making of the certificate and estimate by the engineer, and by way of counterclaim asserted that the plaintiffs failed to construct the masonry in a substantial and workmanlike manner as required by said agreement, and that a portion of the work was so defectively done that it was rebuilt at defendant’s expense, and the sum expended therefor defendant claimed the right to recover against the plaintiffs under the fifth provision of the contract, which is as follows:

“ Fifth. It is mutually agreed between the parties hereto that if the second party shall execute airy part of such work defectively, then such defective work shall be rebuilt at the expense of the party of the second part, upon receiving the order from the engineer or engineers in charge to that effect.”

The referee found that the engineer in charge did not furnish to the defendant a certificate that the work had been performed in a substantial and workmanlike manner ; nor make and deliver to the plaintiffs an estimate of the quantity of work done by the plaintiffs, all of which was by the terms of the contract a condition precedent to a right of recovery by the plaintiffs, and he further found that there was no proof of a waiver of such certificate by defendant.

In accordance therewith he held that the plaintiffs were not entitled to recover any sum whatever, and directed judgment accordingly. His report also directed that judgment should be entered dismissing the counterclaim set forth in the answer, but not upon the merits. With the reasons for the decision respecting the counterclaim as stated in the referee’s opinion, the appellant is dissatisfied. We shall refrain from a discussion of them, however, on this review, because we think the decision must be upheld upon other grounds, and it matters not whether proper reasons are given for rendering a correct judgment.

Assuming the defendant’s contention to be correct, that, under the fifth provision of the contract, which we have quoted, he was entitled to recover of plaintiffs the expense of rebuilding the pier, which it was proved was done by the railroad company with whom the defendant had contracted to do the work, which he subsequently sub-contracted to these plaintiffs, and which was done at a cost exceeding $3,000, he certainly could not recover until after'performance. And performance could not be undertaken until after the order, from the engineer or engineers in charge, to that effect had been received. They might have provided otherwise, but they chose this method of guarding against defective work, and in effect provided that the remedy for unskillful performance on the part of the plaintiffs should be the rebuilding of sucli work as should be done defectively. Even that was not left to the discretion of the defendant, for it was further conditioned that the rebuilding should only be done upon an order of the engineer in charge. There was a controversy on the trial whether the order was properly made by the engineer and received by the party to be affected, and whether the rebuilding was done at the expense of the party of the first part. But that is of no moment in the present discussion, for, conceding the defendant’s contention in such respects to be correct, nevertheless a cause of action in his favor could not arise therefrom until performance had been completed; and it was not completed until after the commencement of this action. At that time defendant could not have commenced an action against the plaintiff's to recover for the expense incurred iri rebuilding the pier, for the rebuilding had not been finished and his cause of action was not, therefore, complete. And it was none the less necessary that he should have a complete cause of action in order to set it up by way of counterclaim against these plaintiffs. (Patterson v. Patterson, 59 N. Y. 574; Taylor v. The Mayor, etc., 82 id. 10.)

"While the counterclaim was dismissed, the dismissal w'as not upon the merits, so the defendant is not thereby deprived of his right to enforce his cause of action if it has in the meantime become or shall become complete. The decision of the referee in dismissing the counterclaim is also justified by the decision in Walker v. Millard (29 N. Y. 375). In that case the plaintiff sought to recover a balance claimed, to be due under a building contract. The defendant answered that plaintiff could not recover because of his failure to fully perform the contract, and by way of counterclaim demanded damages for defective performance. It was held that the plaintiff had committed a breach of his contract and could not recover, and also that defendant could not recover on his counterclaim. The reason assigned is briefly stated in the opinion of Johnson, J., as follows : “ He alleges that the plaintiff has broken the contract or failed to perform it, and cannot, therefore, compel him to pay, and yet insists that he can compel the plaintiff to pay for defects in the work for which the latter gets no compensation. This, I apprehend, he can scarcely be allowed to do. He cannot both repudiate the contract and enforce it in the same action.

“ Had the defendant brought his action to recover damages for the non-performance of the contract on the part of the plaintiff, it would have been necessary for him to allege performance, or an offer to perform, on his own part, or he would not have stated a cause of action.
“ Certainly he is in no better situation in regard to his counterclaim as defendant; having interposed the plaintiff’s breach in avoidance of his own obligation to pay, and procured a ruling to that effect in his favor, he is in no situation to enforce the contract against the other party in any particular, especially in the same action.”

This case was cited and followed in Woodward v. Fuller (80 N. Y. 312). The same question came before the court in Lennon v. Smith (124 id. 578). In that case the plaintiff contracted to build a cellar within a certain time, and it was agreed that a penalty of twenty dollars a day should be enforced for each day the work should remain unfinished beyond the term. In an action brought to recover the contract price, the referee decided that there was a substantial breach of contract upon the part of plaintiff available to defeat recovery by him. And having decided that the defendant was entitled to be relieved from the obligations of the contract by reason of the breach by plaintiff, he proceeded to award damages in favor of defendant and against the plaintiff in the sum of $540 for non-performance of the contract. In reviewing that judgment the court said: “ She could not repudiate the contract for the purpose of barring the plaintiff’s claim for his work, and at the same time make it effectual for the recovery of damages against him for its breach, although she might, if the facts permitted, recover damages, if any there were in excess of the price or value of the plaintiff’s work. And the reason is that in such case the contract is permitted to remain operative for the purpose of the remedy and relief of both parties to it, and it is no less essential to support the defendant’s claim for damages than it is to sustain that of the plaintiff founded upon it for his work. It is apparent that a rule having the effect to give one of the parties to a contract the benefit of it to the exclusion of the other in the same action, would or might work very unjustly to the latter, and quite unreasonably to the profit of the former.”

If it should be assumed in this case that the cause of action which defendant set up by way of counterclaim was a completed cause of action, nevertheless he was not entitled to recover on it, because he interposed the plaintiffs’ breach of the contract to prevent any recovery by them, and obtained a decision in his favor, whereupon he deprived himself of the right -to recover in that action damages against the plaintiffs because of such breach.

Had he permitted a recovery by the plaintiffs for the amount due them under the contract he would have been entitled, under the authority of Lennon v. Smith, and upon principle, to counterclaim his damages against them, although they might have largely exceeded the amount due to the plaintiffs under the contract, and for such excess he would have been entitled to an affirmative judgment against them.

If the views expressed are correct, it is unnecessary to consider the exceptions taken to the admission of evidence and to the refusals of the referee to find certain facts which were requested by the defendant, for, if the rulings had been otherwise, the result could not have been affected.

Presumptively, both parties were entitled to costs under section 3234 of the Code of Civil Procedure, but it does not appear that the defendant presented a bill of costs for taxation or asked to have his costs inserted in the judgment. The defendant’s remedy was to have presented his bill of costs to the clerk and had them taxed, and, if the clerk had refused to enter them in a judgment, to have made a motion that they be so entered.

The judgment should be affirmed, with costs, but without prejudice to the right of the defendant to move for a correction of the judgment below in respect to costs.

Yan Brunt, P. J., concurred.

Judgment affirmed, with costs, without prejudice to right of defendant to move for correction of judgment below in respect to costs.  