Solve the below problem:
Q: For the current year, the following data were taken from the accounting records: Sales, $900,000; Sales Returns Allowances, $30,000; Purchases $500,000; Purchase Returns and Allowances, $8,000; Purchase Discounts, $4,000; Freight-In, $2,000; Beginning Inventory, $90,000; Ending Inventory, $130,000. What was the cost of goods purchased?