Sub topic 16
How Accounting Software Automates Posting
This chapter assumes you can write a balanced journal entry, post it to T-accounts by hand, and prepare a trial balance. You should also know that a trial balance catches some posting errors and misses others. Here you will see which parts of that process software does for you, which checks it adds, and which mistakes it cannot catch.
What stays the same and what changes
Accounting software does not change the logic of double-entry bookkeeping. Every transaction still produces debits equal to credits. Every ledger account still has a normal balance. The trial balance is still a list of account balances.
What changes is who performs the clerical steps. By hand, you write the journal entry, copy each line to a ledger account, write a posting reference, and recompute the balance. In software, you enter the transaction once, and the software does the copying, referencing, and balancing.
| Manual step | In software |
|---|---|
| Write the journal entry | You fill in a form or import a bank file |
| Check that debits equal credits | The software refuses to save an unbalanced entry |
| Copy each line to a ledger account | Posting creates one ledger record per entry line |
| Write posting references | Each ledger record stores the entry number and line number |
| Recompute the running balance | The software sums records, so balances are never typed in |
| Add up the trial balance | A report totals every account on demand |
The posting pipeline
Most systems separate saving an entry from posting it. A saved entry is a draft. It can be edited or deleted and does not affect any report. Posting is the step that makes the entry permanent and moves its lines into the ledger.
Validation comes first and covers four checks:
- Every account code exists in the chart of accounts.
- Every line has a positive amount on exactly one side.
- The entry date falls in an open accounting period.
- Total debits equal total credits.
The last check is why a hand-written trial balance often shows a problem that software users rarely see. An entry whose two sides differ is rejected at the door, so it never reaches the ledger. This kind of error, called an out-of-balance posting, is the main thing a trial balance catches by hand.
A small working model
The script below mimics the pipeline. It stores amounts in whole cents, because floating-point dollars can drift by fractions of a cent. It validates before it writes anything, so a rejected entry leaves no partial postings. Ledger records are append-only, and a correction is a new entry that reverses the old one.
from collections import defaultdict
from dataclasses import dataclass
from itertools import count
CHART = { # code: (name, normal balance)
"1000": ("Cash", "debit"),
"1100": ("Accounts Receivable", "debit"),
"2000": ("Accounts Payable", "credit"),
"3000": ("Owner's Capital", "credit"),
"4000": ("Service Revenue", "credit"),
"5100": ("Rent Expense", "debit"),
}
def money(cents):
return f"{cents / 100:,.2f}"
@dataclass
class Line:
account: str
debit: int = 0
credit: int = 0
@dataclass
class Entry:
number: int
date: str
memo: str
lines: list
class Ledger:
def __init__(self):
self._numbers = count(1)
self.journal = []
self.postings = defaultdict(list) # account -> [(entry no, date, debit, credit)]
self.locked_through = "0000-00-00"
def post(self, date, memo, lines):
if date <= self.locked_through:
raise ValueError(f"period closed through {self.locked_through}")
for ln in lines:
if ln.account not in CHART:
raise ValueError(f"unknown account {ln.account}")
if ln.debit < 0 or ln.credit < 0 or (ln.debit > 0) == (ln.credit > 0):
raise ValueError("each line needs a positive amount on one side only")
debits = sum(ln.debit for ln in lines)
credits = sum(ln.credit for ln in lines)
if debits != credits:
raise ValueError(
f"debits {money(debits)} do not equal credits {money(credits)}")
entry = Entry(next(self._numbers), date, memo, lines)
self.journal.append(entry)
for ln in lines:
self.postings[ln.account].append((entry.number, date, ln.debit, ln.credit))
return entry
def reverse(self, number, date):
original = self.journal[number - 1]
swapped = [Line(ln.account, debit=ln.credit, credit=ln.debit)
for ln in original.lines]
return self.post(date, f"Reversal of entry #{number}", swapped)
def net(self, account):
return sum(p[2] - p[3] for p in self.postings[account])
def print_trial_balance(self):
total_dr = total_cr = 0
for code in sorted(CHART):
net = self.net(code)
if net == 0:
continue
dr, cr = (money(net), "") if net > 0 else ("", money(-net))
total_dr += max(net, 0)
total_cr += max(-net, 0)
print(f"{code} {CHART[code][0]:<22}{dr:>12}{cr:>12}")
print(f" {'Totals':<22}{money(total_dr):>12}{money(total_cr):>12}")
assert total_dr == total_cr
def print_running_balance(self, account):
sign = 1 if CHART[account][1] == "debit" else -1
balance = 0
for number, date, dr, cr in self.postings[account]:
balance += sign * (dr - cr)
print(f"#{number} | {date} | Dr {money(dr)} | Cr {money(cr)} | Bal {money(balance)}")
books = Ledger()
books.post("2026-01-02", "Owner invests cash",
[Line("1000", debit=1_000_000), Line("3000", credit=1_000_000)])
books.post("2026-01-09", "Services for cash and on account",
[Line("1000", debit=150_000), Line("1100", debit=250_000),
Line("4000", credit=400_000)])
# Mistake: rent debited to Accounts Payable instead of Rent Expense.
books.post("2026-01-15", "Pay rent",
[Line("2000", debit=120_000), Line("1000", credit=120_000)])
print("Before correction")
books.print_trial_balance()
books.reverse(3, "2026-01-20")
books.post("2026-01-20", "Pay rent (corrected)",
[Line("5100", debit=120_000), Line("1000", credit=120_000)])
print("\nAfter correction")
books.print_trial_balance()
print("\nCash account")
books.print_running_balance("1000")
try:
books.post("2026-01-21", "Typo", [Line("1000", debit=10_000), Line("4000", credit=9_000)])
except ValueError as err:
print("\nRejected:", err)
books.locked_through = "2026-01-31"
try:
books.post("2026-01-25", "Late entry", [Line("1000", debit=100), Line("4000", credit=100)])
except ValueError as err:
print("Rejected:", err)Running it prints:
Before correction
1000 Cash 10,300.00
1100 Accounts Receivable 2,500.00
2000 Accounts Payable 1,200.00
3000 Owner's Capital 10,000.00
4000 Service Revenue 4,000.00
Totals 14,000.00 14,000.00
After correction
1000 Cash 10,300.00
1100 Accounts Receivable 2,500.00
3000 Owner's Capital 10,000.00
4000 Service Revenue 4,000.00
5100 Rent Expense 1,200.00
Totals 14,000.00 14,000.00
Cash account
#1 | 2026-01-02 | Dr 10,000.00 | Cr 0.00 | Bal 10,000.00
#2 | 2026-01-09 | Dr 1,500.00 | Cr 0.00 | Bal 11,500.00
#3 | 2026-01-15 | Dr 0.00 | Cr 1,200.00 | Bal 10,300.00
#4 | 2026-01-20 | Dr 1,200.00 | Cr 0.00 | Bal 11,500.00
#5 | 2026-01-20 | Dr 0.00 | Cr 1,200.00 | Bal 10,300.00
Rejected: debits 100.00 do not equal credits 90.00
Rejected: period closed through 2026-01-31Reading the example
The trial balance before the correction is balanced, yet the books are wrong. Rent was debited to Accounts Payable, which gives that liability account a debit balance, the opposite of its normal credit balance. Software cannot know that the payment was for rent. It only knows that the entry balanced and that the account exists. This is the same limit you met with hand posting: the trial balance misses an error that puts a correct amount in the wrong account.
The correction follows the audit-trail rule. Entry #3 stays in the journal. Entry #4 reverses it by swapping every debit and credit, and entry #5 records the transaction correctly. The Cash account shows all three entries, and its running balance returns to 10,300.00. Deleting or editing entry #3 would have hidden what happened.
Posting references and audit trails
By hand, a posting reference is a page number written beside each ledger line. In software, the entry number is the posting reference. In the Cash listing, entry #3 in the ledger points to entry #3 in the journal, and the reverse also holds. Most products add the user who posted the entry, a timestamp, and the source document, such as an invoice number or a bank-feed line.
This is why mature systems do not let you delete a posted entry. They let you reverse it. The reversal and its replacement both stay in the history, and an auditor can follow every balance to the entries that produced it.
Subledgers and control accounts
Accounts Receivable in the general ledger is a single balance. Software also keeps a subsidiary ledger, with one record per customer, and treats the general ledger account as a control account. When you post a customer invoice, the software writes the debit to the control account and also to that customer's subledger record in the same operation. The subledger total should always equal the control account balance.
If the two disagree, someone has probably posted directly to the control account, bypassing the subledger. Many products block this by default. Where it is allowed, a reconciliation report shows the difference.
Automatic and recurring entries
Software also generates entries without anyone typing them. Common examples are:
- Recurring entries, such as monthly rent or depreciation.
- Bank-feed imports that become journal entries after you match them.
- Invoice and bill modules that post to receivables, payables, and revenue.
- Period-end reversals of accruals.
You should still review these. An automatic entry that uses the wrong account repeats the same error every month.
Period locks and corrections
Closing a period sets a lock date, as locked_through does in the script. Entries dated on or before the lock are rejected, so reports for closed months cannot change. If you find an error in a closed month, post the correction in the current open period. Some products allow an authorized user to reopen the period, and they log who did it.
Common mistakes
- Trusting a balanced trial balance as proof of accuracy. It only proves that total debits equal total credits.
- Editing or deleting a posted entry instead of reversing it, where the software allows this. It destroys the audit trail.
- Posting directly to a control account and leaving the subledger out of step.
- Entering a correction with a date inside a closed period and being surprised when it is rejected.
- Leaving a recurring entry pointed at the wrong account after a chart-of-accounts change.
Exercise
In the script, entry #3 debited Accounts Payable instead of Rent Expense, and the trial balance still balanced. Explain why the software accepted it and what clue in the trial balance suggests an error.
Show answer
The entry was valid: both accounts exist, each line has one positive amount, and debits equal credits (1,200.00 each). The software checks structure, not whether the account matches the transaction. The clue is that Accounts Payable, a liability with a normal credit balance, shows a 1,200.00 debit balance. An abnormal balance is a prompt to review the account's entries.
Exercise
A customer invoice for 800.00 was posted on 2026-01-10. On 2026-02-05 you find it should have been 600.00, and January is locked. Write the correction entries to post in February, using Accounts Receivable and Service Revenue.
Show answer
Post a reversal dated in February: debit Service Revenue 800.00 and credit Accounts Receivable 800.00. Then post the correct invoice: debit Accounts Receivable 600.00 and credit Service Revenue 600.00. A shorter alternative is a single entry that debits Service Revenue 200.00 and credits Accounts Receivable 200.00. Either way the January entry stays in the history, and the February entries carry the change.
Exercise
The Accounts Receivable control account shows 9,400.00, but the customer subledger totals 9,100.00. Name one likely cause and one step to resolve it.
Show answer
A likely cause is a 300.00 entry posted directly to the control account with no matching customer record. To resolve it, run the reconciliation report to find the entry. Then reverse it and re-post it through the customer module so that both the control account and the subledger are updated.