Section 16807 is the arithmetic of ending a partnership, and its order is not negotiable. Subdivision (a) provides that in winding up the business, the assets — including the contributions of the partners required by the section — are applied to discharge the partnership's obligations to creditors, including, to the extent the law permits, partners who are creditors. Only any surplus is applied to pay in cash the net amount distributable to the partners.
Subdivision (b) sets out how the partners' share is calculated. Each partner is entitled to a settlement of all partnership accounts on winding up. In settling accounts among the partners, the profits and losses resulting from liquidating the assets are credited and charged to the partners' accounts. Where a partner's account shows an excess of credits over charges, the partnership distributes that amount. Where the charges exceed the credits — a deficit — the partner must contribute an amount equal to that excess, except in registered and foreign limited liability partnerships. That is the sentence that surprises people who assumed winding up could only ever produce a payment out.
Subdivision (c) deals with the partner who does not pay: the other partners must contribute, in the proportions in which they share losses, the additional amount necessary to satisfy the partnership obligations for which they are liable under § 16306, and a partner who contributes more than their share may recover the excess from the others. Subdivision (d) requires further contributions after settlement for obligations that were not known at the time. Subdivision (e) makes a deceased partner's estate liable for the obligation to contribute, and subdivision (f) allows an assignee for creditors or a court-appointed representative to enforce a partner's obligation to contribute. Working out the accounts, and who owes what, is the point at which an accountant and a lawyer are both needed.