
    Thomas W. Reilly et al., Resp’ts, v. John R. Lee, App’lt.
    
      (Supreme Court, General Term, First Department,
    
    
      Filed March 15, 1895.)
    
    1. Pleading—Counterclaim.
    A counterclaim, in an action on contract, must be a complete cause of action at the time of the commencement of the action.
    2. Same.
    Where a defendant, in order to prevent any recovery on a contract, interposes the plaintiff’s breach thereof and obtains a decision in his favor, he deprives himself of the right to recover in that action damages against the plaintiff because of such breach.
    
      Appeal from a judgment in favor of plaintiffs, dismissing defendant’s counterclaim.
    
      Artemas B. Smith, for app’lt; L. Laflin Kellogg, for resp’ts.
   Parker, J.

The complaint alleged two separate causes 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 thePennsylvania, Poughkeepsie and Boston 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 Slatington, 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, were 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 re-„ quired 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 any 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 is proved was done by the railroad company with whom the defendant had contracted to do the work, which he subsequently subcontracted 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 such 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 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 second 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 plaintiffs to recover for the expense incurred in 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. Mayor, etc., of New York, 82 N. Y. 10. While the counterclaim was dismissed, the dismissal was 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 nonperformance 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 part, or he would not have stated a cause of action. Certainly he is in no better situation in regard to his own 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. 812. The same question came before the court in Lennon v. Smith, 124 N. Y. 578 ; 36 St. Rep 880. In that ease the plaintiff contracted to build a cellar within a certain time, and it was agreed that a penalty of $20 a d"ay 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 nonperformance of the contract. In reviewing the 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 actian 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 he 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.  