
84 P.3d 658 (2004)
2004 MT 24
STATE of Montana, Plaintiff and Respondent,
v.
Robert MINGUS, Defendant and Appellant.
No. 03-461.
Supreme Court of Montana.
Submitted on Briefs December 4, 2003.
Decided February 5, 2004.
*659 For Appellant: Gary E. Wilcox, Billings, Montana.
For Respondent: Mike McGrath, Attorney General; Tammy K. Plubell, Assistant Attorney General, Helena, Montana, Dennis Paxinos, County Attorney; Ed Zink, Deputy County Attorney, Billings, Montana.
Justice W. WILLIAM LEAPHART delivered the Opinion of the Court.
¶ 1 Robert Mingus (Mingus) appeals the sentence imposed by the District Court. We reverse in part, affirm in part, and remand.
¶ 2 The issue presented on appeal is whether the District Court erred in sentencing by (a) ordering a $1,000 fine; (b) not giving Mingus credit toward the fine for his pretrial detention; and (c) ordering payment for aftercare treatment.

Factual and Procedural Background
¶ 3 On October 24, 2002, Mingus was charged by Information with the offense of Driving Under the Influence of Alcohol or Drugs (DUI), a felony, in violation of § 61-8-401, MCA, and with Driving While License Suspended or Revoked, a misdemeanor, in violation of § 61-5-212, MCA. On December 20, 2002, Mingus pled guilty to the DUI charge and the State agreed to dismiss the Driving While License Suspended or Revoked charge at sentencing. The court ordered a presentence investigation (PSI). The PSI listed Mingus's debts and assets as zero. It also stated that prior to his arrest, Mingus was employed as a maintenance *660 worker at an auto business, making approximately $1,280 per month. The PSI indicated Mingus would be able to return to that job once he was on probation.
¶ 4 In May of 2003, the District Court sentenced Mingus to a period of thirteen months to a facility approved by the Department of Corrections, subject to probation if he completed a residential alcohol treatment program. Additionally, he was sentenced for five years to the Montana State Prison, all suspended and to run consecutively to the thirteen-month term already imposed. The court also imposed a $1,000 fine. The record reflects that the court considered the PSI which recommended certain conditions as part of Mingus's probation. These conditions relevant to this appeal included:
5. The Defendant shall obtain a chemical dependency evaluation by a state approved treatment provider/facility, at his own expense, and follow all recommendations of said evaluation.
12. The Defendant shall pay a fine of not less than $1,000 or more than $10,000.
13. The Defendant, if financially able, as a condition of probation, shall pay $50 per day for the cost of imprisonment and/or alcohol treatment for the length of time the offender is imprisoned or in in-patient alcohol treatment.
16. The Defendant will enter and remain in an aftercare treatment program for the entirety of the probationary period. The Defendant will pay for the cost of out-patient alcohol treatment during the term of probation.
¶ 5 In District Court, Mingus objected to Conditions 12, 13, and 16. The record does not reflect that he properly objected to Condition 5. After voicing his objections, Mingus asked the court to follow the remainder of the plea agreement. The court engaged in the following colloquy with Mingus:
THE COURT: Anything that you want to say, Mr. Mingus?
MINGUS: No, sir.
THE COURT: Well, you've obviously had a long history and involvement with the legal system, and it appears there's some agreement here on maybe some underlying causes. Until you get a handle on your alcohol, you may just keep continually racking up some of these charges.
I will order you sentenced to thirteen months to the Department of Corrections, followed by five years of probation, and I'm going to order you to pay a thousand dollar fine. I'm not going to give you credit for time served. It will be over and above any credit applying to the fine. I will give you credit for the time you've spent in jail and in prison on this sentence.
¶ 6 At sentencing, the court discussed the changes it would make to the conditions recommended in the PSI. Condition 12 was modified to specify a fine of $1,000 to be credited to the general fund. The court stated Condition 16 would be modified "to say that you will enter and remain in [the aftercare] program for the entirety of the probationary period or so long as it's recommended by the chemical dependency evaluation and your probation officer. And financially, you're going to be ordered to pay that, because I think No. 5 also says that." Conditions 5 and 13 were unchanged. The court noted that Condition 13 required Mingus to pay costs of imprisonment and in-patient alcohol treatment only if he was financially able; the court observed that it appeared in all probability Mingus would not be able to pay these costs.
¶ 7 The District Court subsequently entered a written judgment. The only variation between the oral sentence and the written sentence was in Condition 16. In the written judgment, Condition 16 required Mingus to remain in the "aftercare program for the entirety of the probationary period or so long as recommended by chemical dependency evaluation, Probation and Parole Officer, and is financially able." The italicized portion was not in the oral sentence.
¶ 8 At the time Mingus was arrested for the current charges, he was on parole for previous offenses. As a result of the current charges, his parole was revoked and he is now incarcerated in the Montana State Prison serving out the prior sentence. The sentence in the present case will begin to run after the prior sentence is completed. Mingus filed this timely appeal.


