Hi Naveen,
When you do the GR of PO the entry is
Debit Stock Account
Credit GR/IR Clearing Account
and when you do the IR of PO the entry is
Debit GR/IR Clearing Account
Credit Vendor Account
When you raise the Credit memo the above entries got reversed.
Credit GR/IR Clearing Account
Debit Vendor Account
Credit Stock Account
Debit GR/IR Clearing Account
I hope this will help you.
Regards
Hammad