跳到主要内容

4 篇博文 含有标签「cash flow」

查看所有标签

Can I Afford to Hire an Employee?

· 阅读需 10 分钟
Mike Thrift
Mike Thrift
Marketing Manager

A Beancount‑first guide to modeling the real cost, testing cash flow, and wiring it into your ledger.

Hiring your first employee is a massive step. It’s a bet on your future, but it’s also a significant financial commitment that goes far beyond the number on an offer letter. Too many founders and small business owners get this wrong by fixating on salary alone, only to be surprised by the true, "fully-loaded" cost.

2025-08-22-can-i-afford-to-hire-an-employee

This guide will walk you through how to model that cost accurately, test whether you can actually afford it, and then wire that model directly into your Beancount ledger to de-risk the decision before you post the job.

The TL;DR

  • Don’t stop at salary. In the U.S., the real cost includes employer payroll taxes (Social Security, Medicare, FUTA/SUTA), benefits, insurance, tools, and recruiting. For private industry, benefits alone average ~30% of total compensation, which suggests a ~1.42× “fully loaded” multiplier on top of wages. This can vary widely by company and location.
  • A quick rule-of-thumb to start: Fully Loaded Cost ≈ Salary + Employer Payroll Taxes + Benefits + Insurance + Tools/Software + Recruiting/Ramp.
  • Use Beancount to de‑risk the decision. Model a monthly payroll budget in your ledger using Fava's budget feature. You can then run a forecast to check your runway, margins, and the payback period for the role before you commit.

1) What Actually Drives “Fully‑Loaded” Cost?

Think of an employee's salary as the tip of an iceberg. The visible part is straightforward, but the submerged costs are what can sink your cash flow if you're not prepared. Here’s the breakdown.

  • Base Pay (Wages/Salary): This is the easy part—the agreed-upon annual salary or hourly wage. It's the biggest line item, but it's just the starting point.

  • Employer Payroll Taxes (U.S.): You don't just pay your employee; you also have to pay taxes on their wages. As the employer, you are responsible for:

    • Social Security (OASDI): You pay 6.2% of an employee's wages up to an annual cap. For 2025, that wage base is $176,100.
    • Medicare (HI): You pay 1.45% of all employee wages, with no income cap.
    • Unemployment Taxes (FUTA & SUTA): Federal Unemployment Tax Act (FUTA) is 6.0% on the first $7,000 of wages. However, most employers receive a credit for paying state unemployment taxes (SUTA), bringing the effective FUTA rate down to 0.6%. SUTA rates vary significantly by state and your company's history.
  • Benefits: This is often the second-largest cost. It includes things like health insurance, retirement contributions (e.g., a 401(k) match), and paid leave. Across U.S. private industry, benefits average about 30% of total compensation. For perspective, the average annual premium for employer-sponsored health insurance in 2024 was $8,951 for single coverage and $25,572 for family coverage. While employees contribute, the employer typically covers the lion's share.

  • Workers’ Compensation Insurance: This is legally required in nearly every state and covers medical costs and lost wages if an employee is injured on the job. The rates depend on your state, industry, and the employee's role (an office worker is much cheaper to insure than a roofer). Don't budget zero for this.

  • Tools & Overhead: Your new hire needs the right equipment to do their job. This includes a laptop, software licenses (SaaS seats), a desk if you have an office, and payroll processing software itself. A typical payroll service for a small business runs around $49–$50 per month as a base fee, plus $6–$10 per employee.

  • Recruiting & Ramp-up: Don't forget the one-time costs. This includes fees for job postings, your own time spent interviewing, and most importantly, the ramp-up period. A new hire may take 1–3 months to reach full productivity, during which you're paying their full cost for partial output.


2) A Concrete Example

Let's make this tangible. Imagine you're hiring a U.S.-based employee at an $80,000 salary. You plan to offer single-coverage health insurance, covering the national average employer share of ~84% of the premium.

