
    C. A. LALUMONDIER, Appellant, v. COUNTY COURT OF ST. FRANCOIS COUNTY, Missouri, et al., Respondents.
    No. 41146.
    Missouri Court of Appeals, Eastern District, Division Three.
    Sept. 25, 1979.
    Y. Kenneth Rohrer, Roberts, Roberts & Rohrer, Farmington, for appellant.
    Robert J. Blackwell, Flat River, for respondents.
    Gary E. Stevenson, Farmington, for County Court and Treasurer.
    Eric C. Harris, Flat River, for City of Leadwood and Village of Rivermines.
    Gary Wagner, Farmington, for Farming-ton and Elvins.
    Don E. Gillihan, Farmington, for Lead-ington.
    John M. Williams, Flat River, for Des-loge.
   REINHARD, Presiding Judge.

Plaintiff brought this declaratory judgment action seeking a definition of his rights to a sum of money which he claims he earned by performing services pursuant to private contracts with the defendants-municipal corporations. All defendants except one moved to dismiss on the grounds that plaintiff’s petition failed to state a cause of action and the trial court sustained the motions. This appeal followed.

Plaintiff had been the St. Francois County Assessor. Defendants herein are the County Court of St. Francois County, St. Francois County Treasurer and Auditor; and the seven municipalities located in St. Francois County: Farmington, Desloge, El-vins, Flat River, Leadwood, Leadington and Rivermines.

In the first three paragraphs of the petition for declaratory judgment, the plaintiff defines the legal statuses of the various defendants. Thereafter, in paragraphs four through six, plaintiff alleges that all of the municipal defendants are located within St. Francois County and that he was the former County Assessor of St. Francois County. In paragraph seven, the plaintiff states: “. . . for the years 1971, 1972, 1973, 1974 and 1975, Plaintiff pursuant to private contracts and solicitations made by municipal corporation Defendants, did prepare said Defendants’ City Tax Books pursuant to said agreements and solicitations . . . for the years stated.” Paragraph 8 reads:

That the preparation of said City Books was not a duty of the County Assessor ... . and . . . that your Plaintiff was entitled to compensation . for performing said service. Further, . . . said work was performed upon Plaintiff’s own time, not during usual business hours, that he personally employed employees to work on said books, and that no County facilities or funds were used in the preparation of said books.

In paragraph nine, plaintiff alleges that after deducting actual expenses, his work for the five year period was worth $11,-145.00. Paragraphs ten and eleven read:

10. That thereafter continuous demands and claims have been made to the proceeds of said sums received by your Plaintiff for the aforesaid described services and a judiciable [sic] controversy has arisen among the parties as to the rightful ownership of said funds and further, said Defendant County Court and said Defendant municipal corporations have been making various and sundry claims to entitlement to said funds, the exact nature of which Plaintiff does not know.
11. That in an effort to end said demands and claims being pressed upon your Plaintiff, Plaintiff tendered the sum of $11,145.00 to the Treasurer of St. Francois County, Missouri as stakeholder of said sum until legal action could be initiated and this controversy decided.

In the prayer, plaintiff requests: “the Court . . . decide . . . and determine that pursuant to the laws and statutes . . . existing in 1971 through 1975 and . . . contracts entered into by . the parties that Plaintiff is entitled to the sum [$11,145.00] . and to declare that no other party herein has any claim to said funds. . . .”

In reviewing the sufficiency of a petition to state a claim for declaratory relief, we “must construe the petition favorably to the plaintiff and accept as true all facts alleged therein.” Vorbeck v. McNeal, 560 S.W.2d 245, 249 (Mo.App.1977). Further, plaintiff must be accorded all favorable inferences which can be deduced from the petition. Id. The test is not whether plaintiff is entitled to the relief requested in the prayer, but whether he is entitled to a declaration of rights or status on the facts pleaded. Harris v. State Bank and Trust Company, 484 S.W.2d 177, 178 (Mo.1972). The petition must allege facts which show a subsisting justiciable controversy between the parties as to their respective rights and duties. Furthermore, relief by way of a judgment conclusive in character and determinative of the issues involved must be appropriate. Plaintiff must also allege that he has a legally protectable interest at stake and that the question presented for review is ripe for judicial guidance. Schmitt v. City of Hazelwood, 487 S.W.2d 882, 884 (Mo.App.1972).

Rule 87.02 provides that “Any person interested under a written contract or other writings constituting a contract, or whose rights, status or other legal relations are affected by a statute . [or] contract . . . may have determined any question of construction or validity arising under the . . . statute [or] contract . . and obtain a declaration of rights, status or other legal relations thereunder.”

The county officials argued in the trial court and in this court that Sections 70.210 to 70.320 RSMo 1969 govern the contracts. They assert that plaintiff performed the work for the cities as assessor because said function could only be performed by an assessor and therefore under the statutes the money belongs to the county. They also contend that no justiciable controversy exists. The motions to dismiss for failure to state a cause of action filed by the various municipalities did not allege any specific grounds.

In court-tried cases the trial court’s judgment or ruling will be sustained if the result is correct, even if based upon an erroneous reason. Campbell 66 Express v. Thermal King, 563 S.W.2d 776, 778 (Mo.App.1978). Here, the trial court’s order of dismissal for failure to state a cause of action did not specify any particular ground.

Although not advanced by any of the defendants in the trial court nor on appeal, we believe that plaintiff’s petition must be dismissed because it fails to contain an allegation that the contracts were in writing. Section 432.070 RSMo 1969 provides:

No county, city, town, village, school township, school district or other municipal corporation shall make any contract, unless the same shall be within the scope of its powers or be expressly authorized by law, nor unless such contract be made upon a consideration wholly to be performed or executed subsequent to the making of the contract; and such contract, including the consideration, shall be in writing and dated when made, and shall be subscribed by the parties thereto, or their agents authorized by law and duly appointed and authorized in writing.

Section 432.070 is mandatory and is part of the substantive law; it specifically requires that contracts with municipal corporations be in writing. Therefore, in order to state a cause of action, plaintiff was required to plead the existence of a written contract in his petition. Since he failed to do so, his petition did not state a cause of action. See Likes v. City of Rolla, 184 Mo.App. 296, 167 S.W. 645 (1914); Neal v. Junior College District of East Central Missouri, 550 S.W.2d 580 (Mo.App.1977).

Judgment affirmed.

GUNN and CRIST, JJ., concur. 
      
      . The City of Leadington filed an answer, admitting that plaintiff was entitled to the funds which it contributed. In light of defendant City of Leadington’s Answer, the court on its own motion dismissed plaintiffs case against defendant City of Leadington.
     