Under the accrual basis of accounting, revenue is recognized only when it is earned, not when cash is received. An advance from customers represents a liability (unearned revenue) until the goods are delivered or services are provided, at which point the sale is recognized.