Here’s how the annual cost breaks down:

  • Employer Payroll Taxes:

    • Social Security (OASDI): $80,000 \times 6.2% = $4,960$
    • Medicare: $80,000 \times 1.45% = $1,160$
    • FUTA (at effective rate): $7,000 \times 0.6% = $42$
    • Total Employer Payroll Taxes: $6,162
  • Health Insurance (Your Share):

    • Using the 2024 average premium for single coverage ($8,951) and your 84% contribution: 8,951×0.84=**$7,519 per year** (or $˜627/month)8,951 \times 0.84 = \text{**\$7,519 per year** (or \~\$627/month)}.
  • Payroll Software & Tools:

    • Payroll Software: ($50 base + $6/employee) × 12 months = ~$672 per year.
    • Tools/Laptop/SaaS (estimated): $2,000 per year.

Let's add it all up:

ItemAnnual Cost
Salary$80,000
Employer Payroll Taxes$6,162
Health Insurance$7,519
Payroll Software$672
Tools & Laptop$2,000
Total Annual Cost$96,353
Monthly Cost~$8,029

In this scenario, the fully-loaded cost is $96,353, which is 1.20× the base salary. This is a relatively lean benefits package. If you offered a 401(k) match, more generous paid leave, or family health coverage, you could easily approach the national average multiplier of ~1.42×. For an $80k salary, that would imply a total cost closer to $113,800.

The Takeaway: Your true cost will likely be between 1.20× (lean) and 1.40×+ (richer) of the base salary. Run your own numbers to find out.


3) “Can I Afford It?”—Three Pragmatic Tests

Now that you have a realistic monthly cost (~$8,029 in our example), how do you know if you can sustain it?

  1. Gross-Margin Coverage: Does the role pay for itself? If your business has a 65% gross margin, your new hire needs to generate at least $12,352 in new monthly revenue ($8,029 ÷ 0.65) just to break even. If the role is designed to save costs, it needs to find equivalent, durable expense reductions.

  2. Payback & Runway: How long until the hire generates a positive return, and can you survive until then? Aim for a 6–12 month payback period on the role's business case—the shorter, the safer. Crucially, you should have at least 3–6 months of the fully-loaded cost in cash as a buffer after accounting for the ramp-up period.

  3. Ramp Reality: A new hire won't be 100% effective on day one. Budget for 1–3 months of onboarding and lower productivity. If your cash cushion can't cover both their salary and the initial productivity dip, you're not ready. Consider starting with a contractor or part-time employee to validate the need first.

A U.S.-Specific Note: If this is your first hire or your first hire in a new state, double-check your compliance requirements. FUTA credit reductions can apply in certain states, and SUTA rates vary wildly. Workers' compensation laws also differ. Getting this wrong can lead to penalties.


4) Make the Model Real in Beancount

The best way to know if you can afford a hire is to see the impact directly in your books. Here’s how to do it with Beancount.

A. Set a Payroll Budget with Fava

Before anything else, add the projected monthly costs to your ledger using Fava's custom "budget" directive. This lets you visualize the new expense against your income.

; Budgeting for one employee at ~$96k/year fully-loaded cost
2025-09-01 custom "budget" Expenses:Payroll:Wages "monthly" 6666.67 USD
2025-09-01 custom "budget" Expenses:Payroll:Taxes:Employer "monthly" 513.50 USD
2025-09-01 custom "budget" Expenses:Benefits:HealthInsurance "monthly" 626.57 USD
2025-09-01 custom "budget" Expenses:Tools:PayrollSoftware "monthly" 55.00 USD

Once added, Fava’s Income Statement and Changes reports will automatically show you how you're tracking against this new, higher expense level.

B. Record an Actual Payroll Run

When you run payroll, you have two common ways to record it.

  • Detailed (with Liabilities): This is the most accurate method. It separates your employer taxes from employee withholdings, treating the latter as liabilities that you hold temporarily before remitting them to the government.
