
220 S.W.3d 371 (2007)
Russell COLDIRON, Respondent,
v.
MISSOURI DEPARTMENT OF CORRECTIONS, Appellant.
No. WD 66462.
Missouri Court of Appeals, Western District.
March 13, 2007.
Motion for Rehearing and/or Transfer Denied May 1, 2007.
*372 Stephen D. Hawke, Assistant Attorney General, Jefferson City, MO, for appellant.
Russell Gene Coldiron, Tipton, pro se.
*373 Before BRECKENRIDGE, P.J., LOWENSTEIN and HOLLIGER, JJ.
Motion for Rehearing and/or Transfer to Supreme Court Denied May 1, 2007.
PATRICIA BRECKENRIDGE, Presiding Judge.
The Department of Corrections appeals the trial court's judgment in favor of Russell Coldiron on Mr. Coldiron's petition for declaratory judgment. In his petition, Mr. Coldiron sought a declaration that the department incorrectly determined that he had one prior prison commitment and, therefore, was required to serve a minimum of forty percent of his current sentence before becoming eligible for parole. In its first point on appeal, the department asserts that the trial court erred in entering judgment in favor of Mr. Coldiron because, even excluding one 120-day incarceration as a previous prison commitment, Mr. Coldiron had another 120-day incarceration that qualifies as a previous prison commitment. In its second point on appeal, the department contends that the trial court erred in finding that section 559.115.7, RSMo Cum.Supp.2004,[1] should be retroactively applied in calculating Mr. Coldiron's mandatory minimum prison term.
Because Mr. Coldiron does have one qualifying previous prison commitment to the department, excluding his first 120-day incarceration, the trial court erred in entering judgment in favor of Mr. Coldiron. The trial court, however, did not err in retroactively applying section 559.115.7. The trial court's judgment is reversed. Pursuant to Rule 84.14, this court enters the judgment the trial court should have entered. Accordingly, judgment is entered in favor of the department on its motion for judgment on the pleadings and against Mr. Coldiron on his motion for declaratory judgment.

Factual and Procedural Background
On January 2, 1997, Mr. Coldiron pled guilty to one count of leaving the scene of a motor vehicle accident, Case No. CR96-5118. The court subsequently sentenced him to five years in prison. Mr. Coldiron was sentenced to a 120-day callback program under section 559.115. On April 18, 1997, Mr. Coldiron successfully completed the 120-day program and was released on a five-year term of probation.
On November 6, 2000, Mr. Coldiron violated the terms of his probation and was subsequently sentenced to an additional 120-day program under section 559.115.7. Mr. Coldiron successfully completed this incarceration on March 30, 2001, and was again released on a five-year term of probation.
On February 19, 2002, Mr. Coldiron pled guilty to one count of driving while intoxicated and one count of driving while revoked, Case No. CR702-22FX, and was sentenced to four years in prison.[2] Mr. Coldiron's guilty plea violated the terms of his probation in Case No. CR96-5118. The court revoked his probation and ordered Mr. Coldiron to serve out his prison term in the Department of Corrections. On February 22, 2002, Mr. Coldiron was delivered to the department. Thereafter, the department notified Mr. Coldiron that he was required to serve forty percent of his prison term in Case No. CR702-22FX based on a January 1997 previous prison commitment.
*374 On July 27, 2005, Mr. Coldiron filed a petition for declaratory judgment claiming that the department incorrectly calculated the number of his previous prison commitments. Rather, Mr. Coldiron contended that he did not have any previous prison commitments. In particular, Mr. Coldiron asserted that the department incorrectly counted as a previous prison commitment the time he served in a 120-day callback program, under section 559.115.7.
On September 16, 2005, the department filed a motion for judgment on the pleadings. The department alleged, in part, that even if Mr. Coldiron's January 1997 commitment did not count as a previous prison commitment, Mr. Coldiron's recommitment to the department in November 2000, following revocation of his probation, qualifies as a previous prison commitment. Thus, the department claimed that it did not err in calculating Mr. Coldiron's mandatory minimum prison term at forty percent. On December 5, 2005, the trial court entered judgment granting Mr. Coldiron's petition for declaratory judgment and denying the department's motion for judgment on the pleadings. Specifically, the court found that Mr. Coldiron's April 1997 incarceration[3] did not constitute a previous prison commitment under section 558.019.2. The department filed this appeal.

