
117 Cal.Rptr.2d 475 (2002)
96 Cal.App.4th 644
The PEOPLE, Plaintiff and Respondent,
v.
Daniel Lawrence McGARRY, Defendant and Appellant.
No. C037114.
Court of Appeal, Third District.
February 28, 2002.
Jerry D. Whatley, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Jo Graves, Senior Assistant Attorney General, Carlos A. Martinez, Supervising Deputy Attorney General, Tiffany S. Shultz, Deputy Attorney General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]
ROBIE, J.
This case addresses the issue of how to allocate the monetary credit resulting from excess presentence custody credit to a base fine, penalty assessments and a restitution fine. We conclude that the monetary credit must be applied "on a proportional basis" (Pen.Code, § 2900.5, subd. (a) [hereafter, section 2900.5(a)]).[1] In other words, each dollar of monetary credit must be used proportionally to reduce the base fine, penalty assessments and restitution fine rather than any one of these categories alone. Thus, if the monetary *476 credit does not eliminate all amounts due, the defendant still owes the remaining amount in each category.
Here, the trial court erred by applying the monetary credit first to the base fine (in its view, fully satisfying the base fine), applying the rest of the monetary credit to the penalty assessments (in its view, partially satisfying the penalty assessments), and not applying any monetary credit to the restitution fine. However, defendant Daniel Lawrence McGarry still owes the proportional amounts of the base fine, penalty assessments and restitution fine (totaling $2,180) not satisfied by the monetary credit. The trial court also erred by not vacating the conviction for assault (§ 240) since defendant had also been convicted of the greater offense of battery (§ 242). We shall reverse the judgment and remand for resentencing.

FACTUAL AND PROCEDURAL BACKGROUND
A jury found defendant guilty of two misdemeanors, simple assault (§ 240) and simple battery (§ 242), both as lesser included offenses of felony assault by means of force likely to produce great bodily injury. (§ 245, subd. (a)(1), count two.) The trial court imposed the maximum six-month jail term for each offense but stayed the sentence for battery. (§§ 243, subd. (a) [punishment for battery], 241.4 [punishment for assault].)
The court also imposed "the maximum fine the law allows of two thousand dollars" for battery. (§ 243, subd. (a) [$2,000 maximum fine].) The court did not impose a base fine for assault. (§ 241.4 [$1,000 maximum fine].) The court also levied upon the base fine a $2,000 mandatory state penalty assessment (§ 1464, subd. (a) [$10 for every $10]) and a $1,400 mandatory county penalty assessment (Gov.Code, § 76000, subd. (a) [$7 for every $10]). Hence, the penalty assessments totaled $3,400, and the base fine plus penalty assessments equaled $5,400.
The parties stipulated, and the court found, that the total of defendant's presentence actual and good conduct custody credit (§§ 2900.5(a), 4019) exceeded the six-month (180 day) jail term by 114 days. The court calculated defendant's monetary credit based on the excess custody credit at $3,420 (114 days multiplied by the minimum rate of $30 per day). (§ 2900.5(a).)
The court applied the $3,420 monetary credit first to the base fine of $2,000 and the remaining $1,420 toward the $3,400 of penalty assessments. It ordered defendant to pay the $1,980 shortfall ($3,400 minus $1,420). Among other things, the court also ordered defendant to pay a $200 restitution fine (§ 1202.4, subd. (b)(1)), but did not apply any of the credit to the restitution fine. The court granted defendant permission to make installment payments. (§ 1205, subd. (a).)

DISCUSSION

I

