The scenario for Accounts Receivable, reversed, reflects how Accounts Payables work; just switch customer with supplier, and watch the roles reverse.
If we buy materials "on account," accrual accounting requires that we record that we incur the expense immediately, and rather than reducing cash, we put the "credit" into the Accounts Payable account.
Three weeks later, the invoice comes in, and we issue a payment, and so Debit AP, Credit Cash.