In a perpetual inventory system, recording a sale on account involves debiting which of the following accounts?
A、Only accounts receivable.
B、Accounts receivable and inventory.
C、Accounts receivable and cost of goods sold. 
D、Accounts receivable, cost of goods sold, and inventory.