Under the accrual basis of accounting, revenues and accounts receivable are recorded when a company sells products or earns fees by providing services on credit. At the point of delivering the goods or services, the company debits Accounts Receivable and credits Sales Revenues or Service Revenues. When an account receivable is collected 30 days later, the asset account Accounts Receivable is reduced and the asset account Cash is increased. No revenue account is involved at the time of collection.
Your question brings to light the difference between a receipt and a revenue. Cash receipts from collecting accounts receivable or from the proceeds of a bank loan are not revenues. Revenues are amounts that companies earn through their operations by selling products or providing services (whether or not cash is received at the time of the sale or service).