Standard of Review
The standard of review in a declaratory judgment case is the same as in any other court-tried case. Inman v. Mo. Dep't of Corrs., 139 S.W.3d 180, 183 (Mo. App. W.D.2004). Therefore, the judgment will be affirmed unless there is no substantial evidence to support it, it is against the weight of the evidence, or it erroneously declares or applies the law. Id. The evidence, and all reasonable inferences drawn therefrom, are viewed in the light most favorable to the judgment and all evidence and inferences to the contrary are disregarded. Id.

Second Receipt Following Release on Probation Qualifies as Previous Prison Commitment
In its first point on appeal, the department asserts that the trial court erred in entering judgment in favor of Mr. Coldiron because, even excluding one 120-day incarceration as a previous prison commitment, Mr. Coldiron had another 120-day incarceration that qualifies as a previous prison commitment. Therefore, the department concludes that it correctly calculated that Mr. Coldiron is required to serve a minimum of forty percent of his current sentence before becoming eligible for parole, under section 558.019.2(1).
Section 558.019.2 provides that a defendant is required to serve a statutorily determined minimum prison term before becoming eligible for parole based on the defendant's number of previous prison commitments.[4] For example, if a defendant has one previous prison commitment, he must serve forty percent of his sentence before becoming eligible for parole; if a defendant has two previous prison commitments, he must serve fifty percent of his sentence before becoming eligible for parole; and if a defendant has three or more *375 previous prison commitments, he must serve eighty percent of his sentence before becoming eligible for parole. Section 558.019.2(1)-(3). For the purpose of section 558.019, "prison commitment" "means the receipt by the department of corrections of a defendant after sentencing." Section 558.019.2.
On January 2, 1997, Mr. Coldiron pled guilty to one count of leaving the scene of a motor vehicle accident, Case No. CR96-5118. The court subsequently sentenced him to five years in prison. Mr. Coldiron was sentenced to a 120-day callback program under section 559.115. On April 18, 1997, Mr. Coldiron successfully completed the 120-day program and was released on a five-year term of probation. The trial court found that Mr. Coldiron's incarceration during this time period did not count as a previous prison commitment for purposes of section 558.019.2.
Section 559.115.7, amended in 2003, provides that "[a]n offender's first incarceration for one hundred twenty days for participation in a department of corrections program prior to release on probation shall not be considered a previous prison commitment for the purpose of determining a minimum prison term under the provisions of section 558.019, RSMo." Thus, the trial court correctly found that the department's receipt of Mr. Coldiron in January 1997 does not count as a previous prison commitment. Ridinger v. Mo. Bd. of Probation & Parole, 189 S.W.3d 658, 663 (Mo.App. W.D.2006).
Nevertheless, the department asserts that even without counting its January 1997 receipt of Mr. Coldiron as a previous prison commitment, Mr. Coldiron had another previous prison commitment that does qualify as a previous prison commitment for purposes of section 558.019.2. On November 6, 2000, Mr. Coldiron violated the terms of his probation and was subsequently sentenced to an additional 120-day program under section 559.115.7. Mr. Coldiron successfully completed this incarceration on March 30, 2001, and was again released on a five-year term of probation. The department correctly argues that its receipt of Mr. Coldiron after he was sentenced on this occasion does count as a previous prison commitment for purposes of section 558.019.2. As this court stated in Dade v. Missouri Board of Probation & Parole, 194 S.W.3d 382, 386 (Mo. App. W.D.2006), section 559.115.7 "only exempts from section 558.019 an offender's first incarceration in a 120-day program `prior to release on probation.'" Thus, "it follows that an incarceration following a probation revocation counts as a qualifying prison commitment for purposes of section 558.019.2 even though the corresponding original 120-day callback itself is excluded as such a commitment under section 559.115.7." Id. Here, while the department's first receipt of Mr. Coldiron in January 1997 to serve a 120-day sentence does not count as a previous prison commitment, the department's second receipt of Mr. Coldiron in November 2000, following his release on probation, does count as a qualifying prison commitment. Id. See also Ridinger, 189 S.W.3d at 664.
In sum, the trial court correctly found that the department's receipt of Mr. Coldiron in January 1997 did not count as a qualifying previous prison commitment. Nevertheless, the department's receipt of Mr. Coldiron for a second time in November 2000, following his release on probation, does qualify as a previous prison commitment for purposes of section 558.019.2. Therefore, the department correctly calculated that Mr. Coldiron was required to serve a minimum of forty percent of his current sentence before becoming eligible for parole. Section 558.019.2(1). The department's first point is granted.


