
44 Cal.App.4th 684 (1996)
52 Cal. Rptr.2d 161
JUANITA SCOTT et al., Plaintiffs and Respondents,
v.
COMMON COUNCIL OF THE CITY OF SAN BERNARDINO, Defendant and Appellant.
Docket No. E015306.
Court of Appeals of California, Fourth District, Division Two.
April 16, 1996.
*686 COUNSEL
Sabo & Green, Charles R. Green and Linda M. Chahine for Defendant and Appellant.
Garza & Reyes and Florentino Garza for Plaintiffs and Respondents.
OPINION
HOLLENHORST, Acting P.J.
The trial court signed a judgment and issued a peremptory writ of mandate commanding the Common Council of the City of San Bernardino (Common Council) to reinstate and fund two city attorney investigator positions which were deleted by its budget resolution No. 94-163. The Common Council appeals.

FACTS AND PROCEDURAL HISTORY
Resolution No. 94-163 is a resolution adopting the city's budget for the fiscal year 1994-1995. The petition for writ of mandate, filed July 6, 1994, alleges that the Common Council violated the San Bernardino City Charter (City Charter), section 55, subdivision (d), by adopting the city's budget for the 1994-1995 fiscal year.
The City of San Bernardino is a charter city. (Cal. Const., art. XI, §§ 6, 8; Gov. Code, §§ 34101, 34450 et seq.)[1] City Charter section 55, subdivision (d), prescribes the duties of the city attorney, including the duty to represent the city in actions brought against it, and the duty to prosecute certain violations of state law.[2]
The 1994-1995 budget of the city eliminated the only two investigator positions in the city attorney's office. The petition alleges that the Common *687 Council had a legal duty to provide the city attorney with a sufficient number of investigators to enable the city attorney to carry out his duties, and the Common Council breached this duty by eliminating the investigator positions.
The plaintiffs thus argued that city attorney investigators are indispensable to the ability of the city attorney to perform his mandatory duties, that the city council therefore had a legal duty to fund these positions, and the city council breached its legal duty by failing to do so.
In support of the petition, the city attorney, Mr. Penman, filed a declaration in which he stated that he had been elected city attorney in 1987, and was reelected in 1991. In 1988, the voters gave him additional prosecutorial authority by amending the City Charter to authorize the city attorney to prosecute, criminally and civilly, violations of city ordinances which are drug or vice related, as well as other misdemeanors or infractions as provided by state law.
Mr. Penman also states in his declaration that the investigators in his office were employed after adoption of the charter amendment. He states that the investigators provide crucial investigation services to assist attorneys in deciding whether a case should be filed and, if so, the proper charges to be brought. The investigators also assist the city attorneys in preparing the case for trial, and are frequently crucial witnesses.
Other declarations detailed the role the investigators were playing in ongoing criminal and civil investigations.
In opposition to the petition, the Common Council argued that: "This action is simply an attempt by a City department head to avoid budget reductions upon his department. If Petitioners are successful in this effort, the courts could well be inundated with similar petitions by special interest groups seeking restitution of budget cuts for their favored services."
A declaration by the city administrator detailed the budget process and offered the opinion that the deletions of the investigator positions did not violate the provisions of the City Charter. The declaration attached a copy of section 242 of the City Charter, which provides: "The Mayor and Common Council may prescribe the number, qualification and compensation of the deputies, clerks, assistants, employees and attaches of the City Attorney, City Treasurer and City Clerk. All deputies, clerks, assistants, attaches and employees of the City Attorney, City Clerk and City Treasurer shall be appointed by the respective officers with the consent and approval of the *688 Mayor and Common Council, and shall hold office at the pleasure of the officers appointing them."
In its answer to the petition, the Common Council also cited City Charter section 242, and argued that "The actions of the Common Council, in fixing the number and conditions of employment of employees, and in preparing and adopting the City Budget, are legislative matters over which the judiciary has no control in the absence of exceeding constitutional limits."
After hearing, the trial court granted the petition. It found that elimination of the investigator positions "eliminates the ability to carry out the sworn statutory and charter requirements and duty mandated by the people of this city and the State of California." Accordingly, it held that the Common Council had exceeded its budgetary authority in eliminating the positions. The alternative writ of mandate was granted, and a writ of mandamus was subsequently granted on grounds that the budgetary action prevented the city attorney from carrying out his mandatory duties.

