A few comments need to be made about accounts receivable:
Generally accepted accounting principles dictate that revenues are not recorded unless collection is reasonably assured. The way this is handled in practicality is to record the full amount of revenue and an allowance, or estimate of the amount that will not be collected. Setting up the allowance debits the revenue account and credits the allowance account, a contra-account to the receivable account.
The amount of the allowance may be determined in a number of ways: for example by the analysis of individual amounts owed; or by applying a percentage based on past experience with aged amounts. The amount of the allowance should be based on information known at the time of review, as opposed to information known at the balance sheet date or some earlier date.
Any amount owed that is known to be uncollectible should be written off. A subsequent recovery of an amount previously written off would be credited to income, or against the allowance, reversing the original write-down.