If the land cannot be divided without material injury to the parties, or, if the vendee so direct, the court shall order it all to be sold at one (1) time, making the payments to fall due at such times as the purchaser has agreed to pay the vendor; and the money, as collected, shall be applied to the payment of the installments due the vendor.