
105 Cal.App.3d 282 (1980)
164 Cal. Rptr. 323
J. ALEX COTA, Plaintiff and Appellant,
v.
COUNTY OF LOS ANGELES et al., Defendants and Respondents.
Docket No. 54486.
Court of Appeals of California, Second District, Division One.
April 30, 1980.
*285 COUNSEL
J. Alex Cota, in pro. per., for Plaintiff and Appellant.
John H. Larson, County Counsel, and Paul T. Hanson, Deputy County Counsel, for Defendants and Respondents.
OPINION
LILLIE, Acting P.J.
J. Alex Cota and other taxpayers sued County of Los Angeles and members of the board of supervisors (board) to enjoin alleged illegal and wasteful expenditure of public funds (Code Civ. Proc., § 526a) for reconstruction of Sylmar Juvenile Hall after its destruction in the 1971 earthquake, and for a declaration of invalidity of such public expenditure (Code Civ. Proc., § 863).[1] Judgment was entered denying declarations and denying injunction under Code of Civil Procedure, section 526a. Only Cota appeals (in propria persona) from the judgment.
Respondents moved this court to dismiss the appeal as moot on asserted grounds that the construction contract has been completed and accepted by the board, the contract price has been paid and the facility is "operational." For reasons hereinafter set forth, principally that the public interest compels determination of the validity of respondent's action, and judicial policy favors review of the matter on the merits we conclude that the appeal should not be dismissed as moot.
In February 1971 the county owned improved real property referred to as Sylmar Juvenile Hall, at 15900 Filbert Street in Sylmar, 28.3 miles from the Los Angeles civic center. On February 9, 1971, an earthquake caused substantial destruction to the facility rendering it uninhabitable and unfit for use.
*286 In May 1976 the board members voted to reconstruct a juvenile hall on the site, and entered into a contract with Robert E. McKee, Inc. therefor. Originally the contract price was $12.45 million. At the time of trial (May 1977), the price was $12,768,972, of which $7,290,359 had been paid.[2]
The site consists of 30 acres on a dead end street, immediately surrounded by railroad tracks, warehouses and a highway. The site is enclosed by a 16-foot security wall. The buildings are constructed so that the rear of the buildings face the security wall, and the front of the buildings face a recreational area. Materials used in the construction were principally in the nature of clay masonry, rather than "cold concrete." There are no "tall buildings;" the buildings block out the security wall; multicolored decorations are used; and it is sought to have the facility appear "campus-like" and yet detain a juvenile in secure detention while protecting him from other detainees.[3] The capacity is 377 persons, including 156 detention beds for boys, 74 detention beds for girls, 40 beds for intensive care, 11 beds for infirmary, and 96 beds for a state-supported intensive treatment program.
Construction of the facility was approved by the presiding judge of the juvenile court (as required by § 850 of the Welf. & Inst. Code, infra). The California Youth Authority (CYA) approved the construction and found that it was in accordance with the minimum standards adopted by the CYA (as required by § 210 [formerly § 509.5] of said code, infra). Those approvals were before the board of supervisors when the members voted to reconstruct the buildings. Cost of the reconstruction to taxpayers will be approximately $17.5 million. The cost of detention per juvenile per day in Los Angeles County is $58.97 in a comparable facility  approximately $21,524 annually.
*287 Plaintiff's complaint was filed on June 29, 1976. Defendant's answer included an affirmative defense that granting of the injunction would cause great hardship to the public. (Defendants also contended that Robert E. McKee, Inc., contractor, was an indispensable party.)
The complaint alleged causes of action for illegal and wasteful expenditure of funds (Code Civ. Proc., § 526a) and for declaration of illegality of such public expenditure (Code Civ. Proc., § 863).[4] At trial, no evidence was presented on the second (§ 863) cause of action (illegality), or on pleaded issues relating to seismic activity at the site or as to minors held under section 601 of the Welfare and Institutions Code being detained with minors held under section 602 of said code.
The trial court excluded certain evidence as to future use of the building ruling under the issues framed by the pleadings that any evidence which would tend to establish future procedures or operations of the juvenile hall, except as they would be necessitated by reason of the building or buildings, their size, design or location, was irrelevant. The court stated that its reason for such ruling was that this was not the proper case to place on trial the entire juvenile justice system in Los Angeles County, and the court should not now pass upon procedures, rules and regulations not yet promulgated by the probation department for operation of Sylmar Juvenile Hall.
At close of trial argument, counsel for plaintiffs moved to amend their complaint to include a claim to enjoin expenditure of public funds for operation and use of Sylmar Juvenile Hall (as distinguished from the plaintiffs' complaint to enjoin construction of the hall). The motion was denied on the grounds that it was untimely and would inject issues previously ruled upon by the court.
Plaintiffs other than Cota objected to proposed findings of fact. The objections in part were granted. Findings made were as follows: The contract between county and McKee was not illegal or void. Entry into the contract by the board was not a manifest abuse of discretion. Expenditures of funds by the board for reconstruction of Sylmar Juvenile Hall was not a manifest abuse of discretion and was not a waste of public funds. Expenditure of funds was not illegal under the federal or state *288 Constitutions, Welfare and Institutions Code, CYA standards for juvenile halls, or any other legal authority. The injunction sought would cause severe harm to defendants and severe harm and hardship to the public. The alleged acts by the board were lawful exercise of public office. CYA found Sylmar Juvenile Hall to be in accord with CYA's standards and approved its reconstruction. CYA standards have no mandatory provision imposing limit on the size of an institution used for detention.[5]
Conclusions of law were that the declarations and the injunctive relief sought, should be denied.
Appellant Cota's briefs, filed in propria persona, state approximately 20 points. In essence, his contentions are that the evidence does not support the findings that the expenditures for reconstruction of the facility were not illegal or a waste of public funds; and that the trial court erred in excluding evidence of future operations of the facility except as such operations were necessitated by reason of the size, design, and location of the buildings.
(1) Preliminarily, we consider respondents' contention that the case is moot. In support of their motion to dismiss on that ground, respondents submitted declarations by two project managers of the construction contract between county and McKee. One declaration states that the construction contract is "about 99% completed as of July 14, 1978," and that the juvenile hall is scheduled to be occupied and fully operational by July 31, 1978. The other declaration (of later date) states that it is "about 99.7% completed as of August 29, 1978," and is scheduled to be fully occupied and operational by September 18, 1978.
Based upon those declarations, respondents assert that the case is moot, citing Bernard v. Weaber (1913) 23 Cal. App. 532 [138 P. 941]. There, the only relief sought was an injunction restraining issuance of bonds. (P. 534; see City of Plymouth v. Superior Court (1970) 8 Cal. App.3d 454, 466 [96 Cal. Rptr. 636].) Bernard has been distinguished where plaintiffs in addition to seeking injunctive relief (restraining collection of assessments) also sought declaratory judgment invalidating *289 the assessments. (City of Plymouth v. Superior Court, 8 Cal. App.3d 454, 466.)
The first cause of action sought injunctive relief (Code Civ. Proc., § 526a) enjoining reconstruction of the facility; the second cause of action sought declarations (Code Civ. Proc., § 863) as to validity of acts of defendants. Also, an issue herein (although not expressly raised by appellant) is whether the trial court abused its discretion in denying plaintiffs' request to amend the complaint.
Respondents argue that since no evidence was presented on the second (§ 863) cause of action, "this appeal is solely from denial of the injunction under C.C.P., § 526a, for waste of public funds."
Although there is a recital in the findings that no evidence was presented as to the "petition" under section 863, the judgment expressly stated that the injunctive relief sought (§ 526a) is denied, and the declarations sought (§ 863) are denied. Cota appealed from the "entire judgment." Moreover, determination of issues of validity of the acts of defendant county and public officers and of asserted wastefulness of public funds in constructing the juvenile hall are matters of substantial public interest. (Eye Dog Foundation v. State Board of Guide Dogs for the Blind (1967) 67 Cal.2d 536, 542 [63 Cal. Rptr. 21, 432 P.2d 717]; County of Madera v. Glendron (1963) 59 Cal.2d 798, 804 [31 Cal. Rptr. 302, 382 P.2d 342, 6 A.L.R.3d 555]; DiGiorgio Fruit Corp. v. Dept. of Employment (1961) 56 Cal.2d 54, 58 [13 Cal. Rptr. 663, 362 P.2d 487].) The policy of the law is to decide appeals on the merits. (Hosford v. Henry (1951) 107 Cal. App.2d 765, 777 [238 P.2d 91) [motion to dismiss appeal on mootness ground denied].) Thus, we deny the motion and consider the appeal on the merits.
In attacking the trial court's findings, appellant argues that reconstruction of the facility is contrary to constitutional and statutory law and is wasteful of tax funds in that smaller, decentralized community-based facilities can better utilize family and school ties and other programs to combat juvenile delinquency than a huge, remotely located facility like Sylmar; that Sylmar, like its predecessor, is an "obsolete, tax-wasting anachronism"; that the "entire history" of juvenile hall expansion is to "build more and larger institutions only to have them immediately overcrowded, ineffective and wasteful of tax funds"; and that the design of Sylmar, its predecessor, and other juvenile halls in *290 the county is basically a "lock-up," disciplinary facility rather than, in the "least restrictive alternative," a "home-like" facility.[6]
Appellant's general attack on the entire juvenile program in the county, past and present, goes far beyond the scope of the issues framed by the pleadings. Those issues were whether construction of this facility was illegal or a waste of funds. We note further that appellant's statement of facts has scant reference to the record before us and sets forth a variety of facts outside the record. The authorities cited by him are not specifically apposite to the issues herein as to legality of the construction or waste of public funds. He cites no authority that design, size, location and manner of construction of a facility of this kind is illegal or constitutes a waste of public funds. His briefs fail to support the validity of his challenge to the trial court's findings.
The trial briefs emphasized City of Ceres v. City of Modesto (1969) 274 Cal. App.2d 545 [79 Cal. Rptr. 168], as to what constitutes waste of public funds under section 526a; and, on the issue of legality, provisions of the Welfare and Institutions Code (§§ 881, 851, 850, 210, 209, 202), federal and state Constitutions, California Youth Authority standards for juvenile halls, and the Federal Juvenile Justice and Delinquency Prevention Act of 1974. City of Ceres v. City of Modesto, supra, 274 Cal. App.2d 545 stated, as did the subsequent case of Trim, Inc. v. County of Monterey (1978) 86 Cal. App.3d 539, 543 [150 Cal. Rptr. 351], that the term "waste" as used in section 526a means more than an alleged mistake by public officials in matters involving the exercise of judgment or discretion; although the court must not close its eyes to wasteful, improvident and completely unnecessary spending, it should not attempt to enjoin every expenditure which does not meet with a taxpayer's approval; but a taxpayer complaining of government waste may state a cause of action under section 526a by alleging that funds are being expended for a project with no public benefit and no useful purpose. (Pp. 555-556.) Both City of Ceres and Trim were on appeal from a judgment of dismissal after demurrer was sustained without leave to amend. City of Ceres held that appellant Lacy might have been able to *291 state a cause of action for injunctive relief against Modesto had he been given the opportunity to do so (pp. 555-556). Trim held that the allegations were insufficient to state a cause of action for relief under section 526a (p. 543).
Section 881, Welfare and Institutions Code provides in pertinent part: "The board of supervisors of any county may, ... establish juvenile homes, ... within ... the county, to which persons made wards of the court on the ground of fitting the description in Section 602 may be committed...."[7] Section 850 provides: "The board of supervisors ... shall provide and maintain, ... in a location approved by ... the presiding judge of the juvenile court, a suitable house or place for the detention of wards.... Such house or place shall be known as the `juvenile hall' of the county...." Section 851: "The juvenile hall shall not be in, or connected with, any jail or prison, and shall not be deemed to be nor be treated as a penal institution. It shall be conducted in all respects as nearly like a home as possible."
Section 210, Welfare and Institutions Code provides: "The Youth Authority shall adopt minimum standards for the operation and maintenance of juvenile halls for the confinement of minors...." Under section 209 a judge of the juvenile court shall inspect facilities annually and note in the minutes "whether the jail, juvenile hall, or lockup is a suitable place for confinement of minors." It provides further for similar inspection by the Youth Authority. Section 202 states purposes of the Juvenile Court Law (§ 200 et seq.), including purposes "(a) ... to protect the public from criminal conduct by minors; to impose on the minor a sense of responsibility for his own acts; ... to secure for him custody, care, and discipline as nearly as possible equivalent to that which should have been given by his parents ...."; and "(b) ... protection of the public from the consequences of criminal activity, ..."
(2), (3) The instant case (as distinguished from City of Ceres and Trim decided on demurrer) proceeded to trial, and the court found that expenditure of funds for reconstruction of the juvenile hall was not a waste of public funds and was not illegal under the above cited sections of the Welfare and Institutions Code, the federal or state Constitutions, *292 CYA standards, the Federal Juvenile Justice and Delinquency Prevention Act of 1974, or any other legal authority. Substantial evidence supports those findings.[8]
Furthermore, even were we to assume that plaintiff might properly claim a right to injunctive relief on the ground of waste or illegality, such relief can be denied where it would cause severe harm to the public. (See Ukhtomski v. Tioga Mutual Water Co. (1936) 12 Cal. App.2d 726, 728-729 [55 P.2d 1251].) Even as between private parties, a court should consider the relative hardship of the parties and balance the equities in deciding whether to issue an injunction halting construction of the magnitude herein. (See Transcentury Properties, Inc. v. State of California (1974) 41 Cal. App.3d 835, 843 [116 Cal. Rptr. 487]; Baglione v. Leue (1958) 160 Cal. App.2d 731, 735 [325 P.2d 471]; Rest.2d Torts, § 941, p. 580 et seq.) Where injury would result to the public, an additional reason arises for refusal to grant injunctive relief. (Ukhtomski v. Tioga Mutual Water Co., supra, 12 Cal. App.2d, p. 729; see Brown Derby Hollywood Corp. v. Hatton (1964) 61 Cal.2d 855, 859 [40 Cal. Rptr. 848, 395 P.2d 896]; Keith v. Superior Court (1972) 26 Cal. App.3d 521, 525 [103 Cal. Rptr. 314].)
Here, not only are defendants public agencies, but there was evidence that approximately $7 million was paid by defendants to McKee (contractor) for construction as of the time of trial ($12,412,664.70 as of Aug. 29, 1978). If construction had been stopped prior to completion, the claims by McKee could have been greater than the cost of completion; and subcontractors were bound to their contracts only until December 31, 1977. The trial court found that the injunction sought by plaintiffs would cause "severe harm to defendants and severe harm and hardship to the public." The evidence supports the findings. That damages might not have been compensable to plaintiffs upon denial of injunctive relief did not preclude the trial court from exercising its discretion in balancing the equities of relative hardship where there was evidence of severe harm and hardship to the public.
*293 By reason of the foregoing conclusions as to denial of injunctive relief, it is unnecessary to discuss respondents' contention that McKee was an indispensable party.[9]
(4) The trial court excluded as irrelevant, evidence tending to establish future procedures or operations of the facility, except as such procedures or operations might be directly necessitated by reason of the building, its size, location, and physical factors. Cota contends that the court erred in excluding evidence of future use of the juvenile hall.
Evidence which is not pertinent to the issues raised by the pleadings is immaterial, and it is error to allow introduction of such evidence. (Rainer v. Community Memorial Hosp. (1971) 18 Cal. App.3d 240, 253 [95 Cal. Rptr. 901].) Here, the complaint sought injunction only against construction of the facility  it did not seek injunction against future operation or use of the facility. Obviously, the evidence of future use and operation was beyond the scope of the issues raised by the pleadings. (5) Plaintiffs belatedly recognized this when at the close of the lengthy trial they moved to amend the complaint to include request for injunction against use and operation when the facility is completed. The motion was denied on the grounds that it was "untimely made" and sought to inject into the complaint issues ruled on by the court in a preliminary ruling. Granting of the motion would have been prejudicial to defendants, inasmuch as they were not prepared to defend against such evidence. Denial of the motion, on the other hand, was not prejudicial to plaintiffs, inasmuch as the facility was not operational at that time, and plaintiffs can bring action on asserted use and operation now that the facility has become operational. The court did not abuse its discretion in denying the belated motion to amend the complaint.
Just prior to oral argument before this court, Cota submitted a lengthy letter brief advising that a union local of probation officers recently has brought suit against the county seeking to enjoin transfer of probation officers from field positions to juvenile halls. He asserts that *294 "It is quite apparent from the numerous declarations submitted by probation officers in that case that the county is in violation of law in constructing juvenile halls like Sylmar, Central and Los Padrinos," and thereby launches still another general attack on the county juvenile program and the manner of operating the facilities, matters not properly within the scope of this appeal. Because our review is only to those matters before the trial court and these declarations are not part of the record, nor could they be inasmuch as they are allegedly part of a case filed subsequent to the trial, we reject Cota's request that we take judicial notice of the declarations.
In oral argument Cota asserted the illegality of current and future operating procedures of Sylmar, of certain conditions now existing in the facility, i.e., lack of individual plumbing in some locked rooms, cement bunks, no pay telephones, the remote location of Sylmar and the transfer of juveniles from unit to unit, and of various aspects of the juvenile justice system. Nor were these matters before the trial court in the context of operating procedures.
At the time of trial Sylmar was not in operation and no operating rules and regulations had been promulgated. Whatever testimony relative to operational problems was adduced at trial was purely conjectural and referred solely to the specifications and plans for the construction contract. In light of these issues before the trial court of the capacity and nature of Sylmar and the detention policies for juveniles in Los Angeles County, and the scope of the pleadings seeking prevention of construction of the entire facility (which included courtrooms, classrooms, gym, pool, kitchen, medical facility, chapel and living spaces for the wards) and complete cessation of payments under the construction contract, Cota's argument before this court based on the inadequacy and/or illegality of the operational procedures of the facility was not and could not be material. No issues relative to bathroom facilities and cement beds were raised and no evidence was admitted thereon at trial except insofar as they related to the plans and specifications for the construction of the facility.
On the issues before the trial court, any evidence that tended to establish future procedures or operations of juvenile hall by the probation department except insofar as they would be necessitated by reason of the buildings, and their site, size, capacity, design and/or location, was deemed irrelevant. The trial court felt that this was not the case to *295 place on trial the entire juvenile justice system or to pass on procedural rules and regulations of the probation department for the operation of Sylmar not yet in existence. But whatever evidence there was relating to toilet facilities and cement beds consisted also of the court's observations at the site. In the court's announcement of intended decision, an extensive and well reasoned document, the judge concluded that "The principal problem with part of plaintiffs' position is they desire the optimum of conditions, i.e., telephones, private baths, no regimentation, no noise  almost a country club atmosphere; not just as nearly like a home as possible  without regard to the costs entailed or the realities of the situation. This detracts from their principal position."[10] Although the issues, the evidence, the announcement of intended decision, the findings and plaintiffs' proposed counterfindings demonstrate the minor significance at trial of those matters relating to lack of individual plumbing in some bedrooms and the concrete beds, all of which was clearly reflected in the plans and specifications for the construction contract, they took on major significance for Mr. Cota in oral argument before this court even though 95 percent of the trial focused on the capacity of Sylmar and the detention policies for juveniles; no injunction to compel the installation of plumbing on an individual basis or the use of metal beds was requested in the pleadings. Although the bulk of the matters urged on appeal by Mr. Cota in his appellate briefs, letters and oral argument are evidentiary in nature relating to operating procedure not before the trial court and not within the issues, he is not without appropriate legal remedy for asserted unlawful operating procedures now that the facility is in operation.
*296 Each party requests award of costs on appeal  Cota on the ground that this case is a matter of great public interest; respondents on the grounds that the case has been moot since completion of the construction and that Cota has just "rehashed" arguments made at the trial level and added superfluous, irrelevant matter that was not before the trial court.
The trial court ordered the parties to bear their own costs. We too order that each party shall bear its own costs.
The judgment is affirmed.
Hanson (Thaxton), J., and Marshall, J.,[*] concurred.
A petition for a rehearing was denied May 29, 1980, and appellant's petition for a hearing by the Supreme Court was denied July 9, 1980.
NOTES
[1]  Section 526a provides: "An action to obtain a judgment restraining and preventing any illegal expenditure of, waste of, or injury to, the estate, funds, or other property of a county, ... may be maintained against any officer thereof, ... either by a citizen resident therein, or by a corporation, who is assessed for and is liable to pay, or, within one year before the commencement of the action, has paid, a tax therein...."

Section 863 provides: "If no proceedings have been brought by the public agency pursuant to this chapter [Chapter 9, Validation Proceedings], any interested person may bring an action ... to determine the validity of such matter. The public agency shall be a defendant...."
[2]  A declaration submitted by respondents in support of their motion to dismiss the appeal states that the construction contract was 99.7 percent completed as of August 29, 1978, and $12,412,664.70 had been paid to McKee as of that date.
[3]  Several witnesses, including representatives of the probation department and the California Youth Authority, testified regarding the construction. Also, the court personally inspected the site. In its announcement of intended decision, the court stated that no one who viewed the facility from the recreation areas could help but be awed by the size of the facility; that because the 30-acre site was available, it was to be used; if it was to be used at all, it had to be used in its entirety, hence the maximum utilization of the 30 acres; and if it were a private school, it could be visualized as in a "pastoral or country setting." with views to the mountains on two sides.
[4]  It was stipulated that plaintiffs were taxpayers and had standing to bring this suit.
[5]  A contention of plaintiffs was that the county should construct several small facilities in various communities, rather than one large facility in Sylmar.
[6]  Appellant also asserts that the board of supervisors improperly voted to rebuild Sylmar. Public policy to rebuild the facility was a matter for that legislative body. The record herein (including papers filed by plaintiffs in their application for preliminary injunction) shows extensive consideration of policy by the members of the board of supervisors before their vote approving the construction, and active participation in those proceedings by interested citizenry, including Cota himself.
[7]  Prior to the 1976 amendment, section 881 applied to wards fitting the description in sections 601 and 602. In the instant case, as the court found, no evidence was presented that minors held under section 601 would be detained with minors held under section 602.
[8]  In the trial court, plaintiffs asserted (as does Cota on appeal) the constitutional principle of "least restrictive alternative: that persons who are incarcerated are entitled to have their liberty restricted only to the extent necessary to secure the government's goal; and that the size, design, and location of the juvenile hall would be an unnecessary restriction of liberty of the detainees. The trial court's written announcement of decision discussed that principle along with the detention aspects of the above cited provisions of the Welfare and Institutions Code.
[9]  The trial court, by reason of its findings and conclusions, did not reach the asserted issue whether McKee was an indispensable party. Respondents claim that McKee was an indispensable party under section 389 of the Code of Civil Procedure, and that McKee's absence was a jurisdictional defect. Respondents assert that statements in Kraus v. Willow Park Public Golf Course (1977) 73 Cal. App.3d 354, 364 et seq. [140 Cal. Rptr. 744], that failure to join an indispensable party is not a jurisdictional defect in the fundamental sense are "dicta."
[10]  In the announcement of intended decision, the judge characterized plaintiffs' assertion that use by juveniles of central toilet and shower facilities is dehumanizing as "absurd," comparing them with the group shower facilities in public school gym facilities and private clubs. The plaintiffs complained that individual rooms have no light switches; but the evidence established and the judge found that safety and other factors warrant this design feature. They also complained that individual rooms have concrete beds; but the evidence established that the concrete beds are designed to support mattresses which will be used, and the maintenance factor alone (where the evidence establishes that minors urinate on the beds causing metal to rust, they dismantle them to make weapons or break them up in acts of vandalism) warrants construction of the design and materials utilized. So too the court was not impressed with plaintiffs' assertion that minors foul their rooms because they have no individual toilet facilities and the probation officer does not respond in time to their knock, and commented that the evidence establishes that some minors urinate and defecate in their rooms more out of defiance of authority than as a matter of necessity. Finally, the court said the evidence shows that the California Youth Authority found Sylmar to be in accord with its minimum standards adopted by California Youth Authority in 1973, and approved its reconstruction; this included the toilet facilities and beds described in the plans and specifications.
[*]   Assigned by the Chairperson of the Judicial Council.
