Answer:
May-15. Dr Merchandise inventory 40000
Cr Accounts payable 40000
( To record purchase of inventory)
May-17. Dr Merchandise inventory 310
Cash 310
(To record payment of freight of shipment)
May-20. Dr Accounts payable 800
Cr Merchandise inventory 800
( To record purchase return of inventory)
May-24. Dr Accounts payable (40000-800) 39200
Cr Cash 39200
( To record payment in full of inventory purchase)