2025-09-30 * "Payroll - Alice (September)" ; Example withholdings for illustration
Expenses:Payroll:Wages 6666.67 USD
; Employer-side taxes (your direct cost)
Expenses:Payroll:Taxes:Employer:SocialSecurity 413.33 USD
Expenses:Payroll:Taxes:Employer:Medicare 96.67 USD
Expenses:Payroll:Taxes:Employer:FUTA 3.50 USD
; Employee withholdings (held as liabilities)
Liabilities:Payroll:Withholding:Federal -1000.00 USD
Liabilities:Payroll:Withholding:State -300.00 USD
Liabilities:Payroll:FICA:Employee:SocialSecurity -413.33 USD
Liabilities:Payroll:FICA:Employee:Medicare -96.67 USD
; Cash out to bank (net pay to employee)
Assets:Bank:Checking -4853.54 USD

Later, when your payroll provider withdraws the taxes, you'll record a separate transaction to clear the liabilities (e.g., Liabilities:Payroll:Withholding:Federal -> Assets:Bank:Checking).

  • Simplified (Lump-Sum): If your payroll provider debits your account in one combined transaction and you don't need to track the detailed liabilities, this is a simpler approach.
2025-09-30 * "Gusto payroll run - Alice"
Expenses:Payroll:Wages 6666.67 USD
Expenses:Payroll:Taxes:Employer 513.50 USD
Expenses:Payroll:Fees:Provider 55.00 USD
Assets:Bank:Checking -7235.17 USD

C. Forecast Your Runway

Structure your chart of accounts with a top-level Expenses:Payroll account. Use tags like employee: "Alice" on transactions to filter reports by person. With your budget in place, you can use Fava to overlay your plan versus actuals each month. If you find yourself consistently over budget, it’s time to rerun your affordability tests.


5) When Hiring Does and Doesn't Make Sense (Quick Checklist)

It likely makes sense if... ✅

  • You are turning away profitable work or delaying product launches due to a lack of capacity.
  • You can clearly define a revenue target or cost-savings goal that the new hire will be responsible for.
  • Your cash runway comfortably covers the 1–3 month ramp-up period plus an additional 3–6 months of the fully-loaded cost.

You should probably wait if... 🛑

  • Demand for your work is spiky and unpredictable. Start with a contractor or part-time help to manage the variable workload first.
  • You can achieve the same goals by buying a better tool or automating a process for a fraction of the cost.
  • You can't tie the role to a measurable business outcome. "I'm feeling busy" is not a business case.

Reference Numbers (U.S., 2025)

  • Social Security Wage Base: $176,100
  • Employer Tax Rates: 6.2% for Social Security (on wages up to the base), 1.45% for Medicare (no cap).
  • FUTA Tax Rate: 6.0% on the first $7,000 of wages, but typically 0.6% effective after state tax credits.
  • Benefits as Share of Compensation: Averages ~29.7% in U.S. private industry, implying a ~1.42× average multiplier on wages.
  • Avg. Health Premiums (2024): $8,951 for single coverage / $25,572 for family.
  • Workers’ Comp: Required in nearly every state; rules and rates vary.
  • Payroll Software Cost: Ballpark $49–$50 base fee + $6–$10 per employee, per month.

A Note on Compliance

This guide is for modeling financial costs. Actually hiring an employee involves legal and administrative compliance. You'll need to set up federal and state payroll tax accounts, verify employment eligibility (Form I-9), have employees fill out tax forms (W-4), and comply with state-specific new-hire reporting and local tax laws. Always consult official resources from the IRS, SSA, and your state's department of labor.


Final Thought

Hiring is an investment, and the best investors do their homework. Before you write the job description or post on LinkedIn, put the hire into your Beancount ledger. Model it as a budget and forecast the impact on your cash. If the numbers hold up in your own books, you’re ready to hire with confidence.


Recent Reporting & Context

The Top Trucking Accounting Software (2025 Guide)

· 阅读需 10 分钟
Mike Thrift
Mike Thrift
Marketing Manager

For carriers, fleets, and owner-operators.

