Internal ID for branch showed up in payment reference instead of the CD

Order To Cash: Customer Ledger Version 8.58

When included reference to branch in the CID for a company with multi-branch support in the payment settings of Customer Ledger Preferences (AR101000). The generated Payment Reference Nbr in Sales Invoice screen (AR301000) contained the internal id for branch instead of the CD (visible ID). This has now been fixed.