Hello and thank you for your question.
You have an asset sale then, and not a stock sale (perhaps you helped your client weigh the alternatives...). The purchase price of assets sold in a lump sum is assigned to the assets according to their classification. The regulations for IRC 338 will clarify, so specifically, let's look to Reg. Sec 1.338-6 after a quick peek at IRC 1060 and IRC 338:
"...the consideration received for such assets shall be allocated among such assets acquired in such acquisition in the same manner as amounts are allocated to assets under section 338 (b)(5)...."
"(5) Allocation among assets The amount determined under paragraphs (1) and (2) shall be allocated among the assets of the target corporation under regulations prescribed by the Secretary. "
"This section prescribes rules for allocating ADSP and AGUB among the acquisition date assets of a target for which a section 338 election is made..."
Before getting too deep into the regulations, I also suggest you view Form 8594 and the related instructions, as pertaining to classifying the assets:
If you have a shareholder loan, then it should be resolved before closing up the corporation and filing a final return. Perhaps your shareholder signed a statement for you indicating that he intended to contribute his loan balance to capital in order to wrap up the corporation. In any case, you generally cannot file a final return for a corporation unless all assets and liabilities can be written off the corporate balance sheet.
Perhaps review IRC 165 and 166...
I hope this is helpful. Thanks again for your question!