Normally, when posting an invoice, a customer ledger entry is created resulting in a customer balance.
However, when the invoice is a factoring invoice, the customer balance is automatically reversed with a payment transaction to the customer and moving the balance to a factoring account, either in the G/L or a bank transaction (depending on setup).