Choosing the right accounting software can mean the difference between knowing your cost-per-mile to the penny and drowning in a sea of fuel receipts and settlement sheets. Your business isn't just about moving freight; it's about managing cash flow, automating IFTA filings, and ensuring drivers are paid accurately and on time.

2025-08-17-he-top-trucking-accounting-software-2025-guide

This guide cuts through the noise to help you find the best trucking-specific accounting software for your operation, whether you're a solo owner-operator or a growing fleet.


TL;DR — Quick Picks

In a hurry? Here are our top recommendations for 2025.

  • Best All-in-One (Accounting + Ops): Frontline Q7 — A fully integrated suite for dispatch, accounting, and payroll, available on-premise or in the cloud.
  • Runner-Up All-in-One: Axon — Real-time, fully integrated trucking accounting that links every part of your business, with optional managed cloud hosting.
  • Best “TMS + Accounting” Combo (Small to Mid-Size): TruckLogics + QuickBooks Online — A powerful combination for dispatch, IFTA, and industry-standard accounting via a seamless QuickBooks integration.
  • Best Value for Owner-Operators: Rigbooks — Excellent cost-per-mile tracking and IFTA helpers, with simple plans starting at just $19/month.
  • Lightweight & Free: TruckBytes — A solid starter option for basic invoicing, trip reports, and IFTA paperwork when you're just getting started.
  • Top TMS with Strong Accounting Links: TruckingOffice, Tailwind, and ProTransport — All offer robust TMS features and sync smoothly with QuickBooks, adding critical IFTA, ELD, and fuel-card workflows.
  • DIY/Open-Source Stack: Beancount + Fava — A plain-text, double-entry accounting system with a modern web UI. It offers maximum control and auditability for those with some technical comfort.

What to Look For (And Why It Matters)

Trucking isn't generic, and your accounting software shouldn't be either. Here are the key features to prioritize.

  • End-to-End Integration Accounting shouldn't be an island. Your financial data should tie directly to dispatch, driver settlements, maintenance, and fuel taxes so you aren’t wasting hours on manual data entry. Look for systems with native modules for these functions or, at a minimum, robust integrations with your existing tools like ELDs, fuel cards, factoring services, and EDI.

  • IFTA Automation Quarterly IFTA fuel tax filing is a time-consuming and error-prone headache. Good software automates this by importing distance and fuel data directly from your ELDs and fuel cards, keeping state tax rates current, and generating file-ready reports. This feature alone can save you days of work each year.

  • Driver Settlements & Payroll Trucking has unique pay structures that generic payroll systems can't handle. Your software should natively support rules for per-mile pay, per-load percentages, accessorials (like detention and layover pay), and deductions. This reduces spreadsheet gymnastics and ensures your drivers are paid correctly and on time.

  • Bank Feeds & Reconciliation A real-time view of your cash flow is non-negotiable. Whether you use a built-in accounting module or connect to a platform like QuickBooks or Xero, automated bank feeds and fast reconciliation tools are essential for keeping your financial picture current.

  • Cloud Access & Mobile Your business doesn't stop when you're away from the office. Field teams, drivers, and outside accountants need secure, anywhere access. Most modern suites now offer cloud-based hosting or browser access, which is critical for a distributed operation.


The Best Trucking Accounting Software (By Use Case)

1) Fully Integrated Suites (Accounting + TMS in One)

These platforms aim to be the single source of truth for your entire operation.

  • Frontline Q7 (Best Overall All-in-One) Q7 combines dispatch, fleet management, a full accounting suite (AP/AR/GL), and payroll into one unified system. It offers deep integrations with fuel cards, ELDs, and EDI partners. Q7 is a great fit if you want one system of record to run your business, and it’s available as either site-licensed software or a cloud-based subscription for 24/7 access.

  • Axon (Runner-Up All-in-One) Axon’s "real-time" architecture is its standout feature—an entry in dispatch instantly ripples through to driver pay, IFTA reports, and your general ledger. This eliminates data silos and ensures everyone is working with the same information. The company also offers managed cloud hosting, which is ideal for distributed teams. Expect a demo-driven sales process to tailor the system to your needs.

