Recording debits to customers and credits from suppliers

Hello friends, I would be grateful if you could tell me how to record the debits to customers and also the credits from suppliers, which mostly happen when the goods are returned?

Use credit notes for customer returns and refunds | Manager
Use debit notes for supplier returns and refunds | Manager