How to account for the transfer of funds between the head office and the branch office?

The transfer of funds between the head office and the branch office, provided that the head office lends the funds to the branch office.

From the head office's point of view, the accounting treatment is,

Borrow: other receivables -XXX branch,

Loan: bank deposit.

From the point of view of the branch, accounting treatment is,

Debit: bank deposit,

Loan: Other payables-Head Office.