ISSUES
On appeal, the Common Council argues that (1) its actions were part of the budget process; (2) it has the power to delete positions in the city attorney's office; (3) its budgetary actions are legislative decisions which are beyond judicial control; (4) its budgetary actions did not deprive the city attorney of his ability to perform his duties; (5) the superior court lacked the power to enter the judgment and the power to issue the writ of mandate; (6) the trial court misinterpreted applicable law; and (7) the trial court erred in awarding attorney fees under Code of Civil Procedure section 1021.5.[3]
Plaintiffs argue that (1) the action taken was not a budgetary action; (2) investigation is an inextricable part of the city attorney's mandatory duties; (3) the Common Council's elimination of the investigator positions was in excess of its jurisdiction, arbitrary and capricious, and its action was an abuse of discretion; and (4) the superior court had the power to take the actions it did.
We focus on the question of the power of the trial court to interfere with the legislative process of adopting a budget which necessarily allocates scarce resources among various city departments. We conclude that judicial *689 intervention in the budgetary process is only appropriate when, as here, the trial court makes a factual finding that the budget cuts in the office of an elected official prevent that official from carrying out his mandated duties.
Put more colloquially, we hold that the courts may not interfere with the city's budgetary process when the Common Council is cutting fat and muscle, but the courts may act when the council cuts into bone.[4]

STANDARD OF REVIEW
We apply the substantial evidence and independent appellate review standards of appellate review. (See generally, Eisenberg, Cal. Practice Guide: Civil Appeals and Writs 1 (The Rutter Group 1995) ¶ 8.32 et seq.) (1) The trial court's factual finding that the budget cuts prevented the city attorney from performing his duties is reviewed under the substantial evidence standard, i.e., "When a finding of fact is attacked on the ground that there is no substantial evidence to sustain it, the power of an appellate court begins and ends with the determination as to whether there is any substantial evidence, contradicted or uncontradicted, which will support the finding of fact. [Citations.] [¶] When two or more inferences can reasonably be deduced from the facts, a reviewing court is without power to substitute its deductions for those of the trial court." (Green Trees Enterprises, Inc. v. Palm Springs Alpine Estates, Inc. (1967) 66 Cal.2d 782, 784-785 [59 Cal. Rptr. 141, 427 P.2d 805].)
(2) The trial court's determination of questions of law is reviewed under an independent review standard, in which we conduct an independent review of those determinations. "We are not bound by the trial court's stated reasons, if any, supporting its ruling; we review the ruling, not its rationale." (Stratton v. First Nat. Life Ins. Co. (1989) 210 Cal. App.3d 1071, 1083 [258 Cal. Rptr. 721].)