The Monetary Credit Was Not Applied Proportionally
Defendant claims that because the trial court applied the first $2,000 of the monetary credit for excess custody to the $2,000 base fine for battery, this "entirely discharged" the base fine. He next contends that "[s]ince penalty assessments are not freestanding and are only applied to fine payments that are collected by the court," the court erred by requiring him to pay penalty assessments of $1,980, the amount exceeding the monetary credit. We disagree. As we shall explain, the court erred in allocating the monetary credit, but even under the correct allocation, defendant must pay the proportional *477 amounts of the base fine, penalty assessments and restitution fine exceeding the $3,420 monetary credit.
Our conclusion rests primarily on section 2900.5(a), which states in pertinent part: "In all felony and misdemeanor convictions ... when the defendant has been in custody, ... all days of custody of the defendant, ... including days credited to the period of confinement pursuant to Section 4019, shall be credited upon his or her term of imprisonment, or credited to any fine on a proportional basis, including, but not limited to, base fines and restitution fines, which may be imposed, at the rate of not less than thirty dollars ($30) per day.... In any case where the court has imposed both a prison or jail term of imprisonment and a fine, any days to be credited to the defendant shall first be applied to the term of imprisonment imposed, and thereafter the remaining days, if any, shall be applied to the fine on a proportional basis, including, but not limited to, base fines and restitution fines." (Italics added.) As we shall explain, this language requires monetary credit to be applied on a proportional basis to penalty assessments because they comprise part of the total fine.
There are several reasons why the terms "any fine" and "the fine" in section 2900.5(a) must be construed to include state and county penalty assessments. First, section 2900.5(a) itself describes these terms as "including, but not limited to, base fines and restitution fines." (Italics added.)
Second, section 1463, subdivision (l), pertaining to the distribution of all fines and forfeitures imposed and collected for crimes, provides: "`Total fine or forfeiture' means the total sum to be collected upon a conviction.... It may include, but is not limited to, the following components as specified for the particular offense: [¶] (1) The `base fine' upon which the state penalty and additional county penalty is calculated. [¶] (2) The `county penalty' required by Section 76000 of the Government Code. [¶] ... [¶] (5) The `state penalty' required by Section 1464."
And third, reading the terms in context, we do not discern a legislative intent to give the term "any fine" in the portion of section 2900.5(a) pertaining to situations involving imprisonment or a fine a broader meaning than the term "the fine" in the part of the statute addressing cases involving imprisonment and a fine. There would be no reason to draw such a distinction. Rather, the same broad meaning should apply in both cases. Hence, the "fine ... including, but not limited to, base fines and restitution fines" referred to in section 2900.5(a) also encompasses state and county penalty assessments.
An examination of the myriad statutes pertaining to fines, penalties, forfeitures, and penalty assessments shows that various governmental entities receive a portion of the total fine. Section 2900.5(a) ensures the equitable allocation of a defendant's actual cash payments. Section 2900.5(a) evinces a legislative policy that it is better for each entity to be paid in part than to have some entities paid in full and other entities not paid at all. We next show how section 2900.5(a) operates in this case; some arithmetic is required:
1. First, the trial court should have determined the amount of the total fine. Adding up the base fine ($2,000), state penalty assessment ($2,000), county penalty assessment ($1,400), and restitution fine ($200) imposed by the trial court results in a total fine of $5,600.
2. Next, the trial court should have calculated the proportion that each component of the total fine bore to the total fine. To do this, it should have divided each *478 component of the total fine by the total fine, as follows:
(a) $2,000 base fine divided by $5,600 equals 0.357143 base fine proportion;
(b) $2,000 state penalty assessment divided by $5,600 equals 0.357143 state penalty assessment proportion;
(c) $1,400 county penalty assessment divided by $5,600 equals 0.25 county penalty assessment proportion; and
(d) $200 restitution fine divided by $5,600 equals 0.0357143 restitution fine proportion.
3. Next, the trial court should have multiplied each of the four proportions by the $3,420 monetary credit, to determine how much of each component of the total fine was satisfied by the credit, as follows:
(a) Base fine proportion of 0.357143 multiplied by $3,420 equals $1,221.43 allocated to the base fine;
(b) State penalty assessment proportion of 0.357143 multiplied by $3,420 equals $1,221.43 allocated to the state penalty assessment;
(c) County penalty assessment proportion of 0.25 multiplied by $3,420 equals $855 allocated to the county penalty assessment; and
(d) Restitution fine proportion of 0.0357143 multiplied by $3,420 equals $122.14 allocated to the restitution fine.
These allocations exhaust the entire $3,420 monetary credit.
4. Next, the trial court should have subtracted each allocation from the corresponding component of the total fine imposed by the court, to determine how much of each component remained unsatisfied by the allocations, as follows:
(a) $2,000 base fine minus $1,221.43 base fine allocation equals $778.57 of the base fine left unsatisfied;
(b) $2,000 state penalty assessment minus $1,221.43 state penalty allocation equals $778.57 of the state penalty left unsatisfied;
(c) $1,400 county penalty assessment minus $855 county penalty allocation equals $545 of the county penalty left unsatisfied; and
(d) $200 restitution fine minus $122.14 restitution fine allocation equals $77.86 of the restitution fine left unsatisfied.
The total of the unsatisfied amounts of each component of the total fine, which defendant still owes, is $2,180 ($778.57 plus $778.57 plus $545 plus $77.86). We recognize that the trial court stated, "The remaining fine to be paid by defendant is $1,980," which is $200 less than the amount we have stated. However, the amount mentioned by the court did not account for the $200 restitution fine imposed by the court which, pursuant to section 2900.5(a), is also subject to the proportional allocation of monetary credit.
In attempting to shirk responsibility for penalty assessments, defendant cites our decision in People v. Allen (2001) 88 Cal. App.4th 986, 106 Cal.Rptr.2d 253. In Allen, we held that the penalty assessments under section 1464 and Government Code section 76000 are not "freestanding" but require an underlying fine upon which they can be levied. (Allen, 88 Cal.App.4th at pp. 988, 991, 992, 106 Cal.Rptr.2d 253.) Allen is inapposite because the trial court here did impose an underlying $2,000 base fine for battery.
Defendant also points to the part of section 1464, subdivision (b) providing: "When a fine is suspended, in whole or in part, the state penalty shall be reduced in proportion to the suspension." Defendant cites Hensley v. Peace Officers Training Fund (1972) 22 Cal.App.3d 933, 99 Cal. Rptr. 728, which interpreted similar language *479 in former section 13521 (section 1464's precursor) to mean that "the penalty assessment is suspended when the fine is suspended and reduced when the fine is reduced." (Hensley, 22 Cal.App.3d at p. 940, 99 Cal.Rptr. 728.) Neither point raised by defendant has merit, since here the trial court imposed a $2,000 base fine and then allocated the monetary credit to the fine. It neither suspended nor reduced the fine.
Finally, defendant observes that section 1464, subdivision (a) and Government Code section 76000, subdivision (a) provide that their respective penalty assessments "shall be levied ... upon every fine ... imposed and collected by the courts for criminal offenses...." (Italics added.) Defendant argues that fines satisfied by monetary credit are not "collected" by the courts and thus cannot support the imposition of overlying penalty assessments. We are not persuaded.
Defendant's claim rests on the false premise that the $2,000 fine was "discharged" by his monetary credit and that "[a]ny moneys paid by [defendant] would necessarily be the payment of penalty assessments only." Contrary to defendant's view, the monetary credit did not eliminate the base fine "first." Further, with application of the monetary credit on a proportional basis as the court holds, the remaining penalty assessments are supported by an underlying fine.
In any event, we do not believe that a defendant's liability for penalty assessments turns on whether all or some of the base fine is actually collected in cash. The entire base fine (and the rest of the total fine) must be satisfied by the defendant, either by custody or in cash. Under a reasonable interpretation of the statutes, the base fine should be deemed "collected" even if defendant satisfies it in whole or in part by custody.
On this issue, we find persuasive a 1960 opinion of the state Attorney General. (Peace Officers' Training Fund, 35 Ops. Cal.Atty.Gen. 77 (1960).) The opinion addressed several issues concerning former section 13521, one of which was: "If an offender serves out his fine in jail must he also serve out the amount of the penalty assessment?" (Peace Officers' Training Fund, 35 Ops.Cal.Atty.Gen. at p. 77.) The Attorney General answered affirmatively, "except that the judge may waive all or any part of the penalty assessment, the payment of which works a hardship on the person convicted or his immediate family." (Id. at p. 78.)
In relevant part, former section 13521 provided: "[T]here shall be levied a penalty assessment in an amount equal to 5 percent of every fine ... imposed and collected by the courts for criminal offenses, ... When a fine is suspended, in whole or in part, the penalty assessment shall be reduced in proportion to the suspension. [¶] ... [¶] In any case where a person convicted of any offense to which this section applies is imprisoned until the fine is satisfied, the judge may waive all or any part of the penalty assessment the payment of which would work a hardship on the person convicted or his immediate family." (Stats.1959, ch. 1823, § 2, p. 4334, italics added.)
The Attorney General's opinion explained: "It is argued that the assessment was not intended to cover that part of the fine expiated by imprisonment because section 13521 uses the terms `imposed and collected' in the conjunctive and that imprisonment for fine is not, in fact, the collection of a fine. This argument is refuted by that portion of section 13521 quoted above, which specifically provides a waiver of a penalty assessment for one imprisoned in the case of hardship. It *480 follows, therefore, that the Legislature specifically recognized that a penalty assessment would apply to imprisonment in a non-hardship case. Under these circumstance [sic], the word `collected' should be given a broader interpretation. Where a person convicted serves all or part of the fine assessed by imprisonment, that fine is, in fact, being collected. The Legislature recognized this for it did make a special provision for suspended sentences, but it did not choose to do so for fines collected by imprisonment." (Peace Officers' Training Fund, supra, 35 Ops.Cal.Atty. Gen. at p. 81.)
Although the 1960 Attorney General's opinion is not binding on us, we agree with its reasoning. (See Hunt v. Superior Court (1999) 21 Cal.4th 984, 1013, 90 Cal. Rptr.2d 236, 987 P.2d 705 [absent controlling authority, Attorney General's opinion is persuasive because we presume the Legislature was cognizant of the Attorney General's construction of the statute and would have taken corrective action if it disagreed]; California Assn. of Psychology Providers v. Rank (1990) 51 Cal.3d 1, 17, 270 Cal.Rptr. 796, 793 P.2d 2 [Attorney General's opinion entitled to great weight for same reasons]; Freedom Newspapers, Inc. v. Orange County Employees Retirement System (1993) 6 Cal.4th 821, 829, 25 Cal.Rptr.2d 148, 863 P.2d 218 [Attorney General's views are not binding but are entitled to considerable weight].)
Section 1464, the current state penalty assessment statute, contains virtually the same operative language as that found in former section 13521 (from which section 1464 is derived). (§ 1464, subds.(b) [penalty assessment proportionally reduced if fine suspended in whole or in part], (d) [waiver of penalty assessment available for hardship where defendant imprisoned until fine satisfied].)
Further, despite amending sections 1464 and 13521 many times between 1960 and the present (see Historical and Statutory Notes, 51A West's Ann. Pen.Code (2000 ed.) foil. § 1464, pp. 416-419), the Legislature has retained the relevant language and has not indicated disagreement with the Attorney General's 1960 interpretation of that language. In relevant part, Government Code section 76000, subdivision (a) mirrors Penal Code section 1464, subdivision (a), and so the same logic applies to county penalty assessments. Hence, we adopt the reasoning of the 1960 Attorney General's opinion in concluding that a base fine is "collected" by the courts even if it is satisfied by custody.
The rather cumbersome calculation procedure of section 2900.5(a) would also apply to postsentence service of time in custody in lieu of fine. (See § 1205, subd. (a).) However, in a busy arraignment court, once the defendant's hardship is shown and the defendant elects to "work off the fine," the normal procedure would be for the court first to convert each $30, for example, of base fine to one day of postsentence custody and then waive all penalty assessments as permitted by section 1464, subdivision (d). This avoids time-consuming calculations and would be an appropriate practice in such courts.

II[**]

DISPOSITION
The judgment is reversed and the matter is remanded to the trial court. The trial court is directed to vacate the conviction and sentence for assault, and to vacate its December 13, 2000 order regarding the allocation of defendant's $3,420 monetary credit. The trial court is directed to proceed *481 thereafter to resentence defendant on the conviction for battery and to allocate the $3,420 monetary credit in compliance with section 2900.5(a).
We concur: SCOTLAND, P.J., and CALLAHAN, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part II.
[1]  Further undesignated statutory references are to the Penal Code.
[**]   See footnote *, ante.
