This principle is called "as if it never happened".
So the simplest accounting treatment is to rush back all the entries related to this in the subsidiary, which is right.
For example, if A confirms it, it will be done.
Debit: cash 1
Borrow: investment income x- 1
Loan: long-term equity investment x
B may have done it
Borrow: long-term equity investment y
Credit: cash 1
Loan: capital reserve y- 1
When merging, the first step is to add up all the subsidiary reports.
Therefore, the impact of this transaction on consolidated statements (before offset)
Borrow: investment income x- 1
Borrow: long-term equity investment y
Loan: capital reserve y- 1
Loan: long-term equity investment x
All offset entries need to be reversed (to ensure that the offset will not affect the consolidated statements).
Debit: capital reserve y- 1
Borrow: long-term equity investment x
Loan: investment income x- 1
Loan: long-term equity investment y
Of course, if we redesign the profit and loss carry-over and income tax here, it will be even more troublesome.
But the general idea is to counteract it as if nothing had happened.