How to deal with the entry of subsidiary distributing profits to parent company?

According to the profit distribution resolution of the subsidiary shareholders' meeting:

Borrow: profit distribution-undistributed profit;

Loan: Turn the profits payable into profits.

Borrow: profits payable;

Loan: bank deposit.

Parent company:

Debit: dividends receivable,

Loan: investment income,

Debit: bank deposit,

Credit: Dividends receivable.

After the subsidiary (legal person) makes profits, it can only distribute the profits to the parent company after paying taxes.