Why do credit notes not reflect in knock off transactions?

Suggestions:
System has the provision for credit note settlement after Sales return. When a Sales return is saved withreturn option as credit note, then the system auto generates the credit note. This auto genetated credit note is not reflected in the pending knock off transaction.
The credit notes which are automatically generated against the Sales return or against the invoice which gets adjusted automatically. Hence they are not available in the knockoff.
The System will check all the unadjusted invoice, credit notes, debit notes, advances. the system automatically selects records customer wise and also adjusts the amount to match with them. Once this process is completed, the system will create a receivable JV transaction automatically against each customer. Once the process is completed and JV’s are confirmed, the system adjusts the amount in open receivables.