
    Benjamin Weeks, Appellant, v. James O’Brien, as Executor, etc., Respondent.
    Where a building contract contains a condition requiring an architect’s certificate of completion of the contract, before payment of ttie last installment, it is essential, in an action upon the contract to recover that installment, to allege in the complaint performance of that condition, onset forth facts excusing plaintiff from procuring the certificate.
    In order, to avail himself of the objection the defendant is not required to-present it hy demurrer or answer; he may raise it on the trial. (Code Civ. Pro. § 499.)
    In an action upon such a contract a copy thereof was annexed to the-complaint, which alleged performance, stated the amount unpaid and demanded judgment therefor. The answer denied the complaint and set out as a counterclaim that plaintiff abandoned the contract before completion and that defendant, after due notice under a provision of the contract, authorizing him in such case so to do, completed the building in accordance with the stipulations, at a cost specified, and also had sustained damages hy reason of the delay. On the trial plaintiff testified, in detail, as to what he had done under the contract, and proof was given of demand upon the architect for a certificate, which was refused. Defendant claimed a failure to perform the contract in several particulars, and upon cross-examination of plaintiff called out tlie fact that notice had been served on him under the contract and that defendant had proceeded thereunder to complete the work. At the close of plaintiff’s evidence the court dismissed the complaint on the ground that it contained no averment that the architect unreasonably refused a certificate of the completion of the work. Held, error; that while it was not too Jato to-then raise the objection, and no application having been made to amend the complaint, it was in the discretion of the court to entertain it, yet, by calling out the testimony that defendant had, after notice, proceeded to complete the contract, this opened the issue, and as the provision of the contract under which defendant acted, entitled plaintiff to recover the difference between the last installment and the amount expended hy defendant in completing the work, this rendered the certificate unnecessary, and the case should have gone to the jury upon the issue so litigated.
    (Argued January 25, 1894;
    decided February 6, 1894.)
    Appeal from judgment of the General Term of the Superior Court of the city of New York, entered upon an order made January 8,18j)l5 which affirmed a judgment in favor of defend•ant entered upon a decision of the court dismissing the complaint on trial at Circuit.
    This action was brought to recover the last installment under a building contract entered into by plaintiff with Ellen ■O’Brien, defendant’s testatrix.
    The contract provided for the payment of the contract price in specified installments from time to time as the work progressed • the last installment upon its completion “ provided a certificate shall be obtained ” from the architect. The contract also contained this provision : “ Fourth. Should the contractor, at any time during the progress of the said works, refuse or neglect to supply a sufficiency of materials or workmen, the owner shall have the power to provide materials and workmen, after three days’ notice in writing being given, to finish the said works, and the expense shall be deducted from the amount of the contract.”
    The facts, so far as material, are stated in the opinion.
    
      Brainard Tolles for appellant.
    The trial judge was not justified by any technicality of pleading in refusing to submit to the jury the substantial controversy between the parties appearing without objection upon the face of the evidence. (Brehm v. Mayor, etc., 104 N. Y. 186 ; Dunn v. Durant, 9 Daly, 389; Southwick v. F. N. Bank, 84 N. Y. 420; Oakley v. Morton, 11 id. 25 ; Hosley v. Black, 28 id. 443 ; McKnight v. Devlin, 52 id. 404; Place v. Minster, 65 id. 104; Knapp v. Simon, 96 id. 292; Colrick v. Swinburne, 105 id. 503; Frear v. Sweet, 118 id. 458; Flaherty v. Miner, 123 id. 390; Brusie v. Peck Bros. & Co., 135 id. 622; Tisdale v. Morgan, 7 Hun, 583 ; Lefter v. Sherwood, 21 id. 573 ; Roberts v. Graham, 6 Wall. 578; B. N. Bank v. Mayor, etc., 63 N. Y. 288.) The evidence showed that the architect’s certificate was unreasonably withheld. (Thomas v. Fleury, 26 N. Y. 26; B. Bank v. Mayor, etc., 63 id. 336; Nolan v. Whitney, 88 id. 648; Smith v. Alker, 102 id. 87; Doll v. Noble, 116 id. 233; Flaherty v. Miner, 123 id. 382; Thomas v. Stewart, 132 id. 580; Crouch v. Guttman, 134 id. 45 ; Thayer v. Wadsworth, 
      19 Pick. 349 ; Sinclair v. Tallmadge, 35 Barb. 606; Pike v. Nash, 1 Keyes, 335 ; Kingsley v. Brooklyn, 7 Abb. [N. C.] 45.) The allegation in the answer that the building was finished, obviated the necessity of an architect’s certificate of that fact. (Thomas v. Fleury, 26 N. Y. 26; Smith v. Alker, 102 id. 92 ; B. Bank v. Mayor, etc., 63 id. 336 ; Doll v. Noble, 116 id. 233 ; Van Clief v. Van Vechten, 130 id. 511; Crouch v. Guttman, 134 id. 45 ; Murphy v. Buckmam, 69 id. 100.) The claim of damages from delay having been formally abandoned at the trial, the allegations of the answer were sufficient to entitle the plaintiff to judgment without aid from the complaint. (Van Clief v. Van Vechten, 130 N. Y. 577; Larkin v. McMullen, 120 id. 210; Graf v. Cunningham, 109 id. 372 ; Murphy v. Buckman, 69 id. 100 ; Robinson v. Stewart, 10 id. 190 ; Vernam v. Smith, 15 id. 331; Ayres v. Covill, 18 Barb. 260; Miller v. White, 4 Hun, 62.) The dismissal of the second cause of action was erroneous, it having been admitted by the answer, proved without objection and no defense attempted. (Frecking v. Rolland, 53 N. Y. 424; Train v. H. P. Ins. Co., 62 id. 598; Trustees, etc., v. Kirk, 68 id. 464; F. N. Bank v. Dana, 79 id. 116; Vail v. Reynolds, 118 id. 301; Pratt v. D. H. Ins. Co., 130 id. 212.)
    
      Abram Kling for respondent.
    The plaintiff cannot recover in this action upon the contract set forth in the complaint, as he failed to allege the delivery of the architect’s certificate, or that the same was unreasonably withheld from him. (Byron v. Low, 109 N. Y. 291; Smith v. Brady, 11 id. 173 ; Oakley v. Morton, 11 id. 25; Glacius v. Black, 50 id. 145.) The plaintiff’s evidence established that the architect was justified in refusing to deliver a certificate required by the contract, and the same was properly refused. (Knowland v. Whitney, 88 N. Y. 650; Tuska v. O'Brien, 68 id. 446.) The plaintiff’s claim that the defendant waived performance of the contract and the certificate of the architect, which was a condition precedent to his right of recovery, because the defendant’s testatrix elected to complete her building after its abandonment by the plaintiff, is clearly untenable. (Kidd v. McCormack, 83 N. Y. 391; Walden v. Eldred, 11 N. Y. Supp. 856.) The judgment obtained by the sub-contractor Lumbey against the plaintiff, that there had been a total failure to perform, was an adjudication against his right of recovery in this action, as the plaintiff was estopped by the admissions in this answer. (Tuska v. O’ Brien, 63 N. Y. 446.) The right of recovery on the second cause of action was waived upon the trial. (Douno v. Dow, 64 N. Y. 412; O'Neil v. James, 43 id. 85.)
   Per Curiam.

