Skip to main content

3 posts tagged with "accounts receivable"

View all tags

Understanding Accounts Receivable (A Beancount Guide)

· 8 min read
Mike Thrift
Mike Thrift
Marketing Manager

If you run a business that bills clients, you need a rock-solid way to track who owes you money. This is where Accounts Receivable (AR) comes in. It’s more than just a number on a report; it’s the lifeblood of your cash flow.

This guide will walk you through what Accounts Receivable is, why it matters, and how to manage it with precision and clarity using the plain-text accounting system, Beancount.

2025-08-12-understanding-accounts-receivable


TL;DR

Accounts receivable (AR) is the money customers owe you for goods or services you’ve already delivered. It’s a current asset on your balance sheet, central to accrual accounting, and a key driver of your business's cash flow. You can track AR cleanly in Beancount by using customer sub-accounts, linking invoices to payments with ^links, and running a few simple queries. To measure your collection speed, you can calculate AR Turnover and Days Sales Outstanding (DSO). To handle risk, you can use an allowance for doubtful accounts.


What is Accounts Receivable?

Definition Accounts Receivable represents the balance of money due to your firm for goods or services delivered or used but not yet paid for by customers. Under accrual accounting, you recognize this revenue when you earn it, not when you receive the cash. As a result, AR appears as a current asset on your company's balance sheet.

Why It Matters Effectively managing your AR is critical for maintaining healthy liquidity. The faster you collect on your invoices, the shorter your cash conversion cycle—the time it takes to turn your investments in inventory and other resources back into cash. By monitoring metrics like AR Turnover and Days Sales Outstanding (DSO), you can get a clear picture of your collection efficiency and take action to improve it.

