I think in the latest version - there seems to be an issue with Credit Note - Rate Adjustment Entry option.
When we try to create a credit note form the sales invoice - by entering qty as zero and entering the rate in negative number - the total amount comes in positive as seen below
if we enter the rate in a positive number - we get an error that the rate cant be more than sales invoice rate.
If directly do a rate adjustment entry by referencing the sales invoice with zero qty - it is again a positive number and the amount gets added up as shown in the ledger.
Note : This flag is generally used to indicate that the transaction is a credit note. A credit note is typically issued when you need to reduce the amount receivable from a customer, often in cases of returns, discounts, or overbilling.
To generate Credit Note for Sales Invoice:-
Use → Is Rate Adjustment Flag: → Debit Note → Increases Accounts Receivable
Note:- This flag is generally used in debit notes and is meant for adjusting the rates on previously issued invoices. When you need to increase the receivable amount (e.g., due to a pricing error or additional charges), a debit note with the “Is Rate Adjustment” flag is applied.
Solution Note :- In your use case you can follow Option 1, i.e Is Return Flag under sales invoice and generate credit note to reduce the receivables from Customer