What subjects should the branch company record when it receives the grant from the headquarters?

The branch company receives the appropriation from the headquarters, which belongs to investment.

Debit: bank deposit

Loan: paid-in capital

The branch company received a grant from the headquarters, which belongs to borrowing.

Debit: bank deposit

Loans: Other payables?

The branch company received a grant from the headquarters, which was a free donation.

Debit: bank deposit

Loan: non-operating income