*661 Discussion

¶ 9 Issue: Whether the District Court erred in sentencing by (a) ordering a $1,000 fine; (b) not giving Mingus credit toward his fine for his pretrial detention; and (c) ordering payment for aftercare treatment?
¶ 10 We review a criminal sentence for legality only, ascertaining whether the sentence falls within the statutory parameters. State v. Micklon, 2003 MT 45, ¶ 5, 314 Mont. 291, ¶ 5, 65 P.3d 559, ¶ 5. A sentence is not illegal when it falls within the statutory parameters. State v. McLeod, 2002 MT 348, ¶ 12, 313 Mont. 358, ¶ 12, 61 P.3d 126, ¶ 12. We will address Conditions 12, 13, and 16. Mingus did not properly object to Condition 5 in the District Court. We have repeatedly held that "we will not review issues where the defendant failed to make a contemporaneous objection to the alleged error in the trial court" unless a sentence is illegal or exceeds the statutory parameters. Micklon, ¶ 8. "We will not put a district court in error for an action in which the appealing party acquiesced or actively participated." Micklon, ¶ 10 (citation omitted). Because Mingus did not object to Condition 5 and then asked the court to follow the plea agreement, we will not address this condition on appeal. Micklon, ¶ 8.
$1,000 Fine
¶ 11 A person who violates § 61-8-401, MCA, shall be sentenced in accordance with § 61-8-731, MCA. Section 61-8-731, MCA, requires a fine of not less than $1,000 or more than $10,000. A sentencing judge is not required "to specify a period of time for payment of the fine or to specify whether the payment is to be made in installments[.]" McLeod, ¶ 35.
¶ 12 Mingus's argument is two-fold. First, he claims that the court erred because it did not set a payment schedule for Mingus to pay his fine. Second, Mingus claims that the court failed to comply with its statutory duty under § 46-18-231, MCA, to inquire into Mingus's ability to pay the fine and the burden that payment of the fine would impose.
¶ 13 The court imposed the minimum allowable statutorily-required fine of $1,000. Since the fine was mandated by statute, Condition 12 was clearly within the statutory parameters. Section 61-8-731, MCA. Mingus contends that because the court did not establish a payment plan, technically the payment becomes due immediately. Section 46-18-234, MCA, provides: "Whenever a defendant is sentenced to pay a fine or costs under XX-XX-XXX or XX-XX-XXX, the court may grant permission for payment to be made within a specified period of time or in specified installments. If no such permission is included in the sentence, the payment is due immediately." Accordingly, Mingus claims he would already be in default. However, Mingus was not fined pursuant to § 46-18-231, MCA, or § 46-18-232, MCA. Therefore the court was not required to specify the payment schedule. Additionally, we have stated that a sentencing judge is not required "to specify a period of time for payment of the fine or to specify whether the payment is to be made in installments[.]" McLeod, ¶ 35. The court was not in error when it did not specify when Mingus was to pay his fine.
¶ 14 Mingus claims that the court erred when it did not, prior to ordering the fine, inquire into his ability to pay the fine. We have previously required courts, before imposing a fine, to inquire whether a defendant would be able to pay a fine, considering the defendant's financial resources and the extent of the resulting financial burden. However, these cases have dealt with discretionary, not mandatory, fines. McLeod; State v. Farrell (1984), 207 Mont. 483, 676 P.2d 168; State v. Lenihan (1979), 184 Mont. 338, 602 P.2d 997.
¶ 15 In cases involving discretionary fines, when a defendant "has been found guilty of an offense for which a felony penalty of imprisonment could be imposed, the sentencing judge may, in lieu of or in addition to a sentence of imprisonment, impose a fine only in accordance with subsection (3)." Section 46-18-231(1)(a), MCA (emphasis added). Section 46-18-231(3), MCA, states that a "sentencing judge may not sentence an offender to pay a fine unless the offender is or will be able to pay the fine. In determining the amount and method of payment, the sentencing *662 judge shall take into account the nature of the crime committed, the financial resources of the offender, and the nature of the burden that payment of the fine will impose." This statutory provision does not apply to mandatory fines. When a fine is statutorily mandated, the court has no discretion as to whether to impose the fine, irrespective of the defendant's ability to pay. The District Court did not err when it imposed the mandatory $1,000 fine without specifying a payment schedule or inquiring into Mingus's ability to pay the fine.

