On October 5, Metlock Company buys merchandise on account from Ivanhoe Company. The selling price of the goods is $5,240, and the cost to Ivanhoe Company is $3,180. On October 8, Metlock returned defective goods with a selling price of $640 and a scrap value of $310. Record the transactions of Metlock Company, assuming a perpetual approach.