The complaint was dismissed on the ground that it contained no averment that the architect unreasonably withheld his certificate of the completion of the building. The complaint was defective in this respect. By the true construction of the building contract the procuring by the plaintiff of the certificate of the architect that the building had been completed, was a condition precedent to his right to recover under the contract the last installment of $6,158, for which this action is brought. To meet this condition and to show a right of action it should have been averred in the complaint, either generally or specially, that the conditions precedent had been performed, or if the plaintiff relied upon a matter excusing him from procuring the certificate, the facts should have been stated. (Thomas v. Fleury, 26 N. Y. 26 ; Bowery National Bankr. Mayor, etc., 63 id. 336; Doll v. Noble, 116 id. 233; Oakley v. Morton, 11 id. 25.) The complaint neither averred that the certificate had been procured nor that it was unreasonably withheld. A copy of the contract containing the provision as to the architect’s certificate was annexed to the complaint. The action was upon the contract and the complainant alleged performance by the plaintiff and that the building had been substantially completed according to its terms. The contract made the architect’s certificate, the evidence of that fact, and the plaintiff could not recover upon an allegation of performance upon proving that the building had in fact been completed, without procuring the architect’s certificate, or showing that it had been unreasonably refused, or that the defendant had waived its jiroduction.

A defendant is authorized to raise the objection that the complaint does not state facts sufficient to constitute a cause of action on the trial, although the objection has not been taken either by demurrer or answer. (Code, § 499.) At the ° conclusion of the plaintiff’s evidence the defendant’s counsel moved to dismiss the complaint on the ground that under the contract the certificate of the architect was a condition precedent. The counsel for the plaintiff asked to go to the jury upon the question of unreasonable refusal of the architect to give the certificate. The court in answer said that there is no such issue, and referred to the fact that there was no allegation upon the subject in the complaint. This was the first reference on the trial to any defect in the pleading. The complaint set out the contract, its performance by the plaintiff, the amount unpaid, and demanded judgment therefor.. The answer denied the complaint and set up as a counterclaim in substance that the plaintiff had not completed the building, but after he had commenced the work abandoned it before completion, and that the defendant, after giving due notice to the plaintiff, proceeded under the fourth section of the contract to complete the building according to the specifications, and did complete it, at a cost of $2,904.58, and also that the defendant had sustained damages by reason of delay, in a sum stated, and these several sums he demanded should he allowed as a set-off or counterclaim against the demand of the plaintiff.