Accounts Receivable vs. Accounts Payable (One-Line Refresher)

  • AR = money owed to you (it's an asset).
  • AP = money you owe to others (it's a liability).

The Accounts Receivable Flow in Double-Entry Accounting

Conceptually, the lifecycle of a receivable follows these steps:

  1. Issuing an Invoice (Credit Sale): When you send an invoice, you increase your Assets (specifically, Accounts Receivable) and recognize the Income you've earned.
  2. Cash Collection: When the customer pays, you increase one asset (your Assets:Bank account) and decrease another (Assets:AR). The net effect on your total assets is zero, but your cash position improves.
  3. Discounts or Credits: If you offer an early-payment discount or issue a credit memo, you reduce the customer's AR balance and offset it with a discount expense or a reduction in revenue (contra-revenue).
  4. Bad Debts: Unfortunately, not all invoices get paid. To account for this, you can recognize an allowance for doubtful accounts (a contra-asset that reduces your AR's value) and a corresponding bad debt expense. Later, you can write off a specific uncollectible invoice against this allowance.

Modeling AR in Beancount

Beancount is a plain-text, double-entry accounting system that is perfectly suited for tracking AR. Its use of tags (which start with #), links (which start with ^), and a SQL-like query language (bean-query) makes your entire AR process transparent, auditable, and scriptable.

Suggested Account Structure

A clean chart of accounts is the foundation. Here’s a recommended structure:

Assets:AR
Assets:AR:Clients:<Name>
Assets:AR:Allowance ; A contra-asset account

Income:Sales
Income:Contra:SalesDiscounts ; An alternative to an expense account

Expenses:SalesDiscounts
Expenses:BadDebt

1. Record a Credit Sale (Issue an Invoice)

When you send an invoice to a client, you record it in your ledger.

2025-07-01 * "Acme Co." "Invoice 2025-045 · Web design" ^INV-2025-045 #ar #client:acme
invoice: "2025-045"
due: "2025-07-31"
document: "/invoices/2025/INV-2025-045.pdf"
Assets:AR:Clients:Acme-Co 1200.00 USD
Income:Sales -1200.00 USD
  • The ^INV-2025-045 link is a unique identifier that will tie this invoice to its future payment(s).
  • The document: metadata helps Fava (Beancount's web interface) render a clickable link directly to the invoice PDF.

2. Record Full Payment

When Acme Co. pays the invoice in full, you clear their receivable balance.

2025-07-25 * "Acme Co." "Payment for INV-2025-045" ^INV-2025-045 #ar
Assets:Bank:Checking 1200.00 USD
Assets:AR:Clients:Acme-Co -1200.00 USD

Using the same ^INV-2025-045 link creates a clear audit trail connecting the invoice and the payment.

3. Handling Partial Payments

If a client makes a partial payment, the process is the same. The link keeps everything connected.

2025-07-20 * "Acme Co." "Partial payment INV-2025-045" ^INV-2025-045 #ar
Assets:Bank:Checking 400.00 USD
Assets:AR:Clients:Acme-Co -400.00 USD

A query on ^INV-2025-045 would show the original 1200invoiceandthis1200 invoice and this 400 payment, leaving an $800 balance.

4. Handling an Early-Payment Discount

Let's say you offer a 2% discount on a $1000 invoice if paid early.

2025-07-10 * "Acme Co." "2% early-payment discount on INV-2025-046" ^INV-2025-046 #ar
Assets:Bank:Checking 980.00 USD
Expenses:SalesDiscounts 20.00 USD
Assets:AR:Clients:Acme-Co -1000.00 USD

Here, you clear the full 1000receivable,recordthe1000 receivable, record the 980 cash received, and book the $20 discount as an expense. Note: Many ledgers treat sales discounts as contra-revenue instead of an expense. Using an expense account is often simpler for smaller ledgers. The key is to choose one method and use it consistently.

5. Including Sales Tax on Invoices

If you collect sales tax, you record it as a liability at the time of invoicing.

2025-07-01 * "Acme Co." "INV-2025-047 · Hardware + tax" ^INV-2025-047 #ar
invoice: "2025-047"
due: "2025-07-31"
Assets:AR:Clients:Acme-Co 1100.00 USD
Income:Sales -1000.00 USD
Liabilities:Tax:Sales -100.00 USD

You've invoiced for 1100,recognized1100, recognized 1000 in revenue, and now owe $100 to the tax authority.

6. Handling Bad Debts (Allowance Method)

The allowance method is preferred under Generally Accepted Accounting Principles (GAAP) as it better matches expenses to revenues.

Step 1: Estimate and Create the Allowance (e.g., at Year-End) Based on historical data, you estimate a percentage of your receivables may be uncollectible.

2025-12-31 * "Allowance for doubtful accounts (2% of AR)"
Expenses:BadDebt 300.00 USD
Assets:AR:Allowance -300.00 USD

This creates a contra-asset account (Assets:AR:Allowance) that reduces the book value of your total receivables.

Step 2: Write Off a Specific Uncollectible Invoice Later When you are certain an invoice will not be paid, you write it off against the allowance.

2026-03-05 * "Write-off INV-2025-049 for Insolvent Client" ^INV-2025-049 #ar
Assets:AR:Allowance 1200.00 USD
Assets:AR:Clients:Insolvent-Client -1200.00 USD

Notice this transaction does not impact your expenses; the expense was already recognized when you created the allowance.


Minimal Reporting & Queries

You can get quick snapshots of your AR using Fava or bean-query.

Open Receivables by Customer

SELECT account, SUM(position)
WHERE account ~ '^Assets:AR'
GROUP BY account
ORDER BY account;

Journal of AR Activity for a Period

JOURNAL
WHERE account ~ '^Assets:AR'
AND date >= 2025-07-01 AND date < 2025-08-01;

Core AR Metrics (With Quick Formulas)

For these ratios, a practical approach is to use bean-query to export the necessary numbers (period sales, beginning/ending AR balances) and then perform the calculations in a spreadsheet or a script. This keeps your ledger clean and your math explicit.

AR Turnover Ratio

This measures how many times per period your business collects its average accounts receivable. Higher is better.

ARTurnover=fracNetCreditSalesAverageARAR\\ Turnover = \\frac{Net\\ Credit\\ Sales}{Average\\ AR}

DSO (Days Sales Outstanding)

This tells you the average number of days it takes to collect payment after a sale has been made. Lower is better.

DSO=(fracAccountsReceivableTotalCreditSales)timesNumberofDaysDSO = (\\frac{Accounts\\ Receivable}{Total\\ Credit\\ Sales}) \\times Number\\ of\\ Days

Together, these metrics indicate how efficiently you convert invoices into cash.


A Simple Beancount Starter File (Copy/Paste)

; --- Accounts ---------------------------------------------------------------
1970-01-01 open Assets:Bank:Checking USD
1970-01-01 open Assets:AR
1970-01-01 open Assets:AR:Clients:Acme-Co
1970-01-01 open Assets:AR:Allowance
1970-01-01 open Income:Sales
1970-01-01 open Expenses:SalesDiscounts
1970-01-01 open Expenses:BadDebt
1970-01-01 open Liabilities:Tax:Sales USD
; ---------------------------------------------------------------------------

; Example invoice
2025-07-01 * "Acme Co." "Invoice 2025-045 · Web design" ^INV-2025-045 #ar
invoice: "2025-045"
due: "2025-07-31"
document: "/invoices/2025/INV-2025-045.pdf"
Assets:AR:Clients:Acme-Co 1200.00 USD
Income:Sales -1200.00 USD

; Payment received
2025-07-25 * "Acme Co." "Payment INV-2025-045" ^INV-2025-045 #ar
Assets:Bank:Checking 1200.00 USD
Assets:AR:Clients:Acme-Co -1200.00 USD

Operational Tips to Keep AR Healthy

  • Set Clear Terms: Include the due date, late fee policies, and any early-payment discount terms on every invoice.
  • Link Everything: Use consistent ^INV-... links to tie invoices, payments, and credit memos together for a clear audit trail.
  • Attach Documents: Use the document: metadata to link to PDFs of invoices, purchase orders, and contracts.
  • Review Monthly: Check your open AR report at least once a month and follow up on past-due invoices. Watch your AR Turnover and DSO trends to spot problems early.

Further Reading (Sources Used)

Navigating Receivables in Beancount

· 3 min read
Mike Thrift
Mike Thrift
Marketing Manager

In the labyrinth of personal finance management, Beancount emerges as a beacon of clarity and precision for plain-text bookkeeping. Particularly when it comes to managing receivables—money expected from others—Beancount offers a structured approach to keep your financial records in impeccable order. This blog will guide you through the intricacies of tracking receivables, processing refunds, and managing unresolved transactions with Beancount. Whether you're returning a purchase, lending money, or awaiting a refund, this post is your roadmap to financial clarity.

Understanding Receivables in Beancount:

2024-02-17-navigating-receivables-beancount-guide

Receivables represent money that is owed to you. This could be from a variety of scenarios, such as after a shopping return awaiting a refund or when you lend money to someone. For instance, consider you've returned a watch strap to an online store like Amazon.com and are awaiting a refund. In Beancount, this transaction is recorded as money moving from your credit card liability to your assets as receivables:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

Managing Refunds:

Once the refund is processed and you receive the money, another transaction is recorded to offset the balance in Receivables. This ensures that your accounts reflect the money back in your possession:

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

Complete Transaction Cycle:

A complete in-and-out transaction involving receivables is combining both transactions above and showcased as follows, demonstrating a balanced account post-refund:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

Handling Unresolved Transactions:

For transactions where the refund or repayment has not yet been received, Beancount employs the #UNRESOLVED tag. This tag helps in identifying and tracking amounts that are still pending. For example:

2023-10-31 * "John Doe" "Lending Money" #UNRESOLVED
Liabilities:CreditCard:Chase -100.00 USD
Assets:Receivables

By focusing on transactions tagged as #UNRESOLVED, you can quickly ascertain which amounts are yet to be settled.

Maintaining a Zero Balance:

In a proper ledger, the sum of all transactions under the Assets:Receivables account, excluding those tagged with #UNRESOLVED, should ideally return to zero. This ensures that all expected funds have been accounted for, maintaining the integrity of your financial records.

For example, a valid ledger might look like this, with an unresolved transaction clearly marked, awaiting closure:

2023-10-31 * "Amazon.com" "[Return] Watch Strap"
Liabilities:CreditCard:Chase -12.00 USD
Assets:Receivables

2023-11-01 * "Amazon.com" "[Refund] Watch Strap"
Liabilities:CreditCard:Chase 12.00 USD
Assets:Receivables

2023-10-31 * "John Doe" "Lending Money" #UNRESOLVED
Liabilities:CreditCard:Chase -100.00 USD
Assets:Receivables

An invalid ledger is one where a transaction causes the Receivables account not to zero out, necessitating the #UNRESOLVED tag for correction.

Conclusion

Navigating receivables in Beancount doesn't have to be daunting. With a clear understanding of how to record transactions, manage refunds, and keep an eye on unresolved transactions, you can maintain accurate and reliable financial records. Embracing the structured approach of Beancount for receivables management not only simplifies your financial tracking but also brings peace of mind, knowing that every dime is accounted for. So, why not leverage the power of Beancount to make your financial management as smooth

Understanding Receivables and Payables in Beancount

· 3 min read
Mike Thrift
Mike Thrift
Marketing Manager

Hello everyone! In today's blog post, we're diving into the world of Beancount, a double-entry accounting tool that's loved by many for its simplicity and power. More specifically, we're going to talk about two key concepts: Receivables and Payables.

Understanding these terms is crucial to using Beancount (or any double-entry accounting system) effectively. But don't worry if you're a beginner - we're going to break it all down, step by step!

Receivables and Payables: The Basics

2023-05-30-receiveable-and-payable

In accounting, "receivables" and "payables" are terms used to track money that is owed. "Receivables" refers to money that others owe to you, while "payables" refers to money that you owe to others.

Let's take an example:

  1. Accounts Receivable (A/R): Suppose you own a bookstore and a customer buys a book on credit. The money they owe you for the book is an account receivable.

  2. Accounts Payable (A/P): On the flip side, imagine you order a new set of books from a publisher, but you don't pay for them upfront. The money you owe the publisher is an account payable.

In Beancount, these are typically tracked through corresponding accounts. The main benefit here is that it provides you with a clear and accurate picture of your financial position at any point in time.

Setting Up Receivables and Payables in Beancount

The structure of your Beancount file can be as simple or as complex as you need it to be. For receivables and payables, you'll likely want to create separate accounts under your Assets and Liabilities sections.

Here is a simple example:

1970-01-01 open Assets:AccountsReceivable
1970-01-01 open Liabilities:AccountsPayable

Tracking Transactions

Payee side

After setting up your accounts, you can track transactions that involve receivables and payables. Let's look at an example:

2023-05-29 * "Sold books to customer on credit"
Assets:AccountsReceivable 100 USD
Income:BookSales -100 USD

Here, you're adding $100 to your receivables because a customer owes you this amount. Simultaneously, you're reducing your income by the same amount to maintain the balance (since you haven't actually received the money yet).

When the customer eventually pays, you'll record it like this:

2023-06-01 * "Received payment from customer"
Assets:Bank:Savings 100 USD
Assets:AccountsReceivable -100 USD

Payer side

The same principle applies for payables, but with reversed signs:

2023-05-30 * "Bought books from publisher on credit"
Liabilities:AccountsPayable 200 USD
Expenses:BookPurchases -200 USD

And when you pay off your debt:

2023-06-02 * "Paid off debt to publisher"
Liabilities:AccountsPayable -200 USD
Assets:Bank:Checking 200 USD

Wrapping Up

Receivables and payables are at the heart of any accounting system. By accurately tracking these, you gain a comprehensive understanding of your financial health.

This is just a starting point, and Beancount is capable of much more. I hope this blog post helps clarify these important concepts. As always, happy accounting!