
880 A.2d 711 (2005)
Richard E. FILIPPI, Mayor, City of Erie, Appellant
v.
Casimir KWITOWSKI, Controller, City of Erie.
Commonwealth Court of Pennsylvania.
Argued June 10, 2005.
Decided July 19, 2005.
Reargument Denied September 9, 2005.
*712 Wallace J. Knox, Erie, for appellant.
Gregory A. Karle, Erie, for appellee.
BEFORE: FRIEDMAN, Judge, COHN JUBELIRER, Judge, and FLAHERTY, Senior Judge.
Reargument En Banc Denied September 9, 2005.
OPINION BY Judge COHN JUBELIRER.
Appellant, Richard E. Filippi, elected Mayor of the City of Erie (Mayor) appeals from an Order of the Court of Common Pleas of Erie County (common pleas) that granted the Preliminary Objections of Appellee, Casimir Kwitowski, elected Controller of the City of Erie (Controller). In his complaint in mandamus, Mayor requested that common pleas order Controller to authorize a salary payment, even though the line item in the budget passed by City Council and signed by Mayor did not contain an appropriation for that salary. Controller, in his Preliminary Objections, argued, inter alia, that Mayor failed to plead a duty, clearly established by law, compelling him to authorize salary payments upon demand, regardless of their legality.
The facts giving rise to this dispute are as follows. On January 14, 2004, Mayor appointed Erby Conley as acting Public Safety Director (Director) and, on September 8, 2004, City Council confirmed his appointment. However, when City Council passed the fiscal year 2005 budget on December 22, 2004, it set the salary of Director at zero. Mayor did not exercise his veto power, but signed the budget into law on December 22, 2004. Thus, the 2005 budget did not fund Director's position. Notwithstanding, Mayor asked Director to continue to report to his job, which he did. Controller refused to sign Director's salary check, believing that, because the payment had not been authorized in the budget, it would be contrary to the law.
Mayor initiated this action by complaint, on February 2, 2005, containing counts in mandamus and declaratory judgment. In response, Controller filed Preliminary Objections, which demurred and requested more specific pleadings. Mayor then filed a two-count amended complaint (Mandamus and Declaratory Judgment) on March 4, 2005, requesting common pleas to: 1) order Controller to sign Director's checks, and 2) determine and declare that Controller's duty to sign checks is ministerial and, therefore, obligatory. Controller filed Preliminary Objections to Mayor's amended complaint on March 7, 2005, asserting, inter alia, that Mayor failed to plead the *713 duty that Controller is compelled to perform, and requested a more precise statement as to the conflict that Mayor anticipates in the future.
In its April 4, 2005 Opinion and Order, common pleas sustained Controller's Preliminary Objections, finding that: 1) Controller's functions are discretionary when authorizing payments; 2) Mayor did not have the ability to transfer funds from one budget to another; and, 3) city council was not required to rescind the position of Director of Public Safety before deciding not to fund it. Mayor appeals that decision to our Court.
On appeal, Mayor argues that: 1) the Optional Third Class City Charter Law, Option A (Charter Law),[1] which City has adopted, superseded the Third Class City Code (City Code);[2] 2) pursuant to the Charter Law, Controller functions in a ministerial capacity, which warrants the granting of a writ of mandamus to compel his action to issue payment, regardless of the legality of the desired action; 3) common pleas erred in finding that funds were not available to pay the Director; and, 4) Controller does not have the right to question the legal propriety of matters before him. A demurrer is properly sustained only when, accepting as true all well-pleaded allegations and material facts averred in the complaint, as well as all reasonable inferences from it, and resolving all doubt in favor of overruling the demurrer, the law states with certainty that no recovery is possible. Hawks by Hawks v. Livermore, 157 Pa.Cmwlth. 243, 629 A.2d 270, 271 n. 3 (1993).[3] Furthermore, "[a] writ of mandamus is an extraordinary remedy which compels the performance of a ministerial act or mandatory duty." Deputy Sheriff's Ass'n v. County of Allegheny, 730 A.2d 1065, 1067 (Pa.Cmwlth.1999), petition for allowance of appeal denied, 560 Pa. 711, 743 A.2d 923 (1999) (citations omitted). An act is ministerial if it is "one which a public officer is required to perform upon a given state of facts and in a prescribed manner in obedience to the mandate of legal authority." Id. (quoting Rose Tree Media Sch. Dist. v. Dept. of Pub. Instruction, 431 Pa. 233, 236, 244 A.2d 754, 755 (1968)). A writ of mandamus is properly issued "only where there is a clear legal right in the plaintiff, a corresponding duty in the defendant, and a want of any other appropriate and adequate remedy." Deputy Sheriffs Assn., 730 A.2d at 1067.
The City of Erie is a city of the third class, which adopted the Optional Third Class City CharterMayor-Council Plan A.[4] There are provisions in both the Charter Law and the City Code that set forth a controller's duties and responsibilities.[5]*714 Mayor relies on Section 420 of the Charter Law, 53 P.S. § 41420, to support his position that Controller is vested only with ministerial duties. Section 420 provides:
The control function shall include provision for an encumbrance system of budget operation, for expenditures only upon written requisition, for the preaudit by the city controller of all claims and demands against the city prior to payment, and for the control of all payments out of any public funds by individual warrants for each payment to the official having custody thereof.
Controller, however, asserts that Section 1706 of the City Code, 53 P.S. § 36706, which explicitly states that the Controller signs "when satisfied of the legality of such payment," continues to be applicable. Section 1706 provides:
The city controller shall have the power to administer oaths or affirmations in relation to any matter touching the authentication of any account, claim, or demand of or against the city, but shall not receive any fee therefor, and shall countersign all warrants for the payment of monies out of the city treasury when satisfied of the legality of such payment.
He believes that, under Section 301 of the Charter Law, 53 P.S. 41301, the Charter Law supplements the City Code, and supersedes it only where the two provisions conflict.[6] However, we do not need to decide whether Section 420 of the Charter *715 Law supersedes Section 1706 of the City Code because we are to look to the City Code only when the provisions in the Charter Law do not resolve the issue. Section 301 of the Charter Law. Here, under Section 420 of the Charter Law, Controller may not be compelled to sign a salary check when there is no appropriation of money with which to pay that check.
Section 420 of the Charter Law, in relevant part, provides for "the pre-audit of the city controller of all claims and demands against the city prior to payment, and for the control of all payments out of any public funds by individual warrants for each payment to the official having custody thereof." (Emphasis added). Controller's "pre-audit" duty[7] necessitates a review of the budget for actual authorization of expenditure by ordinanceexactly what Controller did here. For example, in In re 1983 Audit Report of Beharry, 116 Pa. Cmwlth. 613, 544 A.2d 514, 519-20 (1988), affirmed, 528 Pa. 29, 595 A.2d 15 (1991), we held that where the controller, by virtue of his pre-audit duties, pursuant to Section 1752 of the County Code, 16 P.S. 1752, has actual or implied notice of the dubiousness of a claim, he must refuse to pay. The term "pre-audit" is synonymous with "pre-approve." See Section 404 of The Fiscal Code, Act of April 9, 1929, P.L. 343, as amended, 72 P.S. 404. In addition, Section 420 of the Charter Law empowers Controller with the "control of all payments" and, included in the definitions for "control" is the "power or authority to guide or manage." MERRIAM-WEBSTER'S COLLEGIATE DICTIONARY 252 (10th ed.2001). Controller, thus, has the power and authority to manage the payments, which is not consistent with Mayor's argument that Controller must sign every check placed before him if Mayor directs him to do so. There is, moreover, no directory language in Section 420, and such language is necessary for the construction of a ministerial function. See Stork v. Sommers, 158 Pa. Cmwlth. 65, 630 A.2d 984, 986-87 (1993)(finding that the directory language "[t]he city treasurer ... shall pay all warrants duly countersigned" imbued the city treasurer, in a city organized pursuant to the Charter Law, with a ministerial duty)(emphasis added)).[8]
Because we conclude that there is no clear mandatory duty to require Controller to authorize a payment that is not funded in the budget, Mayor is not entitled to mandamus relief.[9] Accordingly, we affirm common pleas.

