[675]*675Opinion
SULLIVAN, J,
This is an appeal from a judgment awarding plaintiff Kathleen Tripp retroactive payment of welfare benefits with attorneys’ fees and prejudgmerit interest.
On July 25, 1972, plaintiff presented an application for benefits under the aid to the needy disabled program (ATD)1 based on a disabling injuiy to her back sustained in 1970. The ATD review team initially denied plaintiff benefits on the ground that she had not established the requisite permanent disability on which such benefits were conditioned. After a hearing to review the denial the hearing officer found that plaintiff was eligible for Group II benefits. These benefits were available to an applicant whose impairments were reasonably expected to continue throughout the applicant’s lifetime, but might improve at some future, undetermined date and therefore were subject to periodic review. Despite the hearing officer’s finding, on August 28, 1973, defendant Director of the State Department of Social Welfare (hereafter Director and DSW)2 denied plaintiff’s claim on the ground that her impairments were not permanent in that they would improve with time or medical treatment and therefore did not appear reasonably certain to continue for the duration of her life.
Plaintiff commenced the instant proceedings in administrative mandamus to challenge the Director’s determination of her ineligibility. The trial court determined that there was substantial evidence to support a finding that plaintiff’s disability was permanent, and that there was no substantial evidence that her condition would improve.3 The court entered judgment accordingly ordering the issuance of a peremptory writ of mandate directing defendaht to set aside his decision of August 28, 1973, in the underlying administrative proceeding and to pay plaintiff benefits retroactively from July 25, 1972, with attorney’s fees and interest [676]*676at the legal rate. The writ issued forthwith. This appeal by the Director followed.
We agree at the outset with the trial court’s conclusion that the Director’s decision denying benefits to plaintiff must be set aside as not supported by substantial evidence. Under the substantial evidence test it was the duty of the trial court to review defendant’s decision in light of the entire administrative record. Our task is defined by the same standard of review. (Bixby v. Pierno (1971) 4 Cal.3d 130, 149 [93 Cal.Rptr. 234, 481 P.2d 242]; Merrill v. Department of Motor Vehicles (1969) 71 Cal.2d 907, 915-916 [80 Cal.Rptr. 89, 458 P.2d 33].)
Defendant denied plaintiff’s claim for benefits on the ground that her impairments would improve. However, the only evidence adduced by defendant to support his finding was a report by plaintiff’s physician made one month after she underwent surgery. In his report the doctor noted that the prognosis was “fair” but that a final prognosis could not be rendered for another year, and further noted that plaintiff’s functional limitations were “temporary.” On the other hand, the remaining evidence disclosed that five months after her surgery plaintiff was required to wear a back brace to stand; that in her doctor’s opinion she would never return to her prior work and would probably require additional surgery; that she still suffered from dizziness and had difficulty speaking; that her doctor had diagnosed deterioration of the spine; that after a short period of improvement following her operation, she began hemorrhaging in her back; and that her condition was becoming progressively worse.
On the basis of the above facts, the trial court properly concluded that there was substantial evidence that plaintiff’s impairments were sufficiently permanent to entitle her to ATD benefits subject to periodic review. Considered in the light of the entire record, the report made by plaintiff’s doctor one month after her surgery did not constitute substantial evidence to support defendant’s decision denying plaintiff benefits. Accordingly, the trial court did not commit error in ordering the decision to be set aside.
We reject as devoid of merit the Director’s related contention that the trial court did not in fact apply the “substantial evidence test” in reversing the Director’s decision. Defendant argues that the trial court reweighed the evidence and exercised its independent judgment in reviewing the administrative record. It is urged that this is manifest in the [677]*677trial court’s memorandum decision where after summarizing the evidence, the court stated that “it is apparent that a preponderance of evidence pointed to the conclusions of the referee that the disability was indeed permanent.” Defendant complains that at least the court alternatively used the “independent judgment” test and the “substantial evidence” test to overturn his decision. We do not agree. At the very beginning of the memorandum decision and immediately preceding the above summary of evidence, it is clearly and explicitly stated that “The trial court’s review of this decision is confined to the issue of whether or not there was substantial evidence to support the [Director’s] decision.” Again at the end of the decision the court concluded: “Thus, it is apparent from the evidence there were substantial facts to support a finding of permanence, and no substantial evidence to find that petitioner ‘will improve.’ ” We are satisfied that the trial judge applied the proper scope of review.
We also uphold the trial court’s award of retroactive benefits. Defendant contends that the power to grant aid was vested in the DSW subject to review by the trial court and that consequently although the court could order defendant to pay benefits to plaintiff, it was without power to order such payments to be made retroactively or to fix the date on which payments were to commence. Contrary to the Director’s claim, however, it has been held on a number of occasions over the last 30 years that where the circumstances so warrant, it is within the power of a trial court to order that the payment of benefits be made retroactive. (See, e.g., Bd. of Soc. Welfare v. County of L.A. (1945) 27 Cal.2d 81, 86-89 [162 P.2d 630]; Smock v. Carleson (1975) 47 Cal.App.3d 960, 964 [121 Cal.Rptr. 432]; Leach v. Swoap (1973) 35 Cal.App.3d 685, 689-690 [110 Cal.Rptr. 62]; Mooney v. Pickett (1972) 26 Cal.App.3d 431, 435 [102 Cal.Rptr., 708].)
When in its review of an administrative decision the court enters judgment commanding the respondent to set aside the decision, it “may order respondent to take such further action as is specially enjoined upon it by law but the judgment shall not limit or control in any way the discretion legally vested in the respondent.” (Code Civ. Proc., § 1094.5, subd. (e).) In the instant case, having determined that plaintiff had been wrongfully denied ATD benefits as a matter of law, the trial court merely rendered a judgment ordering defendant to discharge his legal obligation. Inasmuch as an ATD applicant is entitled by statute to benefits as of a particular date once eligibility is established (§ 11056), there was no issue remaining on which the trial court could invade the director’s discretion.
[678]*678Under these circumstances, it is manifest that the trial court acted properly within the scope of its power. We observe, however, that the court erroneously applied July 25, 1972, the date of plaintiff’s' application for benefits, as the effective date of her entitlement to benefits. Under section 11056, plaintiff’s entitlement to benefits commenced on August 1, 1972, as the first day of the month following the date of application. Accordingly, the judgment must be modified to reflect August 1, 1972, as the proper date of commencement of plaintiff’s benefits.
We turn to the issue whether the recipient of wrongfully withheld welfare benefits is entitled to prejudgment interest. Defendant contends that plaintiff is not. entitled to interest because it is not specifically authorized under section 109624 which provides for judicial review of benefit determinations. Plaintiff, on the other hand, contends that section 3287, subdivision (a), of the Civil Code,5 which provides generally for the award of interest on damages, authorizes the interest awarded her by the trial court.6
[679]*679The resolution of this issue thus calls for the statutoiy construction of section 10962 and Civil Code section 3287, subdivision (a). We begin with the fundamental rule that a court “should ascertain the intent of the Legislature so as to effectuate the purpose of the law.” (Select Base Materials v. Board of Equal. (1959) 51 Cal.2d 640, 645 [335 P.2d 672].) In interpreting particular words, phrases, or clauses in a statute, “the entire substance of the statute or that portion relating to the subject under review should be examined in order to determine the scope and purpose of the provision containing such words, phrases, or clauses.” (West Pico Furniture Co. v. Pacific Finance Loans (1970) 2 Cal.3d 594, 608 [86 Cal.Rptr. 793, 469 P.2d 665].) The words in question “ ‘must be construed in context, keeping in mind the nature and obvious purpose of the statute where they appear.’ ” (Moyer v. Workmen’s Comp. Appeals Bd. (1973) 10 Cal.3d 222, 230 [110 Cal.Rptr. 144, 514 P.2d 1224], quoting from Johnstone v. Richardson (1951) 103 Cal.App.2d 41, 46 [229 P.2d 9].)
Where as here two codes are to be construed, they “must be regarded as blending into each other and forming a single statute.” (Armenia v. Churchill (1954) 42 Cal.2d 448, 455 [267 P.2d 303].) Accordingly, they “must be read together and so construed as to give effect, when possible, to all the provisions thereof.” (Pareses v. State Board of Prison Directors (1929) 208 Cal. 353, 355 [281 P. 394].) With these guiding principles in mind, we proceed to an examination of the statutes involved in the instant action.
Section 10962 permits an applicant or recipient of welfare benefits to seek judicial review of an adverse determination by the Director of the DSW.7 Appellate courts have construed section 10962 in part as having as its purpose to ensure that aggrieved recipients have access to the judicial system to establish their statutory rights. (Silberman v. Swoap (1975) 50 Cal.App.3d 568, 571 [123 Cal.Rptr. 456]; Trout v. Carleson (1974) 37 Cal.App.3d 337, 343 [112 Cal.Rptr. 282].) Defendant correctly points out that section 10962 authorizes a recipient to secure judicial [680]*680review without payment of a filing fee, and further authorizes a successful recipient to recover attorney’s fees and costs. However, it does not follow that by enumerating these specific items, the Legislature has evinced an intent to foreclose a recipient from recovering interest on a retroactive benefit award.8
The provisions embodied in section 10962 relating to filing fees, attorney’s fees, and costs ease the financial burden which a recipient seeking judicial review otherwise would encounter. Payment of a filing fee is required generally by statute as a condition to bringing suit. (Code Civ. Proc., § 411.20.)9 Attorney’s fees ordinarily are not recoverable except as provided by statute or agreement of the parties. (Code Civ. Proc., § 1021; see County of Humboldt v. Swoap (1975) 51 Cal.App.3d 442, 444 [124 Cal.Rptr. 510].) Finally, the award of costs to a prevailing applicant in a qiandamus proceeding normally lies within the discretion of the court under Code of Civil Procedure section 1095. (Gould v. Moss (1910) 158 Cal. 548, 549 [111 P. 925]; Oksner v. Superior Court (1964) 229 Cal.App.2d 672, 690 [40 Cal.Rptr. 621]; Ellis v. City Council (1963) 222 Cal.App.2d 490, 500-501 [35 Cal.Rptr. 317]; Kramer v. State Board of Accountancy (1962) 200 Cal.App.2d 163, 177 [19 Cal.Rptr. 226].)
In the absence of the specific provisions in section 10962 relating to filing fees, attorney’s fees, and costs, a needy person unable to bear the cost of bringing suit might be foreclosed from vindicating rights which have been conferred upon him by statute. The Legislature’s inclusion of [681]*681these provisions thus supports the view that the purpose of section 10962 is to ensure access to judicial review, rather than to define the extent of a recipient’s recovery.10 Interest, on the other hand, relates to the extent of recovery inasmuch as it constitutes an element of damages. Under this construction the fact that the Legislature did not mention interest specifically does not mean that a successful recipient is precluded from receiving it. Rather, we must determine whether there is some other authority on which it should be awarded.
Civil Code section 3287, subdivision (a), (see fn. 5 ante) authorizes the recovery of interest on damages which are certain or capable of being made certain by calculation, where the right to recover has vested on a particular day. In Mass v. Board of Education, supra, 61 Cal.2d 612, we construed this statute as providing for prejudgment interest in actions based upon a general underlying monetary obligation, including the obligation of a governmental entity determined by way of mandamus. Since Mass our courts on numerous occasions have awarded prejudgment interest in mandamus proceedings brought to recover sums of money pursuant to a statutory obligation. (City and County of San Francisco v. Cooper (1975) 13 Cal.3d 898, 932 [120 Cal.Rptr. 707, 534 P.2d 403] (San Francisco Ord., No. 152-74); Sanders v. City of Los Angeles (1970) 3 Cal.3d 252, 262-263 [90 Cal.Rptr. 169, 475 P.2d 201] (Los Angeles City Charter, § 425); Squire v. City and County of San Francisco (1970) 12 Cal.App.3d 974, 982 [91 Cal.Rptr. 347] (San Francisco City and County Charter, § 151.3.1); Mullins v. Toothman (1965) 231 Cal.App.2d 756, 769 [42 Cal.Rptr. 254] (Oakland City Charter, § 91b).)
Defendant argues that the award of interest authorized under Civil Code section 3287 is limited to contract actions. and actions sounding in tort. This contention simply is not supported by the cases just cited. In each of them the court was confronted with a claim based on a statutory obligation and did not mention the existence of a contract as underlying plaintiff’s suit.11 In each case the court awarded interest [682]*682pursuant to section 3287 despite the absence of specific statutory authority.
Under section 3287, subdivision (a), as interpreted in Mass, supra, a claimant must satisfy three conditions for the recovery of interest in a mandamus action against the state:12 (1) There must be an underlying monetary obligation; (2) the recovery must b.e certain or capable of being made certain by calculation; and (3) the right to recovery must vest on a particular day.
These three requirements are satisfied in the instant case. First, we observe that the state has a legal obligation to furnish welfare benefits to all persons who meet applicable standards of eligibility. (See Mooney v. Pickett (1971) 4 Cal.3d 669, 676 [94 Cal.Rptr. 279, 483 P.2d 1231].) This obligation becomes a debt due as of the date an applicant is first entitled to receive aid. (Bd. of Soc. Welfare v. County of L.A., supra, 27 Cal.2d 81, 86.) Accordingly, an action to recover wrongfully withheld benefits is an action on an underlying monetary obligation to the same extent as an action to recover back salary under Mass, supra. (See Leach v. Swoap, supra, 35 Cal.App.3d 685, 690.)
Secondly, we observe that the entire scheme of our welfare laws serves to promote certainty as to the amount of benefits payable by setting forth fixed payment schedules. (See, e.g., Cooper v. Swoap (1974) 11 Cal.3d 856, 861-862 [115 Cal.Rptr. 1, 524 P.2d 97]; cert. den. (1974) 419 U.S. 1022 [42 L.Ed.2d 296, 95 S.Ct. 498].) Once an applicant’s entitlement to benefits is established, the calculation of the amount of such benefits becomes a mechanical exercise of applying the appropriate standard of assistance. The recovery of wrongfully withheld benefits thus is not subject to the uncertainty that would otherwise bar an award of interest. (See Lineman v. Schmid (1948) 32 Cal.2d 204, 212 [195 P.2d 408, 4 A.L.R.2d 1380].)
Finally, we note that section 11056 specifically provides that once eligibility has been determined, payment of a recipient’s benefits must [683]*683commence on a particular day. We have made it clear that for purposes of ordering retroactive payments, the right to receive benefits vests in the recipient on the first date of his entitlement. (Bd. of Soc. Welfare v. County of L.A., supra, 27 Cal.2d at p. 86.) For purposes of awarding interest, each payment of benefits similarly should be viewed as vesting on the date it becomes due. (See Mass v. Board of Education, supra, 61 Cal.2d at p. 625.)
In Bd. of Soc. Welfare v. County of L.A., supra, 27 Cal.2d 81, we recognized the strong public policy in favor of retroactive payment of welfare benefits. (Id., at pp. 85-86.) This policy has been articulated as “securing to those entitled to aid the full payment thereof, from the date they were first entitled thereto, regardless of errors and delays by local authorities ....” (Mooney v. Pickett, supra, 26 Cal.App.3d at p. 435.)
The same public policy that favors the award of retroactive benefits would appear to favor the award of prejudgment interest on such benefits. Indeed, we have recognized in the context of an interest award on retroactive salary payments that “[i]f plaintiff had not been wrongfully suspended, he would have obtained the benefit of the moneys paid as of those dates; he has thus lost the natural growth and productivity of the withheld salary in the form of interest.” (Mass v. Board of Education, supra, 61 Cal.2d at p. 625.) The policy rationale behind awarding prejudgment interest articulated in Mass takes on particular significance in the context of wrongfully withheld welfare benefits. In some instances, it may take long periods of time for an applicant to vindicate his entitlement to aid and in the interval the delay inevitably exacts its toll from that portion of our society least able to bear the deprivation.
The dual concept of debt and public policy articulated in Bd. of Soc. Welfare, supra, supplies a strong rationale for the award of prejudgment interest in the case at bench. (See Leach v. Swoap, supra, 35 Cal.App.3d at p. 689.) In the recent case of Luna v. Carleson (1975) 45 Cal.App.3d 670 [119 Cal.Rptr. 711], however, the court held as a matter of first impression that prejudgment interest was not available to the recipient of wrongfully withheld welfare benefits. In a brief opinion the court set forth essentially four grounds for its reversal of the trial court’s award of interest in a proceeding brought under section 10962. We are not persuaded that any of the grounds on which the court relied provide authority for the position which the court adopted.
First, the court appears to have misapplied the general rule that interest cannot be recovered against a state or municipality. While it is [684]*684true that governmental entities traditionally have been immune from liability for interest, Civil Code section 3287 as amended in 1959 provides a clear statutory exception to the general rule, and this exception has been consistently recognized by this court as imposing liability for interest on such entities. (E.g., Sanders v. City of Los Angeles, supra, 3 Cal.3d at p. 262; Benson v. City of Los Angeles, supra, 60 Cal.2d 355, 364.)
Second, the court was of the view that in the face of the provision in section 10962 for attorney’s fees and costs, the Legislature’s failure to include interest was not an inadvertence. The court was unable to find any legislative authorization for the payment of interest in a section 10962 proceeding. However, as we have pointed out above, the fact that the Legislature did not specify interest is not probative on the issue whether it is recoverable under the view that the purpose of section 10962 is to ensure access to judicial review and not to define the extent of recovery. (See Silberman v. Swoap, supra, 50 Cal.App.3d at p. 571.) Moreover, by failing to find any legislative authorization for the payment of interest in a section 10962 proceeding, the court completely ignored the general availability of interest under Civil Code section 3287, subdivision (a). As we have explained, we are satisfied that section 3287, subdivision (a), reaches actions brought to recover sums of money owing as a statutory obligation. In Mass v. Board of Education, supra, 61 Cal.2d 612,. the statute under which we awarded back salary did not provide for the recovery of interest.13 Rather than imply a legislative bar of interest from that fact, we awarded interest pursuant to the general authority of section 3287, subdivision (a). (See also City and County of San Francisco v. Cooper, supra, 13 Cal.3d at p. 932; Sanders v. City of Los Angeles, supra, 3 Cal.3d at pp. 262-263; Squire v. City and County of San Francisco, supra, 12 Cal.App.3d at p. 982; Mullins v. Toothman, supra, 231 Cal.App.2d atp. 769.)
Third, the Luna court observed that of the many cases decided by our appellate courts involving welfare payments, none of them discussed the matter of interest. As the court acknowledged, however, the fact that interest has not been discussed in similar decisions is not the most convincing authority for denying it.
Finally, the court noted that the federal government funds a large share of the welfare payments made by the state and that there is no [685]*685federal statute authorizing reimbursement to the state for interest payments. As amici have pointed out, however, whether federal reimbursement is available is irrelevant to the determination of the issue whether interest is recoverable against the state. The claims of a recipient such as plaintiff are based upon an entitlement to benefits as a matter of state law. (See Bd. of Soc. Welfare v. County of L.A., supra, 27 Cal.2d 81.) The procedure for judicial review of a denial of benefits is a creature of state law under section 10962 and the entitlement to interest is a matter of state policy as articulated in Civil Code section 3287, subdivision (a).
We believe that sound statutory construction of section 10962 reveals no intent on the part of the Legislature to deny prejudgment interest to the recipient of wrongfully withheld welfare benefits. On the other hand, there is clear authority for awarding such interest-pursuant to Civil Code section 3287, subdivision (a). We are further of the view that the award of such interest would be in conformity with the statutory mandate requiring the law relating to public assistance programs to be liberally construed. (§ 11000; see County of Los Angeles v. Frisbie (1942) 19 Cal.2d 634, 644 [122 P.2d 526].)14
Accordingly, we hold that where a recipient of welfare benefits is adjudged entitled to retroactive payment of benefits pursuant to the statutory obligation of the state, such recipient is entitled to an award of prejudgment interest at the legal rate from the time each payment becomes due. To the extent that Luna v. Carleson, supra, 45 Cal.App.3d 670, is inconsistent with the views expressed herein, it is disapproved.
The cause is remanded to the trial court with directions to modify its judgment by directing defendant to pay retroactive aid to plaintiff effective August 1, 1972, instead of July 25, 1972. As modified, the judgment is affirmed. The trial court is further directed to determine a reasonable attorneys’ fee to be awarded to plaintiff’s attorneys for their services on appeal. Plaintiff shall recover costs on appeal.
Wright, C. J., Tobriner, J., Mosk, J., and Richardson, J., concurred.