DISCUSSION
Proper resolution of the issues in this case depends upon our interpretation of two cases relied on by the parties in the trial court. Plaintiffs argue that *690 Hicks v. Board of Supervisors (1977) 69 Cal. App.3d 228 [138 Cal. Rptr. 101] governs. The Common Council argues that the case is controlled by County of Butte v. Superior Court (1985) 176 Cal. App.3d 693 [222 Cal. Rptr. 429].
In Hicks, the Orange County Board of Supervisors ordered the transfer of 22 investigators from the district attorney's staff to the jurisdiction of the sheriff-coroner. (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 232.) We upheld the trial court's finding that the board exceeded its jurisdiction in attempting to transfer the control of the district attorney's investigative functions from the district attorney to the sheriff. (Id., at p. 244.) We held: "Although the board of supervisors has wide discretion in budgetary matters ... the law does not vest the board with authority to transfer control of one officer's statutory function to another officer." (Ibid.)
In reaching this conclusion, we first agreed with the proposition that the power to add and delete county employee positions is vested in the board of supervisors. (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 234.) Here, the same is true, since section 242 of the City Charter so provides.
We next agreed with the argument that "... the action of the board of supervisors fixing the number and conditions of employment of county employees, and the preparation and adoption of a county budget are legislative matters over which, when constitutional limits are not exceeded, the judiciary has no control." (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 235.) We said: "Generally, a court is without power to interfere with purely legislative action, and when the Legislature has committed to a municipal body the power to legislate on a given subject, the court has no power to command or prohibit the exercise of the legislative function. [Citations.] The reason the court may not command specific legislative action is that such interference would violate the basic constitutional concept of separation of powers." (Ibid.) Thus, we found that adoption of the budget is a legislative function, as is the fixing of the number of employees, their salaries, and their benefits. Accordingly, this legislative function may not be controlled by the courts. (Ibid.)
In Hicks, however, we found substantial evidence to support the trial court's finding that the action of the board of supervisors in ordering the transfer of investigators was not a budgetary action, but rather an attempt to implement a plan of reorganization. (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 237, 240.) Thus we were not called on to decide whether the actions taken in that case could have been taken as part of the budget process. Here, the actions of the Common Council were clearly taken during the budget process, and the petition directly assaults the resolution adopting the annual budget.
*691 The remaining question in Hicks was whether the board of supervisors could compel the district attorney to perform his investigative functions through the office of the sheriff. We held that it could not, because of the statutory power of the district attorney. (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 240-241.) Relevant here, we said: "Investigation and the gathering of evidence relating to criminal offenses is a responsibility which is inseparable from the district attorney's prosecutorial function. That the district attorney is charged with the duty of investigating as well as prosecuting criminal activity has been recognized by an unbroken line of California cases.... [¶] The board of supervisors has no power to control the district attorney in the performance of his investigative and prosecutorial functions, and may not do so indirectly by requiring that he perform his essential duties through investigators who are subject to the control of another county officer." (Id., at p. 241.) Accordingly, we found that the board of supervisors exceeded its constitutional and statutory powers. (Id., at p. 242.)[5]
In Butte, the county adopted a budget which reduced the sheriff's department by 12 positions. Because of a prior court order, the sheriff was actually required to lay off 23 people. The sheriff filed suit to rescind the layoffs, contending that the budget and staff reductions prevented him from performing the statutorily mandated duties of his office. The trial court granted a preliminary injunction barring the layoffs. The appellate court held that the trial court abused its discretion in granting the preliminary injunction because it was convinced that there was no possibility that the sheriff would prevail on the merits. (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 697.)
The court cited Hicks for the proposition that the adoption of a budget is a legislative function, and a court is generally without power to interfere in the budget process. Similarly, the fixing of the number of employees in a department is an integral part of the budget process: "This integrated process of determining the budget of a county and adjusting the number of employees in each county office to conform to the overall spending plan is a legislative function which `may not be controlled by the courts.'" (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 698.)
The court then said: "Given these well defined and irrefutable principles, it is patent that the Butte County Board of Supervisors was acting within the *692 scope of its constitutional role in undertaking to reduce the size of the Sheriff's staff. While the Sheriff, no doubt along with most heads of governmental offices, would understandably prefer to determine for himself the funding and personnel to be allocated to the agency for which he is responsible, that authority is vested in the Board. The chaos that would result if each agency of government were allowed to dictate to the legislative body the amount of money that should be appropriated to that agency, or its staffing and salary levels, is readily apparent. The budgetary process entails a complex balancing of public needs in many and varied areas with the finite financial resources available for distribution among those demands. It involves interdependent political, social and economic judgments which cannot be left to individual officers acting in isolation; rather, it is, and indeed must be, the responsibility of the legislative body to weigh those needs and set priorities for the utilization of the limited revenues available." (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 699.) We agree.
The court then proceeded to consider the sheriff's contention that the staff reductions rendered him unable to perform the statutorily mandated duties of his office. It distinguished Hicks on the ground that the transfer of investigators there did not occur as part of the budget process, but rather was a reorganization that attempted to transfer control of one officer's statutory function to another. (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 699.) It found no factual basis for the conclusion that the Butte County Board of Supervisors engaged in the type of reorganization condemned in Hicks. (Id., at p. 700.) The court concludes: "The Sheriff has provided neither a factual record, nor legal arguments, which would support a conclusion that there is any possibility of his ultimately prevailing on the merits." (Id., at p. 701.) Accordingly, it held that the trial court erred in issuing a preliminary injunction.
In a case following Hicks and Butte County, the court summarized the distinction between them as follows: "The difference between the Butte County decision and the Hicks decision is that in the former, the county was legitimately concerned with cutting expenses and as part of its normal promulgation of the county budget reduced the appropriations for the sheriff's department. This action was held to be within the legitimate legislative budgetary power, not reviewable judicially. In Hicks, the county directly ordered a transfer of positions from the district attorney's office to another county office. Whether or not this transfer was motivated by cost considerations, it was not effected as part of the normal budgetary process. The Court of Appeal there specifically found the substance of the enactment was to interfere with management of the district attorney's office, and that action was found beyond the county's power." (Beck v. County of Santa Clara (1988) 204 Cal. App.3d 789, 801 [251 Cal. Rptr. 444].)
*693 We agree that Butte County is more analogous to the situation here than Hicks. As Butte County states, "... a court is generally without power to interfere in the budgetary process." (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 698.)
We start from the same position. As we said in Hicks, "[g]enerally, a court is without power to interfere with purely legislative action." (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 235.) However, the legislative power is not unlimited, as the Common Council argues. In Butte County, the court went on to consider whether the case was one of the rare cases in which a court imposed limits on the budgetary actions of the board of supervisors. (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 699.) It found that it was not such a rare case because the sheriff had failed to prove that the county supervisors, in passing the budget, had engaged in the type of reorganization condemned in Hicks. (Id., at p. 700.)
Here, relying on Butte County, the Common Council not only contends that the general rule applies, but it also argues that there are no exceptions. That is, it argues that "even a budget action which totally eliminated [the city attorney's] function would, if taken within the constraints of [the Common Council's] constitutional authority, be proper." As noted in footnote 4 above, we reject that extreme position. It is not uncommon for courts to review budgetary or other legislative decisions to determine if they are within the authority of the legislative body making them. (McAlpine v. Baumgartner (1937) 10 Cal.2d 409 [74 P.2d 753] [retirement fund contributions]; Board of Supervisors v. Superior Court (1995) 33 Cal. App.4th 1724, 1744 [39 Cal. Rptr.2d 906] [jail funding: "On a different record, however, where a board of supervisors has clearly failed to provide enough funding to enable the sheriff to carry out his duties, a contempt finding might be appropriate."]; City of Glendale v. Haak (1944) 62 Cal. App.2d 426 [144 P.2d 866] [library fund appropriation]; see also, Berkeley High School Dist. v. Coit (1936) 7 Cal.2d 132, 137-138 [59 P.2d 992] [tax anticipation notes], citing Nickerson v. San Bernardino (1918) 179 Cal. 518, 522 [177 P. 465] [purchase of hospital site]; Municipal Court v. Bloodgood (1982) 137 Cal. App.3d 29 [186 Cal. Rptr. 807] [trial courts hiring of counsel not a budgetary action]; Younger v. Board of Supervisors (1979) 93 Cal. App.3d 864 [155 Cal. Rptr. 921] [county term limits]; Brandt v. Board of Supervisors (1978) 84 Cal. App.3d 598 [147 Cal. Rptr. 468] [jail funding]; Younger v. Berkeley City Council (1975) 45 Cal. App.3d 825 [119 Cal. Rptr. 830] [disclosure of state crime reports]; 15 McQuillin, Law of Municipal Corporations (3d rev. ed. 1995) § 39.66, pp. 230-231; 16 C.J.S., Const. Law, §§ 113, 191, pp. 377-380, 594-598.)
(3) Thus, there is a limited role for the judiciary to play in determining whether a legislative enactment, including a budgetary enactment, is within *694 the authority of the legislative body and whether it violates any constitutional provisions. In other words, the general rule of judicial review applies to budgetary resolutions: "`A municipal ordinance must consist with the general powers and purposes of the corporation, must harmonize with the general laws of the state, the municipal charter, and the principles of the common law....'" (Ferran v. City of Palo Alto (1942) 50 Cal. App.2d 374, 378 [122 P.2d 965]; City of Los Angeles v. Tannahill (1951) 105 Cal. App.2d 541, 546 [233 P.2d 671].)
(4) We thus proceed to decide if this is one of those rare cases in which judicial interference with the legislative process is justified. The trial court so found, relying on its factual finding that the budget cuts materially impaired the city attorney in the performance of his prosecutorial duties.
The trial court's factual finding is supported by evidence which supports the city attorney's contention that investigators are absolutely necessary for the performance of the city attorney's function as defined in the City Charter. The evidence included declarations which detailed the job duties of the investigators, and their work in pending civil, criminal and administrative cases. As we stated in Hicks: "Investigation and the gathering of evidence relating to criminal offenses is a responsibility which is inseparable from the district attorney's prosecutorial function. That the district attorney is charged with the duty of investigating as well as prosecuting criminal activity has been recognized by an unbroken line of California cases." (Hicks v. Board of Supervisors, supra, 69 Cal. App.3d 228, 241.) Similarly, "[p]ublic prosecutors are frequently involved in the conduct of investigations, including the creation of investigative plans, the supervision of investigative personnel, the execution of search warrants, as well as the interview of witnesses. The investigation of criminal and criminal-related conduct constitutes an inherent aspect of prosecution...." (75 Ops.Cal.Atty.Gen. 223, 227 (1992).)
The investigator's work, as defined in City Charter section 55, subdivision (d), also includes investigation of alleged ongoing violations of the state Political Reform Act. (Gov. Code, § 91001.5.) The city attorney alleged that "[i]t is my belief that the Common Council's action to eliminate the Investigators' positions is in retaliation for this office's investigation into allegations of Political Reform Act violations [by certain councilmen] as reported to the Council on May 16, 1994, and an effort to prevent any further such investigation in the future." One councilperson agreed. Here, the city attorney argues that he cannot act with independence in investigating alleged violations of the Political Reform Act if the subjects of his investigation (four members of the Common Council) have the power to eliminate *695 his capacity to investigate them by simply refusing to fund investigator positions.
To summarize, the city attorney here makes the same contention as the sheriff did in Butte County: the budgetary actions rendered him unable to perform his statutory functions. In Butte County, the contention was rejected because the sheriff failed to make an adequate factual showing that it was true. (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 700.) Here, the city attorney made a factual showing that was found to be true by the trial court.[6]
The issue thus becomes whether the trial court could set aside a budget decision of the Common Council on a factual finding that the budget decision prevented the performance of the city attorney's duties as enumerated in the City Charter.[7] Put differently, the question is whether the Common Council's budgetary decision was an action in excess of its jurisdiction because the Common Council lacked authority to eliminate a mandatory function prescribed by the City Charter.
The Common Council's authority is limited by the City Charter. (City Charter, § 1.) "[I]t is well settled that a charter city may not act in conflict with its charter. [Citations.] Any act that is violative of or not in compliance with the charter is void." (Domar Electric, Inc. v. City of Los Angeles (1994) 9 Cal.4th 161, 171 [36 Cal. Rptr.2d 521, 885 P.2d 934].) "[T]he city council cannot relieve a charter officer of the city from the duties devolving upon him by the charter.... It follows, then, that the action of the city council in appointing a special prosecutor whose duty it should be to prosecute criminal violations of ordinances was unauthorized and void...." (Dadmun v. City of San Diego (1908) 9 Cal. App. 549, 551 [99 P. 983].)
*696 With regard to financial matters, section 130 of the City Charter provides: "... the City Clerk shall transmit to the Mayor and Common Council, accompanied with the estimates and reports of each department an estimate of the probable financial necessities of the City Government for the fiscal year, stating the amount required to meet the interest and principal on all bonded or funded indebtedness of the City, together with the amount needed for the salaries and probable wants of all the departments of the Municipal Government in detail, showing specifically the necessities of each fund in the treasury. Such estimate shall also show what amount of income and revenue will probably be collected from fines, licenses and other sources of revenue, exclusive of taxes upon property, and what amount will probably be required to be levied and raised by taxation in order to meet the necessities of each specific fund for such fiscal year." The budget process is not otherwise specified, and there are no provisions dealing with cutbacks in the amount of "probable financial necessities." (See generally, 15 McQuillin, Law of Municipal Corporations, supra, §§ 39.39, 39.61, 39.65, 39.66, pp. 147-149, 213, 224-225, 230-231.)
Section 70 of the City Charter states the duties of the treasurer: "The Treasurer shall receive and pay out all moneys belonging to the City, and shall keep an account of all receipts and expenditures, under such rules and regulations as may be prescribed. He shall make a monthly statement to the Mayor and Common Council of the receipts and expenditures of the preceding month, and shall perform all duties required of him by law and the Mayor and the Common Council. He shall not pay out any monies belonging to the City except on claims presented, allowed and submitted in the manner provided by this Charter."[8]
The City Charter thus does not contain any provisions specifying the manner in which the Common Council must allocate city revenues in the budgetary process. In the absence of any charter provisions specifying the manner in which the Common Council may reduce or eliminate the "salaries and probable wants" of a city department (City Charter, § 130), or any provisions allowing its power to prescribe the number and compensation of employees (City Charter, § 242) to take precedence over the provisions specifying the duties of the city attorney (City Charter, § 55, subd. (d)), we conclude that the Common Council cannot use the budgetary process to *697 eliminate functions otherwise specified in the City Charter.[9] Since the Common Council was attempting to eliminate functions mandated in the City Charter before eliminating functions not mandated in the City Charter, the trial court was justified in finding that it exceeded its legislative authority.
State law also limits the appropriation of funds by a city. Government Code section 37200 provides that "[i]f a legislative body adopts an annual budget, the budget document shall include the appropriations limit and the total annual appropriations subject to limitation as determined pursuant to Division 9 (commencing with Section 7900) of Title 1." Government Code section 7900 et seq. provides for expenditure limitations to implement article XIII B of the California Constitution. However, it does not state how the appropriations limits are to be carried out, i.e., it does not address the question of whether a city may eliminate mandated functions in order to comply with expenditure limits. (Cf. Board of Supervisors v. Superior Court, supra, 33 Cal. App.4th 1724, 1744.) Accordingly, the state expenditure limitations provide spending limits, but do not purport to direct the method selected by the city to comply with the limits.[10]
In the present economic climate, state, county and local governments are facing an unprecedented restriction of funds and they are constantly required to allocate scarce funds among competing government needs. The budget process is obviously an allocation process, and it is obviously a legislative process. However, in making allocation decisions, the legislative body cannot act in excess of its authority by first eliminating mandatory government functions, such as the investigative function of the city attorney in this case.[11]
*698 The general rule that the courts may not interfere with the legislative process must therefore yield to the exception that such interference is authorized when the trial court makes a factual finding that the budget cuts eliminate the ability of the government official to perform his mandated duties.
Since the trial court found that the actions taken by the Common Council eliminated the ability of the city attorney to carry out his duties, as prescribed by the City Charter, and since there is substantial evidence to support the trial court's determination, the trial court did not err in granting judgment for plaintiffs, and issuing the peremptory writ of mandate.

