
215 Cal.App.3d 438 (1989)
263 Cal. Rptr. 665
HOCK INVESTMENT COMPANY, INC., Plaintiff and Appellant,
v.
CITY AND COUNTY OF SAN FRANCISCO et al., Defendants and Respondents.
Docket No. A042059.
Court of Appeals of California, First District, Division Two.
September 22, 1989.
*441 COUNSEL
Peter G. Hanson, James M. Wagstaffe, Kaus & Kerr and Kaus, Kerr & Wagstaffe for Plaintiff and Appellant.
Louise H. Renne, City Attorney, and Andrew W. Schwartz, Deputy City Attorney, for Defendants and Respondents.
OPINION
KLINE, P.J. 

INTRODUCTION
Hock Investment Company, Inc. (Hock) appeals a judgment of dismissal following the trial court's sustaining of a demurrer without leave to amend its complaint against the City and County of San Francisco (City) and various City officials. The complaint, which sought declaratory relief and was accompanied by a petition for writ of mandate, challenged a 1982 condominium conversion ordinance and the decision of the San Francisco Board of Supervisors upholding the department of public works' denial of Hock's application to convert. Hock contends: (1) retroactive application of the ordinance was barred by existing law; (2) the ordinance was inapplicable by its own terms as Hock was not a 1983 registrant, but a 1982 registrant; (3) Hock's application was approved by operation of law as it was not disapproved within 50 days after filing; (4) application of the ordinance to Hock constitutes an impermissible taking, violates the right to travel, and denies Hock equal protection of the law, all in violation of the federal Constitution.

