set one's affairs in order

From Wiktionary, the free dictionary