DISPOSITION
The judgment is affirmed.
Richli, J., and McDaniel, J.,[*] concurred.
NOTES
[1]  By our order filed August 14, 1995, we granted respondents' request that we take judicial notice of the City Charter.
[2]  City Charter section 55, subdivision (d) reads as follows: "The City Attorney shall be the chief legal officer of the City; he or she shall represent and advise the Mayor and Common Council and all City officers in all matters of law pertaining to their offices; he or she shall represent and appear for the City in all legal actions brought by or against the City, and prosecute violations of City ordinances, and may prosecute violations of state law which are misdemeanors or infractions and for which the City Attorney is specifically granted the power of enforcement by state law without approval of the District Attorney, or those violations which are drug or vice related; he or she shall also act and appear as attorney for any City officer or employee who is a party to any legal action in his or her official capacity; he or she shall attend meetings of the City Council, draft proposed ordinances and resolutions, give his or her advice or opinion in writing when requested to do so in writing by the Mayor or Common Council or other City official upon any matter pertaining to municipal affairs; and otherwise to do and perform all services incident to his or her position and required by statute, this Charter or general law."
[3]  Respondents do not answer the latter argument, pointing out that attorney fees were not awarded in the judgment. While the trial court made a finding that this was a case of public interest and significant public benefit within the meaning of Code of Civil Procedure section 1021.5, no attorney fees were awarded in the judgment. Accordingly, we need not consider the issue further.
[4]  We therefore reject the Common Council's contention that "a budget action would not be subject to challenge even if some functions were to be completely omitted." As discussed below, the Common Council does not have unfettered discretion in the budgetary allocation of scarce resources. For example, it clearly could not eliminate all attorneys, employees and appropriations for the city attorney's office. (Cf. 69 Ops.Cal.Atty.Gen. 25, 28 (1986) and cases cited therein: "[A] city council is required to provide for appropriate quarters and such help and equipment as is essential for the effective functioning of the office in question.")

