The rights and duties of the partners in relation to the partnership shall be determined, subject to any agreement between them, by the following rules: 1. Each partner shall be repaid his contributions, whether by way of capital or advances to the partnership property and share equally in the profits and surplus remaining after all liabilities, including those to partners, are satisfied; and except as provided in subdivision (b) of section twenty-six of this chapter, each partner must contribute