Status of a sales invoice

hello, i have a question just to understand when ERPnext Sales invoice becomes a credited note issued
i have a sales invoice which is paid from POS of course, sometimes when issuing a return from a sales invoice it shows the return status and the paid status sales invoice becomes a credit note issued status this is a case 1/50 sales invoice with returns , 1 of them is like that only , the rest are being shown as 1 paid and the next return , what is the reason of showing the credit note issued?