In proceedings to liquidate the assets and affairs of a corporation, when the costs and expenses of such proceedings and all debts, obligations, and liabilities of the corporation shall have been paid and discharged and all of its remaining property and assets distributed in accordance with the provisions of this chapter, or in case its property and assets are not sufficient to satisfy and discharge such costs, expenses, debts, and obligations, and all the property and assets have been applied so far as they will go to their payment, the court shall enter a decree dissolving the corporation, whereupon the corporate existence shall cease.