*376 Amendment to Section 559.115.7 Retroactive
In its second point on appeal, the department asserts that the trial court erred in finding that Mr. Coldiron's first incarceration in a 120-day callback program should not count as a commitment for purposes of determining the minimum prison term that he must serve before becoming eligible for parole because the 2003 amendment to section 559.115.7 should not be applied retroactively. Specifically, the department argues that this court's prior decisions in Irvin v. Kempker, 152 S.W.3d 358 (Mo.App. W.D.2004), and Powell v. Missouri Department of Corrections, 152 S.W.3d 363 (Mo.App. W.D.2004), which held that section 559.115.7 applied retroactively, were wrongly decided and are inconsistent with the Missouri Supreme Court's decision in State v. Lawhorn, 762 S.W.2d 820 (Mo. banc 1988). The department also contends that section 1.160 bars retroactive application of the parole eligibility provisions of section 559.115.7.
The Missouri Supreme Court recently rejected the department's arguments. In Dudley v. Agniel, 207 S.W.3d 617, 619 (Mo. banc 2006), the Supreme Court held that because "[t]he parole eligibility provisions of section 559.115.7 do not alter a substantive law governing [an offender's] offense or shorten his sentence" but, merely "result in a potential change of the location or circumstances under which [an offender] serves the remainder of his sentence," "section 1.160 does not bar retroactive application of the parole eligibility provisions of section 559.115.7." Id. Consequently, the trial court did not err in finding that section 559.115.7 applies retroactively and Mr. Coldiron's first incarceration under a 120-day callback program does not qualify as a previous prison commitment for purposes of section 558.019.2. The department's second point is denied.

Conclusion
The trial court did not err in finding that the department's first receipt of Mr. Coldiron in January 1997 to serve a 120-day sentence under section 559.115.7 did not qualify as a previous prison commitment for purposes of section 558.019.2. Nevertheless, the department's second receipt of Mr. Coldiron in November 2000, following his release on probation, does qualify as a previous prison commitment. Accordingly, the department correctly determined that Mr. Coldiron had one qualifying previous prison commitment and, therefore, is required to serve at least forty percent of his current sentence before becoming eligible for parole. Section 558.019.2(1). The trial court's judgment is reversed. Pursuant to Rule 84.14, this court enters the judgment the trial court should have entered. Accordingly, judgment is entered in favor of the department on its motion for judgment on the pleadings and against Mr. Coldiron on his motion for declaratory judgment.[5]
All concur.
NOTES
[1]  All statutory references to section 559.115.7 are to the 2004 Cumulative Supplement to the Revised Statutes of Missouri 2000. All other statutory references are to the Revised Statutes of Missouri 2000.
[2]  Mr. Coldiron committed the offenses associated with Case No. CR702-22FX on December 29, 2001.
[3]  Mr. Coldiron was actually released on probation in April 1997. The 120-day incarceration that ended in April 1997 began in January 1997.
[4]  The version of section 558.019 in effect on December 29, 2001, RSMo 2000, is controlling because that is the date of the last offense committed by Mr. Coldiron. See Irvin v. Mo. Bd. of Prob. & Parole, 34 S.W.3d 202, 206 (Mo.App. W.D.2000). The relevant portions of section 558.019 were amended in 2003, 2004, and 2005.
[5]  Mr. Coldiron filed, with this court, a motion to dismiss the department's appeal and the imposition of frivolous appeal damages arguing that this case is controlled by this court's previous decision in Irvin, 152 S.W.3d 358. Because the department correctly calculated that Mr. Coldiron has one previous prison commitment and, therefore, its first point on appeal was not frivolous, Mr. Coldiron's motion is denied.