STATEMENT OF FACTS
Hock, a corporation, owns a 36-unit apartment building at 2090 Pacific Avenue in San Francisco which it desires to convert to condominiums. The Hock family has owned the subject property for more than 50 years.
As initially enacted in 1979, the condominium conversion ordinance authorized the conversion of a maximum of 1,000 units per calendar year. The ordinance established a registration procedure to create a waiting list for future years. (S.F. Mun. Code, § 1396.) In February 1982, interested property owners were invited to register for the opportunity to convert in 1983. In March 1982, Hock registered, paying a $450 deposit and receiving *442 priority number 83-64. In October 1982, the department of public works (DPW) notified Hock that there were openings in the 1982 quota of 1,000 and offered to process Hock's application on the 1982 list. The notice was titled "Vacancies within annual limit on condominium conversion for 1982" and advised Hock: "Due to non-submittals, withdrawals and disapprovals, there are now existing a number of vacancies within the 1,000-unit annual limitation on condominium conversions for the current year 1982. Your priority position on the 1983 condo conversion registration list is such that you may now be moved to fill these vacancies in 1982. Should you so wish, please submit your complete Application Packet ... and other required documents before December 22, 1982 for our review and processing." (Italics in original.) The letter also requested that appellant respond in writing before October 29, 1982, if it wished to convert in 1982. Hock completed the attached DPW form, agreeing that "Yes, I wish to convert my property to condominiums in 1982." Hock submitted the form to the DPW on October 20, 1982. On November 3, 1982, the Director of Public Works sent Hock a second letter, reiterating that if Hock wished to fill some of the 260 vacancies for 1982, it should submit its tentative map and completed application packet. The letter explained that: "[s]hould the 260 units be exhausted by the time you send in your submittal, you will be so advised, and your building will be returned to its proper priority position on the 1983 registration list without prejudice. Once your application is accepted, however, you will be removed from the 1983 list." (Italics added.) Hock spent approximately $13,000 to meet obligations required to complete the application packet. The completed application packet was submitted on December 10, 1982, together with the required $4,050 fee. A statement acknowledging receipt of the application packet on that date stated: "This notice of receipt does not imply, either expressly or by intent, that your application has been accepted by the Department of Public Works for filing and processing purposes. Should this office be advised by the City Attorney that all registrants on the 1982 list have priority over you, your Application Packet [sic] and fee will be returned to you upon exhaustion of the 1,000-unit limitation for 1982. [¶] Should the City Attorney advise us otherwise, your application, if complete and proper, will be accepted and processed in the order of the time of receipt until available vacancies within the 1982 annual limitation have been exhausted."
In January 1982, the DPW had adopted order No. 124,864, "ESTABLISHING RULES AND REGULATIONS GOVERNING REGISTRATION FOR CONDOMINIUM CONVERSIONS IN 1983." Rule 11 of that order provided: "All condominium conversions shall be subject to provisions of the Subdivision Code and the Subdivision Map Act, as said Code and Act may *443 be amended from time to time, applicable at the time the application for conversion is submitted for processing."
As of December 10, 1982, when Hock submitted its completed applications for processing, this regulation had not been repealed and the law permitted 36-unit buildings to be converted.
However, on November 30, 1982, City's chief administrative officer, Roger Boas, requested the DPW to stop processing any condominium conversion applications until a new policy was set by the board of supervisors. Accordingly, the DPW did not process Hock's application. Pertinent events thereafter were described in Leavenworth Properties v. City and County of San Francisco (1987) 189 Cal. App.3d 986 [234 Cal. Rptr. 598]: "On December 13, 1982, the board of supervisors adopted, and on December 24, the mayor approved, new language which essentially set up a three-year moratorium on conversions. The amending language provided that no applications would be accepted from January 1, 1983, to December 31, 1985, except for conversions of 200 units in small, owner-occupied buildings. As to the remaining allotment for 1982, the amendment provided, as relevant, that: `No application for conversion of a residential building of twenty-five (25) units or more submitted by a 1983 registrant shall be approved by the Department of Public Works to fill the unused portion of the 1,000 unit limitation for the year 1982.' The ordinance was declared `operative on January 1, 1983.'" (Id., at p. 990.)
On December 16, 1982, DPW informed Hock that "the current proposed legislation, which was passed by the Board of Supervisors on December 13, 1982, precludes the Department of Public Works from accepting applications for conversion of residential buildings of 25 units or more submitted by a 1983 registrant to fill the 1982 vacancies." The letter advised Hock to pick up his tentative maps and application packet and stated that the $450 registration fee would be refunded with interest. Subsequently, on February 16, 1983, pursuant to an agreement with Hock's attorney, the DPW agreed to process the application, but advised that it would be denied because it was not in compliance with the provisions of the amended ordinance. The DPW also advised Hock that processing the application would entail forfeiture of the $4,500 fees for filing and registration.
On February 25, 1983, DPW notified Hock that the application was disapproved because the ordinance mandates disapproval of any application for conversion of a building with 25 or more units "submitted by a 1983 registrant to fill 1982 vacancies." Further, under the ordinance, from January 1, 1983, through December 31, 1985, the DPW "shall not accept or *444 approve any application for converting a residential building of more than 6 units...." The City returned the $4,050 processing fee, but refused to refund the $450 registration fee "due to your insistence that we reactivate your case."

STATEMENT OF THE CASE
On March 7, 1983, Hock appealed the disapproval to the board of supervisors. Following a hearing before the board, the board voted to affirm the DPW denial of the Hock application. Thereafter, on July 29, 1983, Hock filed a petition for writ of mandate and complaint for declaratory relief challenging the decision and the validity of the ordinance. On January 27, 1988, the superior court sustained City's demurrer as to all causes of action without leave to amend.[1] A timely appeal followed entry of the judgment dismissing the action.

DISCUSSION
(1) We apply the well-established rule that a demurrer "`admits the truth of all material factual allegations in the complaint ...; the question of plaintiff's ability to prove those allegations, or the possible difficulty in making such proof does not concern the reviewing court.'" (Perdue v. Crocker National Bank (1985) 38 Cal.3d 913, 922 [216 Cal. Rptr. 345, 702 P.2d 503], citing Alcorn v. Anbro Engineering, Inc. (1970) 2 Cal.3d 493, 496 [86 Cal. Rptr. 88, 468 P.2d 216].)

I.