On the trial the plaintiff proved the contract and proceeded to give evidence in detail of what he had done under it. It was claimed by the defendant that the plaintiff had not complied with the contract in several respects, but the principal ground of objection was that the plaintiff had not complied with the contract in respect to the floor of the basement. The plaintiff insisted that he had complied with the contract in that respect, and proof was given as to a demand upon the architect for a certificate, which was refused.

It is claimed that no question having been raised until the. conclusion of the plaintiff’s evidence as to the sufficiency of, the complaint upon the point of the architect’s certificate, and the trial'having proceeded upon the issue whether the work had been actually completed, without objection, it was then too late to raise the question of the sufficiency of the complaint in that respect. The court might very well have permitted an amendment, but no application to amend was made, * and we think it was not too late to raise the objection at the conclusion of the plaintiff’s case. At least it was in the discretion of the court to entertain it at that stage of the trial.

But we think that the court erred in dismissing the complaint for a different reason. The defendant’s counsel on his cross-examination of the plaintiff, proceeded to examine him on new matter not involved in his direct examination, to sustain liis counterclaim. He called out the fact that the defendant had given the plaintiff notice under the fourth section of the contract, and had proceeded thereunder to complete the contract. By so doing the provision requiring the architect’s certificate was rendered inapplicable. The object of that provision is to furnish to the owner of the building, when called upon to pay the contract price of the work, authentic evidence that the work to be certified has been performed. When the owner himself proceeds under the contract to complete the work he needs no architect’s certificate to apprise him whether the contractor has performed his contract. The • owner does the work left undone by the contraeter, and the contract provides how, in that case, the expense shall be adjusted as between him and the contractor. It is to be deducted from the amount unpaid in the contract, and that amount the owner is assumed to know. Where the contractor in such case sues for any installment, it is open to the owner to show how much he has expended in completing the work, and what allowances ought to be made for defective work, or any matter going in reduction of the claim made. The complaint was defective in •omitting suitable allegations for this cause of action. But the plaintiff asked to go to the jury upon this ground, and the trial judge put the nonsuit exclusively upon the ground that the complaint failed to aver that a certificate was unreasonably refused. We think this issue as to the completion of the-work by the defendant, having been opened by the counsel for the defendant, and it appearing from his evidence that no certificate was necessary to enable the plaintiff to recover the difference between the last installment and the amount expended by the defendant in completing the work, the complaint should not have been dismissed upon the ground upon which the motion was granted, but that the case should have gone to the jury upon the issue so litigated.

The judgment should be reversed and a new trial granted»

All concur.

Judgment reversed.  