The court may dismiss the action in whole or in part upon motion of the plaintiff at any time prior to payment of the judgment. In its order of dismissal, the court may impose any conditions that are just and equitable, including a requirement of restitution of property or money.
Ala. Code § 18-1A-231 (1975)