Skill Tracer
Skills › Knowledge Work Plugins › ap-processor › coding_rules.md

coding_rules.md

70 lines · small-business/skills/ap-processor/reference/coding_rules.md at 2574e29

Open on GitHub
1# Coding Rules
2
3Getting each bill to the right account, class, and job.
4
5---
6

Coding Rules

Getting each bill to the right account, class, and job.


Raw lines 1 to 6
7## The order of evidence
8
9Use the strongest available signal and stop. Stacking weak signals produces confident nonsense.
111. **This vendor's history in this ledger.** If the last eight Ferguson bills went to Materials and Supplies, the ninth almost certainly does too.
122. **The PO.** A PO written against a job carries the job code with it.
133. **The line detail.** "Compressor, 3-ton" reads differently from "shop towels."
144. **The owner's stated rule.** If Ray said once that anything from the uniform service is Overhead, that holds until he changes it.
155. **Nothing above applies.** Ask.
17---

The order of evidence

Use the strongest available signal and stop. Stacking weak signals produces confident nonsense.

  1. This vendor's history in this ledger. If the last eight Ferguson bills went to Materials and Supplies, the ninth almost certainly does too.
  2. The PO. A PO written against a job carries the job code with it.
  3. The line detail. "Compressor, 3-ton" reads differently from "shop towels."
  4. The owner's stated rule. If Ray said once that anything from the uniform service is Overhead, that holds until he changes it.
  5. Nothing above applies. Ask.

Raw lines 7 to 18
19## Confidence threshold
21Code it automatically when vendor history agrees across at least three prior bills and nothing on this bill contradicts it.
23Everything else goes on the "needs your call" list with a proposed code and one line of reasoning. Keep that list short and specific — an owner will answer four questions and will ignore forty.
25---

Confidence threshold

Code it automatically when vendor history agrees across at least three prior bills and nothing on this bill contradicts it.

Everything else goes on the "needs your call" list with a proposed code and one line of reasoning. Keep that list short and specific — an owner will answer four questions and will ignore forty.


Raw lines 19 to 26
27## Job and class splits
29A single supply-house invoice covering three jobs is normal in the trades and is the most common source of bad margin data.
31- **Split by line when the lines carry job references.** Many suppliers print the job name or PO on each line.
32- **Split by the owner's allocation when they give one**, and record it so the same vendor gets the same treatment next time.
33- **Do not spread evenly as a default.** An even split across three jobs is a fabricated allocation that will show up later as a margin number nobody can explain.
35When the split is genuinely unknown, code the whole bill to the most likely job, flag it as unsplit, and say so. A flagged single-job coding is fixable; an invented three-way split looks correct and never gets revisited.
37---

Job and class splits

A single supply-house invoice covering three jobs is normal in the trades and is the most common source of bad margin data.

  • Split by line when the lines carry job references. Many suppliers print the job name or PO on each line.
  • Split by the owner's allocation when they give one, and record it so the same vendor gets the same treatment next time.
  • Do not spread evenly as a default. An even split across three jobs is a fabricated allocation that will show up later as a margin number nobody can explain.

When the split is genuinely unknown, code the whole bill to the most likely job, flag it as unsplit, and say so. A flagged single-job coding is fixable; an invented three-way split looks correct and never gets revisited.


Raw lines 27 to 38
39## Categories that routinely go wrong
41| Situation | Right answer | Why |
42|---|---|---|
43| Equipment over the owner's capitalization threshold | Fixed asset, not expense | It changes the P&L and the tax return. Ask for the threshold once and remember it |
44| Sales tax on a resale purchase | Flag it | The owner may be paying tax they are exempt from |
45| Freight on materials for a job | Job cost, with the materials | Freight parked in overhead hides real job cost |
46| Deposit or prepayment to a vendor | Prepaid or vendor deposit | Expensing a deposit understates the month and double-counts on delivery |
47| Credit memo | Negative bill against the same vendor | Never net it silently into an unrelated invoice |
48| Card charge from Ramp or Expensify | Already paid — code it, do not stage a payment | Paying it again is a real duplicate payment |
50---

Categories that routinely go wrong

SituationRight answerWhy
Equipment over the owner's capitalization thresholdFixed asset, not expenseIt changes the P&L and the tax return. Ask for the threshold once and remember it
Sales tax on a resale purchaseFlag itThe owner may be paying tax they are exempt from
Freight on materials for a jobJob cost, with the materialsFreight parked in overhead hides real job cost
Deposit or prepayment to a vendorPrepaid or vendor depositExpensing a deposit understates the month and double-counts on delivery
Credit memoNegative bill against the same vendorNever net it silently into an unrelated invoice
Card charge from Ramp or ExpensifyAlready paid — code it, do not stage a paymentPaying it again is a real duplicate payment

Raw lines 39 to 51
52## Recurring bills
54Recurring vendors — rent, insurance, the phone bill — code themselves reliably and should. What they do **not** do is approve themselves for payment. Recurrence is evidence about the account code, not consent to spend.
56Flag a recurring bill whose amount moved more than 10% from the prior period. That change is often the only visible sign of a rate increase the owner never agreed to.
58---

Recurring bills

Recurring vendors — rent, insurance, the phone bill — code themselves reliably and should. What they do not do is approve themselves for payment. Recurrence is evidence about the account code, not consent to spend.

Flag a recurring bill whose amount moved more than 10% from the prior period. That change is often the only visible sign of a rate increase the owner never agreed to.


Raw lines 52 to 59
60## Worked example
62Ferguson invoice 88231, USD 3,417.02, four lines.
64- Lines 1–2, condenser and line set, USD 2,980 — job reference "Maple St" printed on the line, coded to Materials, job Maple St
65- Line 3, shop consumables, USD 196 — no job reference, coded to Shop Supplies, overhead
66- Line 4, freight, USD 241.02 — allocated to Maple St with the materials it carried
68No question raised. Vendor history and printed line references agreed.
70Contrast: a first bill from a new sheet-metal fabricator, USD 8,900, single line reading "fabrication per quote." That one goes to Ray with a proposed code of Subcontractor and the note that it is a new vendor with no history and an amount large enough to matter.

Worked example

Ferguson invoice 88231, USD 3,417.02, four lines.

  • Lines 1–2, condenser and line set, USD 2,980 — job reference "Maple St" printed on the line, coded to Materials, job Maple St
  • Line 3, shop consumables, USD 196 — no job reference, coded to Shop Supplies, overhead
  • Line 4, freight, USD 241.02 — allocated to Maple St with the materials it carried

No question raised. Vendor history and printed line references agreed.

Contrast: a first bill from a new sheet-metal fabricator, USD 8,900, single line reading "fabrication per quote." That one goes to Ray with a proposed code of Subcontractor and the note that it is a new vendor with no history and an amount large enough to matter.

Raw lines 60 to 70