ORDER
NOW, July 19, 2005, we hereby AFFIRM the order of the Court of Common *716 Pleas of Erie County in the above-captioned matter.
[DOCNUM 01156BB8]
NOTES
[1]  Act of July 15, 1957, P.L. 901, as amended, 53 P.S. 41401-41421.
[2]  Act of June 23, 1931, P.L. 932, as amended, 53 P.A. XXXXX-XXXXX.
[3]  This Courts review of a case dismissed on preliminary objections is plenary. Yaracs v. Summit Academy, 845 A.2d 203, 207 n. 5 (Pa.Cmwlth.2004), petition for allowance of appeal denied, 579 Pa.708, 857 A.2d 682 (2004), cert denied, ___ U.S. ___, 125 S.Ct. 1304, 161 L.Ed.2d 108 (2005).
[6]  Prior to 1962, the City of Erie was organize solely pursuant to the City Code. After it it adopted the Charter Law, the City of Erie changed from the "commission from" of city government. It removed the mayor as a
member of city council and vested him with the "executive power" of the city, Section 411 of the Charter Law, 53 P.S. § 41411, and vested council with "legislative power." Section 407 of the Charter Law, 53 P.S. § 41407. City of Erie v. Dep't of Envtl. Prot., 844 A.2d 586, 587 (Pa. Cmwlth. 2004).
[7]  After opting to be governed pursuant to the Optional Third Class City CharterMayor-Council Plan A, the Erie City Council passed Section 121.01 of the City Ordinance. That Section reads, in its entirety:

The City Controller shall be elected by law and shall be responsible for the exercise of the control function in the management of the finances of the City. The control function shall include provision for an encumbrance system of budget operation, for expenditures only upon written requisition and for pre-audit by the City Controller of all claims and demands against the City prior to payment, and for the control of all payments out of any public funds by individual warrants for each payment to the official having custody thereof. Both the City Controller and the City Treasurer shall endorse all City checks prior to issuance for payment thereon.
(Ord. 74-1992 § 2, passed 12-2-92.) Because the City of Erie does not have the power to enact ordinances that contravene its enabling legislation, Section 303 of the Charter Law, 53 P.S. 41303, courts interpret city ordinances within the statutory framework underlying that grant of power. See, e.g., Malloy v. Pfuhl, 116 Pa.Cmwlth. 461, 542 A.2d 202, 204 (1988), petition for allowance of appeal denied, 520 Pa. 592, 551 A.2d 218 (1988). Thus, the grant(s) of power contained in Section 121.01 of the City Ordinance must be grounded in either Section 420 of the Charter Law, Section 1706 of the City Code, or a reading of both. Of note, Section 121.01 of the City Ordinance virtually mirrors Section 420 of the Charter Law.
[8]  To determine whether the Charter Law supersedes the City Code, we must look to Section 301 of the Charter Law which, in its entirety, reads:

Upon the adoption by the qualified voters of any city of any of the optional plans of government set forth in this act, the city shall thereafter be governed by the plan adopted and by the provisions of this act common to optional plans and by all applicable provisions of general law, subject to the transitional provisions of Article VI of this act. The plan adopted and the provisions of this act common to optional plans shall become the organic law of the city at the time fixed by this act. So far as they are consistent with the grant of powers and the limitations, restrictions and regulations hereinafter prescribed, they shall supersede any existing charter, and all acts and parts of acts, local, special or general, affecting the organization, government and powers of such city to the extent that they are inconsistent or in conflict therein. All existing acts or parts of acts and ordinances affecting the organization, government and powers of the city not inconsistent or in conflict with the organic law so adopted shall remain in full force until modified or repealed as provided by law.
(Emphasis added).
[9]  "Audit" is defined as "a formal examination of an organization's ... accounts or financial situation." MERRIAM-WEBSTER'S COLLEGIATE DICTIONARY 75 (10th ed.2001). The prefix "pre" means "earlier than: prior to: before." Id. at 913, 551 A.2d 218. Accordingly, a "pre-audit" duty can be defined as an action or responsibility commenced prior to a formal examination of an organization's accounts or financial situation.
[]  The last sentence in Section 121.01 of the City Ordinance, "[b]oth the City Controller and the City Treasurer shall endorse all City checks prior to issuance for payment thereon," only pertains to the requirement that Controller sign checks prior to issuance of payments, and is not a directory duty to sign all checks.
[]  Mayor's argument that City Council's decision not to fund the Director's position vitiates Section 415 of the Charter Law, 53 P.S. § 41415, which grants him authority to appoint directors for the term of his office, is, in effect, a collateral attack on the 2005 budget. However, the 2005 budget was not challenged upon its passage and it is improper to attack it collaterally. Latch v. City of Johnstown, 166 Pa.Cmwlth. 46, 646 A.2d 22, 23 (1994).