2) TMS-First Tools That Play Nicely with Small-Business Accounting

These tools handle the trucking-specific work and integrate with standard accounting software.

  • TruckLogics + QuickBooks Online This is a powerful and popular combination for small to mid-sized fleets (1–20 trucks). TruckLogics excels at dispatch, expense tracking, maintenance logs, and IFTA. Its native QuickBooks integration syncs customers, invoices, and payments, cutting out double entry and letting your accountant work in the tool they know best.

  • Tailwind TMS + QuickBooks Online Tailwind builds invoicing and AP/AR management directly inside its TMS, then syncs the financial data with QuickBooks Online for full general ledger accounting. This approach suits carriers and brokers who want to optimize their operational workflows without forcing their accountant to learn a new system.

  • ProTransport (by RTS) + QuickBooks ProTransport centralizes dispatch, safety, driver communication, and reporting. It's known for its strong integrations with fuel cards, major ELD providers (like Motive and Transflo), and QuickBooks. The system uses your existing trip and fuel data to streamline IFTA preparation, making it a great choice for growing fleets looking to standardize their processes.

  • TruckingOffice + QuickBooks TruckingOffice is a practical and user-friendly TMS designed for smaller fleets. It offers PC*MILER-powered mileage calculations, dispatch, invoicing, and IFTA reports, all of which can be synced with QuickBooks. With transparent pricing and a 30-day free trial, it’s an accessible way to professionalize your operations.

3) Owner-Operator Friendly

These tools are built for the specific needs of a solo operator or very small fleet.

  • Rigbooks (Best Value) Rigbooks is laser-focused on helping you know your true cost per mile. It makes it easy to track loads, expenses, and fuel while providing simple workflows to prepare for IFTA. With pricing that starts at just $19/month, it's a fantastic choice if you want financial clarity without the complexity of an enterprise system.

  • TruckBytes (Free) A long-running and respected free option, TruckBytes provides the essentials for getting started. It handles basic invoicing, trip reports, and the paperwork you need for IFTA. It’s an invaluable tool when you're just starting out and need to watch every dollar.

4) "General Accounting + TMS" Paths

These combinations leverage best-in-class general accounting software.

  • QuickBooks Online + Your TMS QuickBooks provides world-class bank feeds, reconciliation, cash-flow tools, and reporting. You can pair it with a trucking-specific TMS like TruckingOffice, Tailwind, or TruckLogics to add the operational workflows you need.

  • Xero + MyTrucking If your accountant prefers Xero, this combo is a great alternative. MyTrucking is a transport management tool that pushes invoices directly into Xero. It also supports handy trucking-specific touches like fuel levies and attaching proof-of-delivery dockets and signatures to invoices.

5) Open-Source, Developer-Friendly Alternative

  • Beancount + Fava (for teams who want full control) For the technically inclined, this is the path to ultimate control and data ownership. Beancount is a plain-text, double-entry accounting system, and Fava provides a modern web interface for it. You get transparent ledgers that can be version-controlled with Git, plus the freedom to script your own imports from banks, fuel cards, and TMS exports. This route trades some out-of-the-box convenience for unparalleled flexibility and auditability.

Pricing Notes (A Snapshot)

  • Transparent Pricing: Tools like TruckingOffice and Rigbooks publish their tiered pricing online and typically offer 30-day free trials.
  • Quote-Based: Enterprise suites like Q7, Axon, and ProTransport provide pricing after a personalized demo. When budgeting for these, be sure to ask about costs for onboarding, data migration, and ongoing support.

How to Choose (Fast Checklist)

  1. Map your existing stack. If your accountant already lives in QuickBooks, prioritize a TMS with a native QB sync like TruckLogics, Tailwind, ProTransport, or TruckingOffice.
  2. Score your IFTA effort. How painful is it today? Favor systems that automatically import miles and fuel and keep tax rates current.
  3. Test driver settlements. Make sure the software can handle your specific pay rules natively, not as a clunky workaround.
  4. Decide on hosting. Do you need browser-based access for a remote team? Confirm the availability of cloud or managed hosting options.

