Our customers are branch locations of larger entity. Upon payment, they will often apply a credit from one branch to a different branch's invoice.
Ex: Branch 1 returns product. Credit 1 Issued. Then we receive payment and they have applied Credit 1 to an invoice associated with Branch 5.
Looking for best practices in this scenario. TYIA