put (one's) affairs in order
To organize one's financial and legal arrangements, especially in preparation for death. The doctors told me I likely had six months to live, so I need to start putting my affairs in order now. My father never put his affairs in order, and now, my brothers and I are embroiled in lawsuits over his estate.