Crediting Loan Invoiced Shipments

Is there a way to credit, having the stock also returned, for loan invoiced shipments in X3?

Scenario, all sales for this client are done as loans.

Once the stock is consumed, they are notified by the customers and then the client invoices the customer.

However, from time to time, a customer makes a mistake and send the incorrect data as what had been used, in this instance credit note needs to be created, but the impact needs to be financial as well as the stock, in other words, the stock needs to be returned as well.