Credit for Pretrial Detention
¶ 16 A sentencing court must give "credit for each day of incarceration against both the sentence and any fine imposed." State v. Fisher, 2003 MT 33, ¶ 13, 314 Mont. 222, ¶ 13, 65 P.3d 223, ¶ 13. Section 46-18-403(2), MCA, provides that
[a]ny person incarcerated on a bailable offense who does not supply bail and against whom a fine is levied on conviction of the offense must be allowed a credit for each day of incarceration prior to conviction, except that the amount allowed or credited may not exceed the amount of the fine.
We have previously stated that the language in § 46-18-203(2) is mandatory. Fisher, ¶ 13.
¶ 17 Mingus was incarcerated for 193 days before his conviction. Mingus claims the court erred when it did not credit his pretrial incarceration toward his $1,000 fine. The record reflects the judge correctly gave him credit for his pretrial incarceration toward the time to be served in prison. However, the record clearly reflects the court did not give Mingus pretrial-detention credit toward the fine as required by § 46-18-403(2), MCA. The court stated that "I'm going to order you to pay a thousand dollar fine. I'm not going to give you credit for time served.... I will give you credit for the time you've spent in jail and in prison on this sentence."
¶ 18 The State concedes that Mingus's pretrial incarceration should have been credited toward the $1,000 fine. We agree. The District Court was in error when it did not give Mingus credit toward both the sentence and the fine.

Aftercare Treatment
¶ 19 Section 61-8-731(3)(f), MCA, requires as a probationary condition that the person enter into and remain in an aftercare program for the entire probationary period. Applicable to that requirement is § 61-8-731(3)(b), MCA, which provides, as a condition of probation, the court shall order "a person who is financially able to pay the costs of imprisonment, probation, and alcohol treatment[.]"
¶ 20 When the court orally sentenced Mingus for Condition 16, the court did not mention consideration of Mingus's ability to pay for the aftercare program. Instead, the court simply stated that Mingus was required to pay for the aftercare program. The subsequent written sentencing order, however, did require consideration of Mingus's financial ability to pay. Because the oral sentence and the written sentence for Condition 16 differ, the oral sentence will control. State v. Lane, 1998 MT 76, ¶ 40, 288 Mont. 286, ¶ 40, 957 P.2d 9, ¶ 40.
¶ 21 The record reflects that the court considered the PSI. The PSI reflected Mingus's debts and assets as zero. The PSI also stated that, prior to incarceration, Mingus was earning approximately $1,280 per month and that he could return to this job once he was no longer in prison. The record does not reflect that the court made a separate inquiry into whether Mingus would be able to pay any costs imposed or whether such payment might cause hardship.
¶ 22 Mingus contends that because the court sentenced him to pay for the aftercare costs without a full inquiry into his ability to pay these costs, he is set up for immediate probation violations. Mingus is statutorily required to complete the aftercare treatment program pursuant to § 61-8-731(3)(f), MCA. He is only required to pay for this treatment if he is financially able to do so. Section 61-8-731(3)(b), MCA. Therefore, the court must make specific findings to determine whether Mingus is financially able to pay these costs.
*663 ¶ 23 The oral sentence does not take into account Mingus's ability to pay for aftercare treatment, as required by § 61-8-731(3)(b), MCA. Although the written sentence does reference financial ability, the District Court still did not make the requisite findings regarding Mingus's ability to pay for the aftercare program.
¶ 24 We remand this case to the District Court for resentencing consistent with this opinion.
KARLA M. GRAY, JOHN WARNER, PATRICIA O. COTTER, JIM REGNIER, JAMES C. NELSON and JIM RICE, concur.
