Did you buy the company or the assets? It sounds like you may have bought the company. If you bought the company, which usually only happens with larger businesses not small businesses, you bought the balance sheet and need to keep it in balance including the retained earnings.
If you bought the assets, the balance sheet of the old company has nothing to do with the bookkeeping of the acquiring company. It would be booked like any asset purchase with some exceptions.
The reason small businesses generally do not buy the company (or sell the company) and just buy the assets is if you buy the company, all historical liability now belongs to you. Thus if there is a lingering lawsuit, you are now the defendant. If you buy just the assets, generally any liability of the old company stays with the old company.