If any time before sale, the defendant shall bring into court the principal and interest due, with costs, the proceedings in the foreclosure action shall be stayed until a further default, and in case of a subsequent default in the judgment of any of the installments, or any part thereof, of such mortgage, the court may enforce by order or other process the collection of such subsequent installment.
SDCL 21-47-10