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.