Beancount Corner (For beancount.io Readers)

If you prefer owning your ledger and building resilient, automated workflows, the Beancount path is highly rewarding.

  • Use Beancount as your general ledger. You can import CSVs from your bank, credit cards, and fuel cards. Use tags and metadata in your entries to track trips, tractors, trailers, and lanes.
  • Run Fava locally or on a server to get interactive reports, including standard income statements and balance sheets. You can also write custom queries to generate per-vehicle P&L statements.
  • Bridge your TMS by exporting load and settlement data to CSV and writing small, simple import scripts. This approach allows you to maintain a source-of-truth ledger without any vendor lock-in.

Final Word

The best advice is to pick the smallest system that solves the whole workflow you have today, then confirm it can scale to handle next year’s fleet size. For many growing fleets, that sweet spot is a dedicated TMS connected to QuickBooks or Xero. For larger, more established carriers, a fully integrated suite like Q7 or Axon is often worth the investment in consolidation.

And if you’re a technical founder who values long-term control and data ownership, a disciplined Beancount + Fava setup is a credible and extremely low-cost path to a robust financial system.


Sources Referenced

Understanding Accounts Receivable (A Beancount Guide)

· 阅读需 8 分钟
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)

使用 Beancount 制作和追踪发票

· 阅读需 6 分钟
Mike Thrift
Mike Thrift
Marketing Manager

一个纯文本模板、一个可重复的工作流程和一个简单的查询,即可解答“还有谁欠我钱?”


2022-02-12-crafting-tracking-invoices-with-beancount

开票工作有时感觉像是一件苦差事,卡在你已完成的工作和你正在等待的付款之间。 但是,良好的开票流程是健康现金流的支柱。 它具有双重作用:清晰地告知你的客户他们欠款多少以及何时付款,并为你的会计系统提供其所需的可靠事实。

虽然专用的 SaaS 应用程序可以发送流畅的自动化 PDF 文件,但它们通常需要按月付费,并将你的数据锁定在专有孤岛中。 使用 Beancount 的轻量级纯文本方法提供了一个强大的替代方案。 你可以将每张发票转换为一组清晰的会计分录,从而获得版本控制、强大的元数据和即时查询的所有好处,而无需订阅。


最小可行发票(你永远不应该跳过的字段)

在接触你的账本之前,你需要一张专业的发票。 格式可以很简单,但内容必须精确。 这些借鉴久经考验的小企业实践的字段是不可协商的。

  • 卖方详细信息: 你的公司名称和实际地址。
  • 客户详细信息: 你的客户的名称和(理想情况下)他们的地址。
  • 发票编号: 一个唯一的、连续的 ID,永不重复使用。 INV-045 紧随 INV-044 之后。
  • 开票日期和到期日期: 清楚地说明发票的开具日期和预期付款日期。
  • 项目明细: 对服务或产品的清晰描述,以及数量、单价和项目总计。
  • 小计、税金和总计: 显示计算过程,以便客户可以轻松理解。
  • 可选注释: 用于感谢、汇款指示或客户提供的采购订单号。

为了帮助你入门,我们创建了一组可立即编辑的模板,其中包含所有这些字段。 电子表格版本甚至会为你预先计算总计。

Note: Invoice templates are coming soon! In the meantime, you can create your own using the fields listed above in Google Docs, Word, Sheets, Excel, or any other document format.


在你的账本中记录发票

将发票 PDF 发送给客户后,你必须将其记录在 Beancount 中。 这是一个至关重要的步骤,它在收入产生时确认收入,而不仅仅是在收到付款时。 该过程涉及两个不同的交易。

1. 开具发票时:

你创建一个交易,将总金额从你的 Income 账户转移到 Assets:AccountsReceivable。 这会在你的账簿中创建一个数字借据。

