Every corporation doing business in this State which is a parent, subsidiary, or affiliate of another corporation shall add to its capital stock, surplus, and undivided profits all indebtedness owed to a parent, subsidiary, or affiliated corporation as a part of its capital used in its business and as a part of the base for franchise tax under this section. If any part of the capital of the creditor corporation is capital borrowed from a source other than a parent, subsidiary, or affiliate, the debtor corporation, which is required under this subsection to include in its tax base the amount of debt by reason of being a parent, subsidiary, or affiliate of the creditor corporation, may deduct from the debt included a proportionate part determined on the basis of the ratio of the borrowed capital of the creditor corporation to the total assets of the creditor corporation. If the creditor corporation is also taxable under the provisions of this section, the creditor corporation is allowed to deduct from the total of its capital, surplus, and undivided profits the amount of any debt owed to it by a parent, subsidiary or affiliated corporation to the extent that the debt has been included in the tax base of the parent, subsidiary, or affiliated debtor corporation reporting for taxation under the provisions of this section.
N.C. Gen. Stat. § 105-122