If there is an opening credit balance, then it is on the credit side of the account.
If there is a closing debit balance, then it ends up on the debit side at the beginning of the next period, which means that it is carried forward from the credit side in this period.