The Trial Court Abused Its Discretion in Sustaining the Demurrer Where it Appears Hock Could State a Cause of Action Based Upon Estoppel
(2a) Hock initially claims that retroactive application of the 1983 condominium conversion ordinance is barred by the DPW's order No. 124,864 (rule 11). Essentially, this claim alleges an estoppel. The effect of the DPW regulation and the determination whether Hock had moved to the 1982 list *445 or was still considered a 1983 registrant are key to the estoppel determination and to the disposition of this appeal.
But for the regulation and Hock's claim he moved to the 1982 list, it would be easy to conclude that Hock acquired no vested rights and had no reasonable expectation of being able to convert in 1982. In Santa Monica Pines, Ltd. v. Rent Control Board (1984) 35 Cal.3d 858 [201 Cal. Rptr. 593, 679 P.2d 27], the California Supreme Court discussed the vested rights doctrine in the context of an owner who sought to remove apartments from the rental housing market by converting them to condominiums. Although the city had approved a tentative subdivision map for the conversion prior to the adoption of rent control, the Supreme Court upheld the denial of a permit allowing removal of the units from the rental market, concluding that the $1,700 spent by plaintiffs after the map approval was inadequate to establish a vested right to complete the conversion free of rent control. (Id., at p. 861.) The court stated: "The vested rights doctrine is `"predicated upon estoppel of the governing body."' (Avco Community Developers, Inc. v. South Coast Regional Com., supra, 17 Cal.3d at p. 793.) This is a principle of equitable estoppel which may be applied against the government where justice and fairness require it. (Raley v. California Tahoe Regional Planning Agency, supra, 68 Cal. App.3d at p. 975.) [¶] An equitable estoppel requiring the government to exempt a land use from a subsequently imposed regulation must include (1) a promise such as that implied by a building permit that the proposed use will not be prohibited by a class of restrictions that includes the regulation in question and (2) reasonable reliance on the promise by the promisee to the promisee's detriment. (See Avco, supra, 17 Cal.3d at p. 793.) Appellants here cannot have a vested right unless and until both of those elements of estoppel against the government are established." (Id., at pp. 866-867; see also Russ Bldg. Partnership v. City and County of San Francisco (1988) 44 Cal.3d 839, 853-854 [244 Cal. Rptr. 682, 750 P.2d 324].)
The federal district court concluded in Traweek v. City and County of San Francisco, supra, 659 F. Supp. 1012, that the plaintiff-developer who had registered for positions on the 1983 priority list and thereafter spent $400,000 dollars to prepare conversion applications had acquired no vested right to convert. There, the applicant intended to convert in 1983. There was no allegation it had moved to the 1982 list and no reference to DPW rule 11 appears in the opinion. The district court concluded "that the complaint does not allege the kind of reasonable investment expectations cognizable as a possible partial basis for a taking claim. First, the plaintiffs bought into a heavily regulated situation and were on notice that the City's condominium conversion regulations were subject to annual review.... *446 Second, the plaintiffs had no `vested right' to complete the planned development under California law. The right to develop a subdivision such as the conversion of the John Muir apartments, vests under California law only after the developer obtains tentative or final map approval and expends substantial sums in reliance on that approval. [Citations.] Although the plaintiffs allege that they submitted a tentative map, ... there is no allegation that the map was approved or that the plaintiff thereafter spent large sums in reliance on that approval. The pre-approval expenditure of $400,000 supports no cognizable constitutional claim. [Citations.]" (Id., at p. 1026.) The court concluded that plaintiff's expectations did not give rise to a binding legislative commitment. (Id., at pp. 1026-1027.)
More recently, Division One adopted the same reasoning in Leavenworth Properties v. City and County of San Francisco, supra, 189 Cal. App.3d 986, rejecting the plaintiff's contention that the moratorium could not be retroactively applied. Plaintiff in Leavenworth submitted its application on December 31, 1982, the day before the new ordinance took effect.
"It is well settled that a legislative body may give laws retrospective application where it clearly evinces that intent and no vested or constitutional rights are infringed. [Citation.] Here, the board of supervisors expressly declared its intent that the ordinance should take effect on January 1, 1983. As of that retroactive effective date,[[2]] plaintiff had no vested right to convert its building to condominiums. (See Santa Monica Pines, Ltd. v. Rent Control Board, supra, 35 Cal.3d 858, 866-868....) At most, plaintiff had a priority number and an invitation from the DPW to submit its application. Plaintiff's application was not submitted until a week after the mayor signed the enacted moratorium ordinance. At that point, plaintiff could have had no reasonable expectation that its application would be accepted. Certainly, plaintiff had no vested right to an approval of its application. The retroactive application of the moratorium was valid." (189 Cal. App.3d at p. 994, italics added.)
(3) Both Traweek and Leavenworth hold that an owner has no reasonable expectation that condominium ordinances will not change. Thus, at least until the City accepts the conversion application and plaintiff relies upon that acceptance, plaintiff acquires no vested right to convert. This is consistent with the general rule that "a developer must comply with the laws in effect at the time when a building permit is to be issued. [Citation.]" *447 (Pardee Construction Co. v. City of Camarillo (1984) 37 Cal.3d 465, 472, fn. 9 [208 Cal. Rptr. 228, 690 P.2d 701], italics omitted.)[3]
(2b) Nevertheless, the instant case is distinguishable from Traweek and Leavenworth in several important respects: Unlike the plaintiffs in those cases, Hock submitted the completed application prior to adoption by the board of the new ordinance. More importantly, neither Traweek nor Leavenworth refers to the DPW regulation upon which Hock relies. Finally, there is some uncertainty as to whether Hock remained a 1983 registrant or was actually moved from the 1983 priority list to the 1982 list on or before December 10th. The critical question is whether these distinctions make a difference. We believe they do.
Hock acquired no vested right to convert merely by filing of its application on December 10th, three days prior to adoption of the new ordinance by the board. However, the DPW regulation in effect at that time advised would-be condominium converters that all requests to convert would be subject to the law "applicable at the time the application for conversion is submitted for processing."
The purpose of this regulation is manifest. It attempts to provide some degree of certainty to the would-be converter that its application will be evaluated in accordance with the law in effect at a particular time. As discussed by one commentator, with respect to subdivision map approvals: "The problem for the developer is that the approval process is a lengthy one, and much time and effort are expended on the project even as the developer pursues the necessary approvals. (4) (See fn. 4.) On the other hand, important policy considerations favor local government's ability to impose conditions for the protection of the community and the environment as late in the development process as possible." (Curtin & Merritt, California Subdivision Map Act Practice (Cont.Ed.Bar 1987) § 6.27, p. 145.)[4] Rule 11 of DPW's order No. 124,864 was obviously intended to *448 balance these concerns by providing some reassurance to those embarking upon the conversion application process that once the completed application was submitted, the rules would not change. Hock generally alleges that he relied upon the regulation in preparing and filing his application.
City responds that the DPW order may not take precedence over legislation adopted by the board of supervisors. (5) We agree that an internal administrative order does not supersede legislation adopted by the board of supervisors. (See McDonald's Systems of California, Inc. v. Board of Permit Appeals (1975) 44 Cal. App.3d 525, 538-539 [119 Cal. Rptr. 26].) However, the issue is not whether the DPW order supersedes a valid ordinance adopted by the board, but whether the DPW order may provide a basis for estopping the City from evaluating Hock's application under the subsequently adopted ordinance. (6) "A regulation reasonably adapted to the administration of a legislative act has the force and effect of law. [Citations.]." (Dabis v. San Francisco Redevelopment Agency (1975) 50 Cal. App.3d 704, 706 [122 Cal. Rptr. 800].)
After December 13, 1982, the date the board adopted the new ordinance, reliance upon the DPW regulation would have been unreasonable. (Perhaps this is why plaintiffs in Leavenworth and Traweek did not seek to raise an estoppel based upon the order.) (2c) However, an applicant who submitted its completed application prior to adoption of the new ordinance, and in reliance upon the DPW order, could reasonably expect its application to be evaluated in accordance with the ordinances in effect at that time.
Although acquisition of a vested right is generally predicated upon issuance of a building permit or its equivalent, the premise of the doctrine is *449 that the issuance of the permit constitutes a promise by the approving agency that a subsequently adopted ordinance will not prohibit the proposed use. When the applicant reasonably relies upon that promise to its detriment, an estoppel is created. (See Russ Bldg. Partnership v. City and County of San Francisco, supra, 44 Cal.3d at p. 854.) Here, we have an express promise by the approving agency, the DPW, that the application will be evaluated under the ordinance in effect at the date of submittal. If Hock reasonably relied upon that promise to its significant detriment in completing and in filing its application prior to notice of any proposed change in the ordinance, we believe the city would be estopped from applying the new ordinance to Hock.
(7) We are cognizant that the doctrine of equitable estoppel may not be applied against a governmental body except in unusual cases where necessary to avoid grave or manifest injustice, and the doctrine would not defeat a strong public policy or result in the indirect enforcement of an illegal contract. (County of San Diego v. Cal. Water etc. Co. (1947) 30 Cal.2d 817, 826 [186 P.2d 124, 175 A.L.R. 747].) (8) However, as we pointed out in City and County of San Francisco v. Grant Co. (1986) 181 Cal. App.3d 1085 [227 Cal. Rptr. 154], "[t]he existence of an estoppel is generally a question of fact for the trial court, whose determination is conclusive on appeal unless the opposite conclusion is the only one that can be reasonably drawn from the evidence. In the latter situation, the existence of an estoppel becomes a question of law. [Citation.]" (Id. at p. 1091.)
(2d) Accepting, as now we must, the allegations set forth in the pleadings, we cannot say Hock will be unable to demonstrate a manifest injustice from the retrospective application of an ordinance contrary to an explicit regulation upon which plaintiff appears to have detrimentally relied. The degree of knowledge of the parties, whether Hock in fact relied upon the DPW regulation, the extent and reasonableness of any reliance, and the extent to which estoppel would interfere with a strong public policy, are questions of fact which on remand must be assessed by the trial court.

II.

The Court Abused Its Discretion in Sustaining the Demurrers Without Leave to Amend, as Whether Hock Had Been Moved to the 1982 List Presents a Question of Fact
Hock contends in its complaint that it is a 1982 applicant and that the terms of the ordinance, therefore, do not apply to it. City insists that Hock was a 1983 registrant, applying to fill 1982 vacancies. City's characterization *450 is consistent with the distinction made in Leavenworth between "registrants already placed on the 1982 list and those on the waiting list...." (189 Cal. App.3d at p. 993.) However, the record is unclear whether in fact Hock was removed from the 1983 priority list and placed on the 1982 list prior to adoption of the ordinance. Letters from DPW to Hock are inconsistent in this respect. The December 16, 1982, letter advising Hock that its application packet was not accepted characterizes Hock as a 1983 registrant seeking to fill 1982 vacancies. The letter of November 3, 1982, advising Hock that it might choose to submit a tentative or parcel map and application for converting in 1982, also stated that if the remaining 260 units were exhausted by the time of Hock's submittal, "your building will be returned to its proper priority position on the 1983 registration list without prejudice." (Italics added.) Use of the word "returned" would imply that at least by the date of application submission, the applicant would have been moved to the 1982 list. However, the next sentence seems to contradict this by advising Hock that "[o]nce your application is accepted, however, you will be removed from the 1983 list." Here, acceptance of the application seems to be the critical date for becoming a 1982 applicant. At the hearing before the board of supervisors, Raymond Wong, division manager of the DPW, advised the board that letters were sent "to those on the 1983 registration list, advising them that they could be advanced to 1982 if they so wished." Supervisor Kennedy asked the city attorney at what point the applicant would move from the 1983 list to the 1982 list. The city attorney responded that the invitation to convert in 1982 "does not vest with the applicant the right to move up." Then Supervisor Kennedy stated: "But in this case the applicant did move up." The city attorney responded: "Except that the applicant did not evince his intention to do so until he filed an application for tentative map, until December 10, 1983." According to the city attorney, December 10, rather than October 19, was the critical date, "Because until they have filed an application there was really no way for the city to determine whether in fact they wanted to exercise that option." This exchange would indicate Hock did "move up" to the 1982 list upon filing of the completed application package on December 10, and perhaps before that on October 20, 1982, upon returning the form showing its intent to convert. A relevant consideration in making this determination might be whether Hock would have been continued on the 1983 list had it failed to submit the completed application package after evincing its intent to convert in 1982 by returning the DPW form.
(9) Be that as it may, it appears to us that there is a significant factual dispute as to whether Hock moved up to the 1982 priority list, or remained on the 1983 list (and subject to the ordinance) at the time it filed its application. If in fact Hock was removed from the 1983 list and added to the 1982 *451 list on or before adoption of the ordinance on December 13, 1982, the ordinance would be inapplicable by its terms.
For the foregoing reasons, the judgment is reversed and the matter remanded for further proceedings consistent with the views expressed in this opinion.
Benson, J., and Peterson, J., concurred.
A petition for a rehearing was denied November 2, 1989, and respondents' petition for review by the Supreme Court was denied December 21, 1989.
NOTES
[1]  Two other would-be condominium converters adversely affected by the ordinance sued the City at approximately the same time as appellant. All three complaints stated similar claims. On April 4, 1984, the United States District Court issued its memorandum of decision and order dismissing the plaintiff's constitutional claims in Traweek v. City and County of San Francisco (N.D.Cal. 1984) 659 F. Supp. 1012. Division One of this district decided Leavenworth Properties v. City and County of San Francisco, supra, 189 Cal. App.3d 986, in January 1987.
[2]  The court's footnote 1 provides: "January 1, 1983, is `retrospective' because under the city charter an ordinance does not become effective until 30 days after approval  here, January 23, 1983. (S.F. City Charter, § 2.304.)...."
[3]  Not even the county's issuance of a final tract map and permission to file a public report for a condominium conversion will exempt a landlord from regulations enacted thereafter, but before the landlord incurs substantial expense in reliance on the approval. (City of West Hollywood v. Beverly Towers, Inc. (1989) 211 Cal. App.3d 1536 [260 Cal. Rptr. 226] review granted Oct. 26, 1989 (S011689).)
[4]  "The courts' reluctance to expand the vested rights doctrine has led to a number of legislative attempts to give the developer some assurance of being able to complete the project, or at least being able to obtain the permits in accordance with the law in effect at a particular point in time." (Ibid.)

DPW rule 11 serves the same purpose with respect to condominium conversions as Government Code section 66474.2, the map-filing freeze provision of the Subdivision Map Act, does for subdivision map approvals. Enacted in 1982, section 66474.2 provides that, in determining whether to approve or disapprove a tentative map, the approving agency must apply only the ordinances, policies, and standards in effect on the date on which the application for the tentative map is considered to be complete. Because the final map must be approved if it substantially complies with the tentative map, regardless of changes in the law (Gov. Code, § 66474.1; Youngblood v. Board of Supervisors (1978) 22 Cal.3d 644 [150 Cal. Rptr. 242, 586 P.2d 556]), section 66474.2 "freezes in place, at the time the tentative map application is considered complete, the law applicable to subdivision approvals (but not building permits) and gives the subdivider a form of vested right." (Merritt, Vesting Tentative Maps: Latest Development in the Vested Rights Tug-of-War (Cont.Ed.Bar 1985) 8 Real Property Law Rptr. 165, 167.)
An exception to this limitation arises where the local agency has formally initiated proceedings by ordinance or resolution to amend applicable general plans, specific plans, zoning, or subdivision ordinances of the local agency and has published notice sufficient to notify the public of the nature of the proposed change in the applicable plans, zoning, or ordinance. Under such circumstances, the agency "may apply any ordinances, policies, or standards enacted or instituted as a result of those proceedings which are in effect on the date the local agency approves or disapproves the tentative map." (Gov. Code, § 66474.2, subd. (b)(2).)
