A refund and a restock are two different events. You hand money back to the customer. You also put parts back on your shelf. Your books need to record both. One entry fixes the cash. The other entry fixes your inventory count.
This matters because your inventory system and your bank balance drift apart if you only record one of them. The customer sees a refund. You see less cash in the account. But the parts are physically back in your store. If your stock count does not rise to meet them, your reorder point lies to you. You buy more parts than you need. Or you run out at the worst time.
The OpenStax principles of accounting textbook walks through exactly this kind of return in its perpetual inventory section. It shows a company that sold goods, took the money, then accepted the goods back and paid the customer in full. The textbook records the refund and the restock as two separate entries on the same date. That is the pattern we are copying here.