If, in any case mentioned in ss. 846.06 and 846.07 it shall appear that the mortgaged premises are so situated that they cannot be sold in parcels without injury to the interests of the parties or that the sale of the whole will be most beneficial to them the court may adjudge the sale of the whole in which case the proceeds of sale, after deducting the costs of the action and of sale, shall be applied to the payment of the sums due and to become due deducting from all sums not due, which do not bear interest, interest from the time of payment to the time when the same are payable or the court may direct the balance of the proceeds of sale, after paying the sum then due with such costs, to be placed at interest for the benefit of the plaintiff, to be paid to the plaintiff as such subsequent payments or installments shall become due, with the interest thereon. The surplus, after paying the amount due the plaintiff and costs, shall be paid to the party entitled thereto on the order of the court.
Wis. Stat. § 846.08