Explain how companies recognize accounts receivable

Explain how companies recognize accounts receivable. How would you describe the entries to record the disposition of accounts receivables? What is their function? How are bad debts accounted for under the direct write-off method? What are the advantages and disadvantages of this method?