At entering credit note.qty add to inventry. But value not add to inventory.that inventory have no opening balance
If the inventory item has no opening balance, zero stock on hand, then the inventory item also has a zero Average Cost figure, so therefore the credit note has no monetary value in which to multiple against to create a “Cost of Sales” adjustment value.
Inventory item with zero values
Credit Note account line
Inventory item with adjust quantity
Cost of Sales account
So this means you “purchased” that inventory item for no cost which is what you have done - you haven’t outlaid any money to acquire that inventory. So the accounting is correct. The credit note is refunding the customer - giving their money back to them.