
    Benjamin Weeks, App’lt, v. James O’Brien, as Executor, etc., Resp’t.
    
    
      (Court of Appeals,
    
    
      Filed February 6, 1894.)
    
    1. Pleading—Complaint—Condition.
    In an action upon a contract, which requires an architect’s certificate before payment of the last installment, to recover such installment, it is essential to allege in the complaint performance of that condition, or facts excusing plaintiff from procuring the certificate.
    2. Same.
    Such objection need not be presented by demurrer or answer; it may be raised on the trial.
    3. Contbact—Building—Architect's certificate.
    Where the owner, under a clause in the contract, gives notice to the contractor, and proceeds thereunder to complete the contract, a provision in such contract requiring the architect’s certificate is rendered inapplicable.
    Appeal from judgment of the general term of the superior court of the city of New York, entered upon an order made January 8, 1891, which affirmed a judgment in favor of defendant 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 suoply 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 Tolies, for app’lt; Abram Kling, for resp’t.
    
      
       Reversing 35 St. Rep., 463.
    
   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 ivas 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 Nat. Bank v. Mayor, etc., 63 id., 336 ; Doll v. Noble, 116 id., 233 ; 26 St. Rep., 629 ; Oakley v. Morton, 11 N. Y., 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 the 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 production.

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 he abandoned it before completion, and that the defendant, after giving duo 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 be 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 beenactu-, ally 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-ex-animation of the plaintiff, proceeded to examine. him on new matter not involved in his direct examination, to sustain his 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 contractor himself, 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 that 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.  