The question here is whether the Common Council can take the lesser action of eliminating two investigators when the trial court has found that such elimination prevents the city attorney from performing his functions under the City Charter.
[5]  There is evidence in the record here which would support a conclusion that the Common Council intended to transfer the investigative functions to the office of code enforcement, in possible violation of Hicks. However, the trial court made no findings in this regard, and we do not consider the issue.
[6]  Another distinguishing factor is the fact that, in Butte County, there was no evidence that the board's actions were motivated by anything other than legitimate fiscal concerns. (County of Butte v. Superior Court, supra, 176 Cal. App.3d 693, 700.) Here, the city attorney alleged that the four council members were acting in retaliation for his investigation of them for Political Reform Act violations. The trial court, relying on the general rule that the motives of the legislators is irrelevant, considered the issue to be an issue of the power of the council to take the actions it did. We agree, and therefore do not consider the alleged motives of the legislators. (Stubblefield Construction Co. v. City of San Bernardino (1995) 32 Cal. App.4th 687, 714 [38 Cal. Rptr.2d 413].)
[7]  We emphasize that there was ample evidence in the record to support a contrary factual finding. For example, the Common Council argues that the city attorney failed to show that there was no other means by which the investigative duties of the city attorney could be performed, e.g., by contracting for outside investigative services or by using police department investigators. However, the trial court resolved the factual issue adversely to the Common Council, there was substantial evidence to support its decision, and we are therefore bound by it.
[8]  The Charter also provides that the legislative power of the city is vested in the Common Council (City Charter, § 30) and that the mayor and Common Council may prescribe the number of employees employed in the city attorney's office, and they may set their compensation. (City Charter, § 242.) The duties of the city attorney are also specifically defined, as quoted in footnote 2, ante (City Charter, § 55, subd. (d).)
[9]  Although not raised by the parties, the power to specify employees by position within the city attorney's department may conflict with the city attorney's ability to allocate funds within his department as he sees fit. (Cf. Connolly v. County of Orange (1992) 1 Cal.4th 1105, 1113, fn. 9 [824 P.2d 663, 4 Cal. Rptr.2d 857]; 77 Ops.Cal.Atty.Gen. 82 (1994).)
[10]  State law restricts counties by providing that the county officials are limited in the incurring or paying of obligations to budgeted amounts. (Gov. Code, § 29120.) The comparable provisions applicable to cities do not contain such a restriction. (Gov. Code, § 37200 et seq.) State law also provides that the power of the board of supervisors to supervise county officers "shall not be construed to affect the independent and constitutionally and statutorily designated investigative and prosecutorial functions of the sheriff and district attorney of a county. The board of supervisors shall not obstruct the investigative function of the sheriff of the county nor shall it obstruct the investigative and prosecutorial function of the district attorney of a county. [¶] Nothing contained herein shall be construed to limit the budgetary authority of the board of supervisors over the district attorney or sheriff." (Gov. Code, § 25303.)
[11]  To continue our previous analogy, muscle and fat must be cut before reaching bone. We note that the elimination of the two investigator positions, if implemented, would save the city $130,000, which is .2 percent of its $74 million budget. Overall, the city attorney's budget was cut 15.2 percent. There were no other layoffs in other city departments.
[*]   Retired Associate Justice of the Court of Appeal, Fourth District, sitting under assignment by the Chairperson of the Judicial Council.
