
    No. 10,913.
    Williams v. Smith.
    Decided July 7, 1924.
    Rehearing Denied November 10, 1924.
    Action in mandamus. Judgment for plaintiff.
    
      Reversed.
    
    1. Pleading—Waiver. Answering, after the filing of a demurrer and motion for judgment on the pleadings, waives the demurrer and motion.
    2. Pbactice and Pkogedube—Waiver. Demurrer, and motion for judgment on the pleadings, are properly overruled where both have been waived by the filing of an answer.
    3. Judgment—On Pleadings. A motion for judgment on the pleadings held properly overruled, where there was an issue of fact pending.
    4. Municipal Cobpobations—Building Permits—Revocation. A city council, under some conditions, may revoke a building permit before any expenditures have been made by the applicant in reliance thereon.
    5. Building Permits—Revocation. A city council ought not to revoke a building permit for a filling station duly issued, unless there is some change or additional information showing danger to public health and safety, of which it was not informed when the permit was authorized.
    6. Mandamus—Equity. In an action to compel the issuance of a building permit, which had been revoked by municipal authorities, conceded that the court could not on mere equitable grounds, issue a mandamus, plaintiff would be entitled to such relief as the facts in the pleadings, and proofs justified.
    
      Error to the District Court of the City and County of Denver, Hon. Clarence J. Morley, Judge.
    
    Mr. Rice W. Means, Mr. Milnor E. Gleaves, for plaintiff in error.
    
      Mr. John F. Mail, for defendant in error.
    
      Department Two.
    
   Mr. Justice Denison

delivered the opinion of the court.

Miss A. M. Smith brought mandamus against the building inspector of Denver to compel him to give her a permit to build a public garage and filling station at Federal boulevard and West 44th avenue. The complaint was filed July 18th, 1923. No alternative writ was issued. The prayer was for mandamus and general relief. On the 10th of September comes the defendant “and demurs to the issues (sic) and moves for judgment on the pleadings,” on various grounds, all of which amount to insufficient facts to constitute a cause of action. September 11th the defendant answered, thereby waiving the demurrer. Code 1921, § 58. We think this waived the motion also, because they stand on the same ground and the answer changes the pleadings on which the motion rests. This demurrer and motion were heard on the 24th of September and both were overruled; this was, of course, proper, because they had been waived.

It appears from the complaint that on May 21, 1923, the city council passed a resolution granting Miss Smith a permit to build a filling station and garage at the place above mentioned, and thereby authorized and directed the building inspector to issue the permit. He issued a permit for the filling station, but not for the garage because the plans were not ready. She expended money in preparing the land and procuring plans and material in reliance on the permit and resolution, and afterwards, June 6, 1923, the inspector notified the defendant in error that the permit was withdrawn.

The answer denies the ownership by plaintiff of the lot on which the building is authorized and that it is a proper place for such a structure, denies the reason for delaying the issue of the permit for the garage, the reliance on the resolution, the expenditure of money and the purpose. thereof. It admits the rest of the complaint including the issue of the permit to build the filling station.

For a second defense the answer sets up the ordinance of November 4, 1919, which forbids the erection of a public garage or filling station where it will be dangerous to public health or safety, and forbids the license of such erection unless authorized by resolution of the city council; also the building ordinance, which forbids building without a permit from the building inspector, and alleges a repeal on June 16, 1923, of the resolution authorizing the said permit, and further alleges that the structures in question at said place would be dangerous to the public health and safety.

The replication as amended denies nothing except a matter of law and alleges no new fact. It amounted to no more than a demurrer to the second defense and contained a demurrer to that defense which was ignored. Afterwards the defendant, as appears by the record, moved for judgment on the pleadings. This motion was denied, and rightly, because there was at least one undetermined issue of fact pending, i. e., whether the plaintiff had expended money, etc., in reliance on the resolution. This was a material fact because without it her complaint would be bad. Code 1921, §§ 78 and 79; Pratt v. Denver, 72 Colo. 51, 54, 209 Pac. 508. There can be no judgment on pleadings in which is imbedded an issue of fact. Such issue must be tried.

When- the defendant’s last mentioned motion for judgment on the pleadings was overruled, he elected to stand on the pleadings. Thereupon, on motion of plaintiff, judgment was rendered for plaintiff. This was an error because the issue above stated should have been tried, the burden was on the plaintiff to prove the material fact denied by defendant, and so, there being no evidence, that issue should have been resolved against her. The record showed defendant entitled to judgment.

The above conclusions depend on whether the allegations of expense, in reliance on the resolution is a material fact, i. e., necessary to the cause of action. That depends on whether the council had a right to rescind before the expenditure. No authority is cited on this point; but Pratt v. Denver, supra, and the cases there cited seem to take it for granted that it had such a right and we see no valid answer to such a proposition.

It is admitted in the record that the buildings in the place in question would in fact be dangerous to public health and safety, but defendant in error claims that question is forestalled by the action of the council in granting the leave to build. Her claim would seem to be correct, and the council ought not, under Pratt v. Denver, supra, to be allowed to revoke, unless there were some change in the use or additional information to that body showing danger to health and safety of which its members were not informed at the time of the resolution. There is nothing of that kind shown in the record.

It is urged on behalf of the inspector that equitable estoppel is of no avail to aid madamus and that consequently the expenditure of money in reliance on the resolution is irrelevant, and Bright v. Farmers’ etc., Co., 3 Colo. App. 170, 174, 32 Pac. 433, is cited. The Code, however, requires us to give consideration to equitable rights in all cases, and, while we may concede that a court cannot, on mere equitable grounds issue a mandamus, yet when an affirmative defense is set up, the plaintiff may allege in reply those facts which show the defense to be inequitable. . Or the plaintiff may .be given such relief as the facts in the pleadings and proofs will justify, i. e, say cancellation of the revocation of the permit, or perhaps a mandatory injunction.

We do not consider whether there are issues other than the one above particularly discussed which should be tried, but leave that to the court below.

We regret that on the record we cannot decide finally the questions which have been argued here, but it is clear that in their eagerness to, get a prompt decision below the parties overlooked the condition of their pleadings and the court was thereby misled.

Judgment reversed for further proceedings not inconsistent herewith.

Mr. Chief Justice Teller and Mr. Justice Whitford concur. 
      
       The abstract shows he here also demurred hut not to what; the transcript of record, however, shows only the motion.
     