; 2025‑07‑21 发票 #045  为 Acme Corp. 进行的网页设计冲刺
2025-07-21 * "Acme Corp" "INV-045 网页设计冲刺"
Assets:AccountsReceivable 3500.00 USD ; due:2025-08-04
Income:Design:Web
invoice_id: "INV-045"
contact_email: "ap@acme.example"
link: "docs/invoices/2025-07-21_Acme_INV-045.pdf"

在这里,你借记 AccountsReceivable 并贷记你的 Income 账户。 请注意丰富的元数据:到期日期、唯一的 invoice_id,甚至直接指向你发送的 PDF 的 link:

2. 客户付款时:

当现金存入你的银行账户时,你记录第二个交易以“结清”借据。 这会将余额从 AccountsReceivable 转移到你的支票账户。

2025-08-01 * "Acme Corp" "INV-045 付款"
Assets:Bank:Checking 3500.00 USD
Assets:AccountsReceivable
invoice_id: "INV-045"

Assets:AccountsReceivableINV-045 的余额现在为零,你的账簿完全平衡。

附加 PDF: link: 元数据键与 Fava(Beancount 的 Web 界面)一起使用时尤其强大。 Fava 将直接在交易视图中呈现可点击的链接,因此只需点击一下即可访问源文档。 此工作流程早在 2016 年就在一项功能请求中设想 (GitHub)。


一个查询即可列出所有未结发票

那么,还有谁欠你钱? 使用此系统,你无需在电子邮件或电子表格中查找。 你只需要一个简单的查询。

将以下内容保存为名为 open-invoices.sql 的文件:

SELECT
meta('invoice_id') AS id,
payee,
narration,
date,
number(balance) AS outstanding
WHERE
account = "Assets:AccountsReceivable"
AND balance != 0
ORDER BY
date;

现在,从你的命令行运行它:

bean-query books.beancount open-invoices.sql

几秒钟内,你将获得一份清晰的、最新的所有未结发票的账龄报告,其中显示发票 ID、客户、开票日期和欠款金额。 无需额外的软件。


自动化繁琐的工作

纯文本的优点在于可编写脚本。 你可以自动化此工作流程中繁琐的部分。

  • 模板 + Pandoc = PDF: 以 Markdown 格式维护你的发票模板。 一个小型 Python 脚本可以填充变量(客户名称、项目明细、发票编号),命令行工具 Pandoc 可以立即将其转换为专业的 PDF。
  • Git 预提交钩子: 如果你将账本存储在 Git 中,一个简单的预提交钩子可以在你保存工作之前运行检查。 它可以验证每个新的 invoice_id 是否唯一,交易过账是否平衡为零,以及 link: 元数据中引用的文件是否实际存在。
  • Cron 作业: 设置计划任务(cron 作业)以每晚运行你的 open-invoices.sql 查询并通过电子邮件向你发送摘要。 你将每天开始工作时确切地知道谁需要友好的提醒。

现实的警告

Beancount 是一个会计工具,而不是开票_服务_。 它不会自动向你的客户发送付款提醒或处理他们的信用卡付款。 工作流程是:你使用你选择的方法(例如上面的模板)创建并发送发票,然后在你的账本中记录会计分录。

对于大多数自由职业者和小商店来说,这个手动步骤对于一个完全拥有和控制的、防弹的、可审计的免费会计系统来说是一个很小的代价 (beancount.io)。


后续步骤

准备好控制你的开票了吗? 以下是开始的方法。

  1. 下载模板并使用它创建你的下一个真实发票,确保使用连续的发票编号。
  2. 将你发送的 PDF存储在专用文件夹中,例如 docs/invoices/,并在你的 Beancount 交易中使用 link: 元数据键来引用它们。
  3. 保存 open-invoices.sql 查询并将其作为你每周财务审查的一部分运行。

纯文本会计并不意味着放弃完善或控制——它只是意味着数据库是可 grep 的。 使用简单的模板和上面的代码片段,你将更快地获得付款_并且_保持你的账簿整洁。