(1) In the case of joint debtors, whether partners or not, the joint estate shall be applied in the first instance in payment of their joint debts, and the separate estate of each joint debtor shall be applied in the first instance in payment of his or her separate debts.
(2) If there is a surplus in the case of any of the separate estates, it shall be dealt with as part of the joint estate and if there is a surplus in the case of the joint estate, it shall be dealt with as part of the respective separate estates in proportion to the right and interest of each joint debtor in the joint estate.