I like my Cost of Goods Sold (COGS) account to be clean - ie actual product sales only. So I have separate general ledger accounts (in QuickBooks: Accounts) for anything that's COGS related, but not to an actual product sale. I group them under Heading categories for Shipping Expenses, Processing Expenses, and Product Expenses:
Shipping - Freight Out
Shipping - PC Postage
Shipping - Problems - Inventory
Shipping - Problems - Refunds
Shipping - Problems - Shipping
Shipping - Supplies
Shipping and Delivery Income
Processing - Problems - Inventory
Processing - Problems - Refunds
Processing - Problems - Shipping
Product - Problems - Inventory
Product - Problems - Refunds
Product - Problems - Shipping
Product - Freight In
Product - Inventory Adj
Product - Printing
These accounts allow me to put the blame in the right place. If the post office messed up, it's 'Shipping - Problems -___'. If I messed up packing the order, it's 'Processing - Problems -___'. If the product was defective, it's 'Product - Problems -___'.
'___- Inventory' is for the cost of the replacement items shipped out. '___- Shipping' is for the shipping cost to ship the replacement. '___- Refunds' is for when the customer chooses refund instead of replacement.
(I include Refunds and actual shipping receipts (Shipping and Delivery Income) with COGS - because I like to see them netted out against the other shipping expenses, to see if I cover. Most companies have Refunds and 'Shipping and Delivery Income' included with Sales (Sales and Returns) instead. And a lot of companies put Shipping Expenses in the Selling Expenses section of their Income Statement. I include them with COGS instead.)
Whenever I ship a replacement, I process it like a normal order, with zero for the sale amount. Of course, that hits COGS with the cost of the inventory shipped. That's no good, so I enter two inventory adjustments (in QB: Adjust Quantity/Value On Hand) to correct:
If it was 10 widgets replaced: First receive in 10 widgets to reverse the first transaction, posting to account: 'Cost of Goods Sold' (or whatever account you use for COGS). Then reduce inventory by 10 widgets, posting to account: 'Shipping - Problems - Inventory', 'Processing - Problems - Inventory', or 'Product - Problems - Inventory'. This expenses the inventory to the correct Problems account. QB allows you to attach a customer to the trx, so I do that. That allows you to go to that customer's record and see how much extra they cost you.
When printing the replacement's shipping label, I add a note for that shipment - either 'shipping problems', 'processing problems', or 'product problems'. That way, when I'm doing my accounting, I see the note and charge it to either: 'Shipping - Problems - Shipping', 'Processing - Problems - Shipping', or 'Product - Problems - Shipping'. I also attach the customer to the trx there in QB.
I'm small (just me). So it's no problem to do the two inventory adjustments. In your case, you could add a special note on replacement orders. So the order processor would then perform the two inventory adjustments, at time of shipping. Or you could do it later. If you don't like that, you could instead create special inventory Items for items that are replacements - specifying the '___- Problems - Inventory' accounts for those inventory Items (instead of COGS). Then there would be no extra work on the part of the processor. But that's too messy for me. I would rather do the two inventory adjustments.
By doing this, you keep replacement costs out of COGS. Plus you have general ledger accounts that keep track of the problem shipments and who's responsible for the problems - which you can run a detail report on if you want. If you really wanted to, in QB you could add notes in the Memo fields, things like 'Bob miscounted'. These notes would appear in reports. Or if you needed to break down the 'Processing - Problems -___' accounts into vendors (for instance), you could assign each vendor a Class (in QB). Then when posting the replacements, you could select that vendor's Class - and run reports later on each Class.
Actually, now that I mention Classes, you could use that method to track problems instead (instead of inventory adjustments above). Each problem type gets a Class (that you can run reports on). Then when the processor processes the replacement, he/she selects the appropriate class (in QB). The only problem with that method is that your COGS number is mucked with the replacement stuff. Most people don't care about that - and if you needed to, you could manually back out the replacements, based on the Class reports.
Dang this just got longer and longer as I typed it. Sorry about that!