Shows what a self-employed Kentuckian owes every city, county and school district they work in, alongside federal, self-employment and Kentucky income tax. Try it: press Add in the "Try it" row to see what one $500 job changes at each office, open any local tax row to see its math and ordinance, and check Plan for how much of every invoice to set aside. Every rate traces to its source. Nothing leaves your browser.
<!-- Copyright (c) 2026 Roland Songer. Released under the MIT License. -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="no-referrer">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; form-action 'none'; base-uri 'none'">
<title>County Line — Kentucky local tax for the self-employed</title>
<style>
/* styles.css — WO-13 V1. One design system: tokens, then a small set of components used everywhere.
Tokens: color (light only, WO-15 X1), type scale (hero, title, section, body, small, caption), spacing (4 8 12 16 24 32 48),
radius (14 cards, 10 controls, 999 pills, 18 sheets, 6 bars). Components: card, table, list-row, pill, button,
field, stat, segmented, sheet, banner, toast. */
:root {
--bg: #f5f5f7;
--surface: #ffffff;
--surface-2: #f5f5f7;
--text: #1d1d1f;
--text-2: #6e6e73;
--hairline: rgba(0, 0, 0, 0.08);
--accent: #006ad5;
--danger: #d70015;
--ok: #217d38;
--warn: #b25000;
/* Derived: the fill behind white button text, and the tints behind pills (each tone at 10% on the surface). */
--accent-fill: #006ad5;
--on-accent: #ffffff;
--accent-tint: #e6f0fb;
--ok-tint: #e9f2eb;
--warn-tint: #f7eee6;
--danger-tint: #fbe6e8;
--shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
--shadow-menu: 0 0 0 1px var(--hairline), 0 8px 32px rgba(0, 0, 0, 0.12);
/* WO-15 X1: light only, also on a dark-mode system (form controls and scrollbars included). */
color-scheme: light;
--fs-hero: 56px;
--fs-title: 28px;
--fs-section: 20px;
--fs-body: 17px;
--fs-small: 14px;
--fs-caption: 12px;
--r-card: 14px;
--r-control: 10px;
--bar-h: 56px;
}
@media (max-width: 639px) { :root { --fs-hero: 40px; } }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: var(--fs-body);
line-height: 1.45;
font-variant-numeric: tabular-nums;
overflow-wrap: anywhere;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-section); line-height: 1.25; font-weight: 600; }
h2 { font-size: var(--fs-title); line-height: 1.15; font-weight: 600; }
h3 { font-size: var(--fs-section); line-height: 1.25; font-weight: 600; }
h4 { font-size: var(--fs-body); line-height: 1.45; font-weight: 600; }
p { margin: 0 0 8px; }
a { color: var(--accent); }
/* WO-13 V8: a source link that is a cell's whole content is plain, like a plain button; a link inside a sentence keeps its underline (colour alone does not mark it). */
#rates-table td > a[href], #assumptions-constants td > a[href] { text-decoration: none; }
#rates-table td > a[href]:hover, #rates-table td > a[href]:focus-visible, #assumptions-constants td > a[href]:hover, #assumptions-constants td > a[href]:focus-visible { text-decoration: underline; }
.hint { color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; margin: 8px 0 0; }
.caption { color: var(--text-2); font-size: var(--fs-caption); line-height: 1.3; }
.strong { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, input[type="date"]:focus-within, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
@media (prefers-reduced-motion: no-preference) {
button, a, input, select, .pill, .office-chip, .jar-chip, .hero-number, .stat-value, .jar-figure dd, .chevron { transition: color 150ms ease, background-color 150ms ease, opacity 150ms ease, transform 150ms ease; }
}
/* ---- the content column: 980 px, 24 px gutters (16 px on a phone) ---- */
main, .bar-inner, .banner-inner, .site-footer, .status { max-width: 1028px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 639px) {
main, .bar-inner, .banner-inner, .site-footer, .status { padding-left: 16px; padding-right: 16px; }
}
/* ---- card ---- */
.card, .panel { background: var(--surface); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); }
.card > h2, .panel > h2 { margin: 0 0 16px; }
.card h3, .panel h3 { margin: 24px 0 8px; }
@media (max-width: 639px) { .card, .panel { padding: 16px; } }
/* ---- button: primary (accent fill), secondary (surface-2 fill), plain (accent text) ---- */
button, select, input { font: inherit; color: inherit; max-width: 100%; }
button {
min-height: 36px;
padding: 0 16px;
border: none;
border-radius: var(--r-control);
background: var(--surface-2);
color: var(--text);
font-size: var(--fs-small);
font-weight: 600;
line-height: 1.4;
cursor: pointer;
}
button:hover { opacity: 0.85; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.primary, #disclaimer-continue, #replace-confirm { background: var(--accent-fill); color: var(--on-accent); }
button.plain, .link-button, dialog button.plain { background: none; color: var(--accent); padding: 0 4px; font-weight: 400; font-size: inherit; text-decoration: none; }
.link-button:hover { text-decoration: underline; opacity: 1; }
.form-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.dialog-actions { justify-content: flex-end; }
.row-actions { white-space: nowrap; }
.row-actions button { margin-right: 8px; }
@media (pointer: coarse), (max-width: 820px) { button, .tip-button { min-height: 44px; } .tip-button { min-width: 44px; } }
/* ---- field: label above input, 44 px control, surface-2 fill, no border until focus ---- */
.field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0 0 12px; max-width: 420px; min-width: 0; }
.field label, .field-label { font-size: var(--fs-small); line-height: 1.4; color: var(--text-2); }
input[type="text"], input[type="date"], input[type="search"], input[type="number"], select {
min-height: 44px;
padding: 0 12px;
border: none;
border-radius: var(--r-control);
background: var(--surface-2);
color: var(--text);
width: 100%;
}
/* WO-13 V8: a dropdown draws its own caret, so every engine gives it the field's 44 px (WebKit's native one stays 23 px tall). */
select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-repeat: no-repeat;
background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-fill); margin: 0 8px 0 0; }
input[type="range"] { accent-color: var(--accent-fill); padding: 0; }
input[aria-invalid="true"], select[aria-invalid="true"] { outline: 2px solid var(--danger); }
.radio { display: block; margin: 8px 0; }
fieldset { border: none; margin: 0 0 12px; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; }
.field-group { margin: 0 0 12px; }
.field-group .field { margin-bottom: 4px; }
.field-hint, .field-note { margin: 0 0 8px; font-size: var(--fs-small); color: var(--text-2); }
.field-error, .inline-error { color: var(--danger); background: var(--danger-tint); border-radius: var(--r-control); padding: 8px 12px; margin: 0 0 8px; font-size: var(--fs-small); }
.inline-warning { color: var(--warn); background: var(--warn-tint); border-radius: var(--r-control); padding: 8px 12px; margin: 8px 0; font-size: var(--fs-small); }
.sub-fields { border-left: 2px solid var(--hairline); padding-left: 16px; margin: 8px 0; }
details > summary { cursor: pointer; color: var(--accent); padding: 8px 0; }
/* ---- table: no outer box, caption-style header, 48 px rows, hairline rules, numbers right ---- */
.table-wrap, .preview-wrap { overflow-x: auto; margin-top: 16px; }
.preview-wrap { max-height: 320px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); line-height: 1.4; overflow-wrap: normal; }
th, td { text-align: left; padding: 12px 16px 12px 0; height: 48px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: var(--fs-caption); line-height: 1.3; font-weight: 400; color: var(--text-2); height: 32px; padding-top: 8px; padding-bottom: 8px; }
tbody > tr > th { font-weight: 600; }
tbody > tr:last-child > td, tbody > tr:last-child > th { border-bottom: none; }
th.num, td.num { text-align: right; }
tr.empty td, tr.duplicate td { color: var(--text-2); }
/* ---- list-row: label left, value right, 48 px, hairline between rows ---- */
.totals { display: grid; grid-template-columns: 1fr auto; margin: 0; font-size: var(--fs-small); line-height: 1.4; }
.totals dt, .totals dd { margin: 0; min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--hairline); padding: 8px 0; }
.totals dd { justify-content: flex-end; padding-left: 16px; }
.totals dt:last-of-type, .totals dd:last-of-type { border-bottom: none; }
/* ---- pill: one shape, four tones (neutral, ok, warn, danger), tinted background, same-hue text ---- */
.pill, .office-chip, .jar-chip, .unsaved {
display: inline-block;
border-radius: 999px;
padding: 2px 10px;
font-size: var(--fs-caption);
line-height: 1.3;
font-weight: 600;
white-space: nowrap;
background: var(--surface-2);
color: var(--text-2);
}
.pill-ok, .chip-filed, .jar-chip-paid { background: var(--ok-tint); color: var(--ok); }
.pill-warn, .chip-paymentsMissed, .chip-paymentsShort, .jar-chip-short, .unsaved { background: var(--warn-tint); color: var(--warn); }
.pill-danger, .chip-neverFiled, .jar-chip-missed { background: var(--danger-tint); color: var(--danger); }
/* ---- stat: caption label above a 28 px value ---- */
.stat dt, .stat-label, .jar-figure dt { font-size: var(--fs-caption); line-height: 1.3; color: var(--text-2); }
.stat dd, .stat-value, .jar-figure dd { margin: 0; font-size: var(--fs-title); line-height: 1.15; font-weight: 600; }
.hero-number { font-size: var(--fs-hero); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
/* ---- segmented: tab-like switches inside a view ---- */
.segmented, .tab-list { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-control); background: var(--hairline); margin: 8px 0 16px; max-width: 100%; }
.segmented button, .tab-list [role="tab"] { min-height: 32px; padding: 0 12px; border-radius: 6px; background: none; color: var(--text); font-weight: 400; }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"], .tab-list [role="tab"][aria-selected="true"] {
background: var(--surface); font-weight: 600; box-shadow: var(--shadow); }
@media (pointer: coarse), (max-width: 820px) { .segmented button, .tab-list [role="tab"] { min-height: 44px; } }
/* ---- sheet: a centered dialog, 520 px wide (full width on a phone), radius 18 ---- */
dialog {
background: var(--surface);
color: var(--text);
border: none;
border-radius: 18px;
padding: 24px;
width: min(520px, calc(100vw - 32px));
max-height: calc(100vh - 32px);
overflow: auto;
box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
dialog h2 { margin: 0 0 16px; }
@media (max-width: 639px) { dialog { width: 100vw; max-width: 100vw; margin-bottom: 0; border-radius: 18px 18px 0 0; padding: 16px; } }
#import-dialog { width: min(920px, calc(100vw - 32px)); }
#import-dialog h3 { margin: 16px 0 8px; }
#import-dialog ul { margin: 4px 0 0; padding-left: 24px; }
/* break-spaces keeps a cell's spaces as the file has them and wraps them (pre-wrap lets a trailing space hang past the box in Firefox). */
#import-raw td, #import-raw th { white-space: break-spaces; }
/* ---- banner: a slim full-width strip under the top bar ---- */
.banner { background: var(--surface-2); border-bottom: 1px solid var(--hairline); font-size: var(--fs-small); line-height: 1.4; }
.banner-inner, .tour-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.banner-inner { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.banner p, .tour-banner p { margin: 0; }
.tour-banner { background: var(--surface); border-radius: var(--r-control); padding: 12px 16px; font-size: var(--fs-small); line-height: 1.4; }
/* ---- toast: bottom center, gone after 4 s ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-control);
background: var(--text); color: var(--bg); font-size: var(--fs-small); line-height: 1.4; box-shadow: var(--shadow); }
/* ---- shell (WO-13 V2): one sticky top bar (brand, five tabs, actions), the example banner, the footer ---- */
#stub-banner { background: var(--danger); color: var(--on-accent); font-weight: 600; text-align: center; padding: 8px 16px; }
.top-bar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand h1 { white-space: nowrap; }
.brand-mark-slot { display: inline-flex; flex: none; }
.brand-mark { display: block; width: 32px; height: 32px; }
.mark-first { fill: var(--accent); }
.mark-second { fill: var(--text-2); }
.tabs { display: flex; align-items: center; gap: 4px; }
.tab { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-control);
font-size: var(--fs-small); line-height: 1.4; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.bar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-actions button { white-space: nowrap; }
.save-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); margin-left: 8px; vertical-align: middle; }
.more { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; min-width: 240px; padding: 8px; border-radius: var(--r-card);
background: var(--surface); box-shadow: var(--shadow-menu); }
.menu button { display: block; width: 100%; min-height: 44px; padding: 0 12px; background: none; text-align: left; font-weight: 400; }
.menu button:hover { background: var(--surface-2); opacity: 1; }
.menu-note { margin: 4px 0 0; padding: 8px 12px 4px; border-top: 1px solid var(--hairline); font-size: var(--fs-caption); line-height: 1.3; color: var(--text-2); }
#more-save, #more-dot { display: none; }
.sheet-choices { display: grid; gap: 8px; }
.sheet-choices button { min-height: 44px; }
.status { margin-top: 8px; color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; min-height: 1.4em; }
.site-footer { padding-top: 16px; padding-bottom: 24px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.3; }
.site-footer p { margin: 0; }
.site-footer button { min-height: 24px; font-size: inherit; }
main { padding-top: 16px; padding-bottom: 24px; }
.tab-panel, .sub-panel, .tab-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tab-panel > .segmented { justify-self: start; margin: 0; }
.tab-body:empty { display: none; }
#workspace-section p { margin: 0; }
@media (pointer: coarse), (max-width: 820px) { .tab { min-height: 44px; } .site-footer button { min-height: 44px; } }
@media (max-width: 759px) {
.brand h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}
/* Phones: the tabs are a fixed bar at the bottom; the top bar keeps the logo, + Add and More (Save is inside More). */
@media (max-width: 639px) {
.bar-inner { grid-template-columns: 1fr auto; }
.brand h1 { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 0; height: 56px; background: var(--surface); border-top: 1px solid var(--hairline); }
.tab { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 0 4px; border-radius: 0; font-size: var(--fs-caption); line-height: 1.3; }
.tab[aria-current="page"] { background: none; color: var(--accent); }
#save-button { display: none; }
#more-save { display: block; }
#more-dot { display: inline-block; }
body::after { content: ""; display: block; height: 56px; }
}
/* ---- Overview (WO-13 V3): hero card, stat tiles, office table, unfiled returns, bars by place ---- */
.card > h3:first-child { margin-top: 0; }
.hero-block .caption { margin: 0 0 4px; }
.hero-sub { margin: 8px 0 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.stat-tile:hover { opacity: 0.85; }
.stat-tile > .caption { margin: 0; }
.stat-short { color: var(--danger); }
.stat-ahead { color: var(--ok); }
@media (max-width: 639px) { .stat-row { grid-template-columns: minmax(0, 1fr); } }
.card-danger { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.card > .caption { margin: 16px 0 0; }
.card > .caption + .caption { margin-top: 4px; }
.overview-closing { margin: 0; }
.hbars { display: grid; gap: 8px; margin: 8px 0 16px; font-size: var(--fs-small); line-height: 1.4; }
.hbars .bar { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
.bar-track { display: block; height: 24px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
@media (max-width: 639px) {
.hbars .bar { grid-template-columns: minmax(0, 1fr) auto; }
.hbars .bar-track { grid-column: 1 / -1; grid-row: 2; height: 12px; }
}
/* ---- Plan (WO-13 V6) ---- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.stat-row dt { margin: 0 0 4px; }
@media (max-width: 639px) { .stat-row { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
#screen-3 > h3, #jar-section > h3, #quant-section > h3 { margin-top: 0; }
#screen-3 .fan-chart { min-height: 320px; }
#jar-section, #quant-section { min-width: 0; }
#screen3-why { margin-top: 8px; }
.quant-panel td:first-child { white-space: nowrap; }
@media (max-width: 639px) {
.tab-list { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.tab-list [role="tab"] { flex: none; white-space: nowrap; }
.quant-panel td:first-child { white-space: normal; }
}
.tour-answer { font-size: var(--fs-section); line-height: 1.25; margin: 8px 0 16px; }
.office-kind { color: var(--text-2); }
.hidden-total { margin: 16px 0 0; font-weight: 600; }
.q1-context { max-width: 480px; margin: 0 0 16px; }
.screen3-status .jar-chip { white-space: nowrap; }
.packet-view { min-width: 0; }
.packet-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.packet-toolbar h2 { margin: 0 auto 0 0; }
/* Until the ledger is paged (V4), its rows scroll inside the card. */
/* ---- charts (inline SVG): marks take the tokens ---- */
.sparkline-wrap { margin: 16px 0 0; }
.sparkline { display: block; width: 100%; height: auto; }
.sparkline-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.sparkline-line, .sparkline-tick { vector-effect: non-scaling-stroke; }
.sparkline-dot { fill: var(--accent); }
.sparkline-tick { stroke: var(--danger); stroke-width: 2; }
.sparkline-caption { margin: 4px 0 0; }
.sparkline-labels { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-caption); line-height: 1.3; color: var(--text-2); }
.chart-key, .proof-key, .hundred-key { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 8px 0 0; font-size: var(--fs-small); line-height: 1.4; }
.chart-key li, .proof-key li { display: flex; align-items: center; gap: 8px; }
.chart-key-amounts { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; }
.chart-key-amounts li { display: contents; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 6px; }
.swatch-se, .seg-se { background: var(--text-2); fill: var(--text-2); }
.swatch-federal, .seg-federal { background: var(--accent); fill: var(--accent); }
.swatch-ky, .seg-ky { background: var(--ok); fill: var(--ok); }
.swatch-local, .seg-local { background: var(--danger); fill: var(--danger); }
.seg-kept { fill: var(--surface-2); stroke: none; }
.bar-chart { width: 100%; height: auto; max-width: 760px; display: block; }
.bar-chart text { fill: var(--text); font-size: 14px; }
.context-label { margin: 8px 0 0; font-weight: 600; }
.bar-dollars { font-weight: 600; }
.fan-chart { width: 100%; height: auto; display: block; }
.fan-grid { stroke: var(--hairline); stroke-width: 1; }
.fan-axis, .fan-side-label { fill: var(--text-2); font-size: 12px; }
.fan-band { fill: var(--danger); fill-opacity: 0.16; stroke: none; }
.fan-today { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 3; }
.fan-today-label { fill: var(--text); font-size: 12px; font-weight: 600; }
.proof-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.proof-tax { stroke: var(--danger); }
.proof-set { stroke: var(--ok); }
.proof-covered { fill: var(--ok); fill-opacity: 0.22; stroke: none; }
.proof-paid { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; }
.proof-paid-dot { fill: var(--accent); }
.proof-swatch { flex: none; display: inline-block; width: 24px; height: 12px; }
.proof-swatch-tax { height: 0; border-top: 3px solid var(--danger); }
.proof-swatch-set { height: 0; border-top: 3px solid var(--ok); }
.proof-swatch-paid { height: 0; border-top: 2px dashed var(--accent); }
.proof-swatch-covered { background: var(--ok); opacity: 0.4; }
.proof-swatch-band { background: var(--danger); opacity: 0.3; }
.proof-caption { margin: 8px 0 0; font-weight: 600; }
.hundred { margin: 16px 0 0; }
/* WO-14 W1: the source line under the hero, and the try-it row: its label, two fields and Add on one line. */
.hero-source { margin: 4px 0 0; }
.hero-source .link-button { padding: 0; font-size: inherit; }
.try-it { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 24px 0 0; }
.try-it-label { display: flex; align-items: center; min-height: 44px; margin: 0 4px 0 0; font-size: var(--fs-small); line-height: 1.4; font-weight: 600; }
.try-it .field { margin: 0; }
.try-it .try-amount { flex: 0 1 140px; }
.try-it .try-place { flex: 1 1 200px; max-width: 320px; }
/* WO-15 X3: the example's date note, on a line of its own under the row. */
.try-it .try-dated { flex: 0 0 100%; margin: 0; }
.try-it button { min-height: 44px; }
.try-it .field-error { flex: 1 1 100%; margin: 0; }
@media (max-width: 639px) { .try-it-label { flex: 1 1 100%; min-height: 0; } .try-it .try-amount, .try-it .try-place { flex: 1 1 100%; max-width: none; } .try-it button { flex: 1 1 100%; } }
.hundred-title { margin: 0 0 8px; font-size: var(--fs-caption); line-height: 1.3; color: var(--text-2); }
.hundred-bar { display: block; width: 100%; height: 12px; border-radius: 6px; }
.hundred-costs { fill: var(--text-2); background: var(--text-2); }
.hundred-taxes { fill: var(--danger); background: var(--danger); }
.hundred-kept { fill: var(--ok); background: var(--ok); }
.hundred-key li { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding-right: 8px; }
.hundred-amount { font-weight: 600; }
/* ---- ledger, locations, tax summary, jar, what if, rates, quick estimate ---- */
/* WO-13 V4: the add-entry sheet, the ledger's head, filters and pager, the toast above a phone's tab bar, the tint. */
#add-sheet .field { max-width: none; }
#add-kind { margin: 0 0 16px; }
#ledger-needs-location p { margin: 0 0 12px; }
#ledger-more { margin: 0 0 12px; }
button.danger { color: var(--danger); margin-right: auto; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; }
.card-head h2 { margin: 0; }
.filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin: 16px 0 0; }
.filter-row .field { flex: 1 1 160px; margin: 0; max-width: none; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 16px 0 0; }
.pager p { margin: 0; font-size: var(--fs-small); line-height: 1.4; color: var(--text-2); }
.row-actions button.plain { min-height: 24px; font-size: var(--fs-small); }
.changed { background-color: var(--accent-tint); border-radius: 6px; }
/* WO-14 W3: a counting number. Its text is the final value from the first frame (that is what a screen reader hears);
the moving digits are drawn over it from data-anim, in the same place and colour. A redrawn chart fades in over
the one it replaces, which is laid on top for 200 ms. */
.counting { position: relative; -webkit-text-fill-color: transparent; }
.counting::after { content: attr(data-anim); content: attr(data-anim) / ""; position: absolute; inset: 0; -webkit-text-fill-color: currentColor; }
.chart-ghost { position: absolute; z-index: 5; margin: 0; pointer-events: none; }
@media (max-width: 639px) { .toast { bottom: calc(56px + 16px); } }
@media (pointer: coarse), (max-width: 820px) { .row-actions button.plain { min-height: 44px; } }
.preview-box ul { margin: 0; padding-left: 16px; }
.preview-box p { margin: 8px 0 4px; }
/* WO-13 V5: the Taxes tab. */
#tax-hero-card > .caption { margin: 0 0 4px; }
#tax-hero-card > #tax-year-note { margin: 16px 0 0; }
.tax-office-name { display: block; }
.tax-reason { display: block; font-size: var(--fs-caption); line-height: 1.3; font-weight: 400; color: var(--text-2); }
tr.group-row > th { height: 32px; padding-top: 16px; padding-bottom: 4px; font-size: var(--fs-caption); line-height: 1.3; font-weight: 400; color: var(--text-2);
border-bottom: 1px solid var(--hairline); }
tr.total-row > th, tr.total-row > td { font-weight: 600; }
.totals dt.strong, .totals dd.strong { font-weight: 600; }
/* WO-14 W2: the what-changed card, and the same card as the confirmation of an add made from another tab. */
.changed-kept { margin: 12px 0 4px; font-weight: 700; }
.changed-card .caption { margin: 0; }
.toast.toast-card { width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 160px); overflow-y: auto; padding: 16px; border-radius: var(--r-card);
background: var(--surface); color: var(--text); box-shadow: var(--shadow-menu); }
.toast-card h3 { margin: 0 0 4px; }
.toast-card .totals dt, .toast-card .totals dd { min-height: 32px; padding: 4px 0; }
#tax-assumptions-box { padding: 0 24px; }
#tax-assumptions { padding-left: 24px; margin: 4px 0 0; }
.jar-card { margin: 16px 0 0; }
.jar-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0 0 8px; align-items: end; }
.jar-short dd { color: var(--danger); }
.jar-ahead dd { color: var(--ok); }
.jar-bar { display: block; width: 100%; height: 12px; border-radius: 6px; }
.jar-covered { fill: var(--ok); }
.jar-gap { fill: var(--danger); }
.jar-next { margin: 8px 0 0; }
#jar-section h3 { margin: 24px 0 8px; }
.sub-form { margin-top: 16px; }
.quant-panel { padding-top: 8px; }
.quant-panel h3 { margin: 8px 0; }
.quant-panel h4 { margin: 16px 0 4px; }
.official-term { margin: 0 0 8px; }
.mark-filed { white-space: nowrap; }
.tip { font-weight: 400; letter-spacing: 0; }
.tip-button { width: 24px; min-height: 24px; padding: 0; margin-left: 8px; border-radius: 50%; font-size: var(--fs-caption); line-height: 1; vertical-align: middle; color: var(--accent); }
.tip-text { display: block; margin: 4px 0; padding: 0 0 0 16px; max-width: 480px; font-size: var(--fs-small); line-height: 1.4; font-weight: 400; color: var(--text);
border-left: 2px solid var(--hairline); text-align: left; white-space: normal; }
.tip-text[hidden] { display: none; }
.rate-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.rate-filters .field { flex: 1 1 160px; margin: 0; }
/* WO-13 V7: the rate table: six columns and a chevron that opens a row's details. */
#rates-table td.rate-limits { overflow-wrap: anywhere; }
#rates-table tbody tr.rate-row > th, #rates-table tbody tr.rate-row > td { height: 40px; padding-top: 8px; padding-bottom: 8px; }
#rates-dropped-box { margin-top: 16px; }
#rates-table .rate-name { display: block; }
#rates-table td.rate-more { width: 44px; text-align: right; }
.rate-toggle { width: 36px; padding: 0; font-size: var(--fs-section); line-height: 1; overflow: hidden; }
.rate-toggle .chevron { display: inline-block; width: 1em; height: 1em; line-height: 1; text-align: center; }
.rate-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.rate-filters .radio { flex: 1 1 100%; margin: 0; font-size: var(--fs-small); line-height: 1.4; }
.view-title { margin: 8px 0 0; }
.view-lead { margin: 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; }
#assumptions-list, #credits-checked, .trust-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); line-height: 1.4; }
#assumptions-list li, #credits-checked li, .trust-list li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
#assumptions-list li:last-child, #credits-checked li:last-child, .trust-list li:last-child { border-bottom: none; }
#quick-sheet { width: min(720px, calc(100vw - 32px)); }
#location-sheet .field { max-width: none; }
.rate-detail-cell { font-size: var(--fs-small); line-height: 1.4; color: var(--text-2); padding-left: 24px; }
.rate-detail-cell > div { margin: 0 0 4px; }
.rate-detail-cell > div:empty { display: none; }
/* WO-14 W4: an office row's chevron, and its detail: the arithmetic, the source, one caption. */
td.math-more { width: 44px; padding-right: 0; text-align: right; }
th.math-col { width: 44px; padding-right: 0; }
.math-line { color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* The detail reads as text, left to right, at every width (a phone's compact rows set cells right-aligned and bold). */
td.math-cell, td.math-cell * { text-align: left; font-weight: 400; }
/* The detail spans the row's columns as a table cell; only a phone's compact rows make it a block (below), where
a fixed 48 px height would let it run over the next row. */
td.math-cell { height: auto; }
/* Its text wraps to the columns the closed rows set: opening a row never moves a column. */
td.math-cell > * { contain: inline-size; }
.math-cell .caption { margin: 0; }
.math-form .link-button { padding: 0; font-size: inherit; }
.rate-notes { color: var(--text); }
.license-text { white-space: pre-wrap; font: inherit; font-size: var(--fs-small); line-height: 1.4; margin: 8px 0 0; }
#assumptions-constants td.constant-value { overflow-wrap: anywhere; max-width: 28em; }
#credits-checked { margin: 0; padding-left: 24px; }
#credits-checked li { margin: 0 0 4px; }
.quick-steps { margin: 8px 0 0; padding-left: 24px; min-width: 0; }
.quick-step { min-width: 0; margin-bottom: 16px; }
.quick-step::marker { font-weight: 600; }
.quick-step .field label, .quick-step-label { font-weight: 600; color: var(--text); font-size: var(--fs-body); line-height: 1.45; }
.quick-step .quick-optional label { font-weight: 400; }
.quick-places { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 640px; }
.quick-place { border-top: 1px solid var(--hairline); padding: 16px 0 8px; min-width: 0; }
.quick-place-line, .quick-resolved { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; min-width: 0; }
.quick-zip { width: 7em; }
.quick-resolved select { width: auto; max-width: 100%; }
.quick-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.quick-share input[type="range"] { flex: 1 1 120px; width: 120px; min-width: 0; max-width: 360px; }
.quick-share-value { min-width: 3.2em; text-align: right; font-weight: 600; }
.quick-place .field-error { margin: 8px 0 0; }
#quick-filed { margin: 4px 0 8px; }
.quick-filed-which { margin: 4px 0 8px 24px; }
/* ---- phones: every table becomes a stack of rows, each value beside its column's name ---- */
@media screen and (max-width: 640px) {
.table-wrap, .preview-wrap, .packet-section { overflow-x: visible; }
table:not(.packet-frame), table:not(.packet-frame) tbody, table:not(.packet-frame) tr, table:not(.packet-frame) td,
table:not(.packet-frame) tbody th { display: block; width: auto; min-width: 0; height: auto; }
table:not(.packet-frame) thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
table:not(.packet-frame) tr { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
table:not(.packet-frame) tbody tr:last-child { border-bottom: none; }
table:not(.packet-frame) td, table:not(.packet-frame) tbody th { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border: none;
text-align: right; white-space: normal; min-width: 0; max-width: none; overflow-wrap: anywhere; }
table:not(.packet-frame) td[data-label]::before, table:not(.packet-frame) tbody th[data-label]::before { content: attr(data-label); flex: 0 0 40%;
text-align: left; color: var(--text-2); font-weight: 400; }
table:not(.packet-frame) td > * { min-width: 0; }
table:not(.packet-frame) tbody td:first-child { font-weight: 600; }
/* Rates: a place is a compact row: its name and its rate; what is taxed and its limits; the source, the date and the chevron. */
#rates-table tbody tr.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 12px; align-items: center; padding: 4px 0; }
#rates-table tbody tr.rate-row td, #rates-table tbody tr.rate-row th { display: block; padding: 0; text-align: left; }
#rates-table tbody tr.rate-row td[data-label]::before, #rates-table tbody tr.rate-row th[data-label]::before { content: none; }
#rates-table tbody tr.rate-row .rate-place { grid-area: 1 / 1; }
#rates-table tbody tr.rate-row .rate-pct { grid-area: 1 / 2 / 2 / 4; text-align: right; font-weight: 600; }
#rates-table tbody tr.rate-row > th, #rates-table tbody tr.rate-row > td { height: auto; }
#rates-table tbody tr.rate-row td:nth-child(2) { grid-area: 2 / 1; color: var(--text-2); font-weight: 400; }
#rates-table tbody tr.rate-row .rate-source { grid-area: 2 / 2; }
#rates-table tbody tr.rate-row .rate-more { grid-area: 2 / 3; width: 44px; }
#rates-table tbody tr.rate-row .rate-limits { grid-area: 3 / 1 / 4 / 4; color: var(--text-2); }
/* A row with no limit has no third line; the date a row was checked is in the line above the table and at full width. */
#rates-table tbody tr.rate-row .rate-limits-none, #rates-table tbody tr.rate-row .rate-checked { display: none; }
#rates-table tr.rate-detail td { display: block; text-align: left; font-weight: 400; }
/* Assumptions: a constant is its key and value, then its two dates and its source. */
#assumptions-constants tbody tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 12px; }
#assumptions-constants tbody td, #assumptions-constants tbody th { display: block; padding: 0; text-align: left; }
#assumptions-constants tbody td[data-label]::before, #assumptions-constants tbody th[data-label]::before { content: none; }
#assumptions-constants tbody .constant-key { grid-area: 1 / 1 / 2 / 4; }
#assumptions-constants tbody .constant-value { grid-area: 2 / 1 / 3 / 4; }
#assumptions-constants tbody td:nth-child(3), #assumptions-constants tbody td:nth-child(4) { color: var(--text-2); }
#assumptions-constants tbody td:nth-child(3) { grid-area: 3 / 1; }
#assumptions-constants tbody td:nth-child(4) { grid-area: 3 / 2; }
#assumptions-constants tbody td:nth-child(5) { grid-area: 3 / 3; text-align: right; }
.row-actions { justify-content: flex-end; }
/* Ledger entries: the description and the amount; then the date, the Schedule C line and the place, with Edit at the right. */
#ledger-table tbody tr[data-txn-id] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
#ledger-table tbody tr[data-txn-id] td { display: block; padding: 0; text-align: left; font-weight: 400; }
#ledger-table tbody tr[data-txn-id] td[data-label]::before { content: none; }
#ledger-table tbody tr[data-txn-id] td:nth-child(2) { grid-area: 1 / 1; font-weight: 600; }
#ledger-table tbody tr[data-txn-id] td:nth-child(5) { grid-area: 1 / 2; text-align: right; font-weight: 600; }
#ledger-table tbody tr[data-txn-id] td:nth-child(1) { grid-area: 2 / 1; color: var(--text-2); }
#ledger-table tbody tr[data-txn-id] td:nth-child(3) { grid-area: 3 / 1; color: var(--text-2); }
#ledger-table tbody tr[data-txn-id] td:nth-child(4) { grid-area: 4 / 1; color: var(--text-2); }
#ledger-table tbody tr[data-txn-id] td:nth-child(6) { grid-area: 2 / 2 / 5 / 3; align-self: center; }
/* Taxes: an office is a two-line row: its name and its tax, then its rate, its share of the work and its status. */
#tax-local-table tbody tr[data-district-id] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
#tax-local-table tbody tr[data-district-id] td, #tax-local-table tbody tr[data-district-id] th { display: block; padding: 0; text-align: left; }
#tax-local-table tbody tr[data-district-id] td[data-label]::before, #tax-local-table tbody tr[data-district-id] th[data-label]::before { content: none; }
#tax-local-table tbody .tl-name { grid-area: 1 / 1 / 2 / 3; }
#tax-local-table tbody .tl-value { grid-area: 1 / 3; text-align: right; font-weight: 600; }
#tax-local-table tbody .tl-a { grid-area: 2 / 1; color: var(--text-2); }
#tax-local-table tbody .tl-b { grid-area: 2 / 2; color: var(--text-2); }
#tax-local-table tbody .tl-a::after { content: " rate"; }
#tax-local-table tbody .tl-b::after { content: " of your work"; }
#tax-local-table tbody .tl-meta { grid-area: 2 / 3; text-align: right; }
#tax-local-table tbody tr.total-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
#tax-local-table tbody tr.total-row th, #tax-local-table tbody tr.total-row td { display: block; padding: 0; }
#tax-local-table tbody tr.total-row td:empty { display: none; }
#tax-local-table tbody tr.total-row th[data-label]::before, #tax-local-table tbody tr.total-row td[data-label]::before { content: none; }
#tax-local-table tbody tr.group-row th { display: block; padding: 8px 0 0; height: auto; border: none; text-align: left; }
#tax-assumptions-box { padding: 0 16px; }
table.two-line:not(.packet-frame) tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
table.two-line:not(.packet-frame) tbody td, table.two-line:not(.packet-frame) tbody th { display: block; padding: 0; text-align: left; }
table.two-line:not(.packet-frame) tbody td[data-label]::before, table.two-line:not(.packet-frame) tbody th[data-label]::before { content: none; }
table.two-line:not(.packet-frame) tbody .office-name { grid-area: 1 / 1; }
table.two-line:not(.packet-frame) tbody .office-owed { grid-area: 1 / 2; text-align: right; font-weight: 600; }
table.two-line:not(.packet-frame) tbody .office-kind { grid-area: 2 / 1; font-weight: 400; }
table.two-line:not(.packet-frame) tbody .office-status { grid-area: 2 / 2; text-align: right; }
/* W4: the chevron takes a column of its own at the row's end, both lines tall; an opened detail is a plain block. */
table.two-line:not(.packet-frame) tbody tr.office-row { grid-template-columns: minmax(0, 1fr) auto 44px; gap: 4px 8px; }
table.two-line:not(.packet-frame) tbody .math-more { grid-area: 1 / 3 / 3 / 4; width: 44px; }
#tax-local-table tbody tr[data-district-id] { grid-template-columns: auto minmax(0, 1fr) auto 44px; }
#tax-local-table tbody tr[data-district-id] .math-more { grid-area: 1 / 4 / 3 / 5; }
table.two-line:not(.packet-frame) tbody tr.math-detail { display: block; }
table.two-line:not(.packet-frame) tbody tr.math-detail td { display: block; padding: 4px 0 8px; }
table.two-line:not(.packet-frame) tbody .math-more .rate-toggle { width: 44px; min-height: 44px; }
.jar-figures { grid-template-columns: minmax(0, 1fr); }
.hundred-key { flex-direction: column; gap: 4px; }
.hundred-key li { flex: none; padding-right: 0; }
}
/* ---- CPA packet and print: light colors whatever the theme ---- */
.packet-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.packet-product { font-weight: 600; font-size: var(--fs-section); line-height: 1.25; }
.packet-product-sub { color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; }
.packet-section { border-top: 1px solid var(--hairline); padding: 16px 0; }
.packet-table { width: 100%; border-collapse: collapse; }
.packet-table .num { white-space: nowrap; }
.packet-table thead { display: table-header-group; }
.packet-worksheet { break-inside: avoid; margin-bottom: 16px; }
.packet-frame, .packet-frame > tbody, .packet-frame > tbody > tr, .packet-frame > tbody > tr > td { display: block; width: 100%; height: auto; padding: 0; border: none; }
.packet-frame > tfoot { display: none; }
.packet-source { overflow-wrap: anywhere; }
#packet-ledger-table td:first-child, #packet-due-dates td { white-space: nowrap; }
#packet-constants td:nth-child(2), #packet-constants td:nth-child(3) { overflow-wrap: anywhere; }
@media screen { .packet-section { overflow-x: auto; } }
/* ---- WO-13 V8: on a touch screen or a narrow one every control is a target at least 44 px each way ---- */
@media (pointer: coarse), (max-width: 820px) {
details > summary { padding: 12px 0; }
.radio { display: flex; align-items: center; min-height: 44px; margin: 0; }
input[type="range"] { min-height: 44px; }
.row-actions button.plain, .rate-toggle { min-width: 44px; }
/* The "?" keeps its 24 px disc; the button around it is the target, and takes no more room in its line. */
.tip-button { width: 44px; min-height: 44px; margin: -12px 0 -12px 4px; background: radial-gradient(circle closest-side, var(--surface-2) 12px, transparent 12.5px); }
/* A source link alone in a cell or a list row: the padding of an inline box widens the target, not the row. */
td > a[href], #assumptions-list a[href] { padding: 16px 0; }
#rates-table tbody tr.rate-row .rate-toggle { width: 44px; min-height: 44px; margin: -4px 0; }
}
@media print {
.bar-actions, .tabs, .banner, .segmented, #open-drop-hint, #footer-disclaimer-button, #stub-banner, .row-actions, .form-actions, .filter-row, .pager,
#ledger-add, #location-form, dialog, .tip, .toast { display: none !important; }
body::after { display: none; }
.top-bar { position: static; }
body { padding-bottom: 72px; background: #fff; color: #000; }
.site-footer { position: fixed; bottom: 0; left: 0; right: 0; max-width: none; background: #fff; color: #000; border-top: 1px solid #000; padding: 6px 16px; }
.packet-table th, .packet-table td { padding: 4px 8px; height: auto; }
body.packet-mode { font-size: 10.5pt; padding-bottom: 0; }
body.packet-mode .top-bar, body.packet-mode .packet-toolbar, body.packet-mode #status { display: none !important; }
body.packet-mode main { max-width: none; padding: 0; }
body.packet-mode .packet-section { border-top: none; }
body.packet-mode .packet-section + .packet-section { break-before: page; }
body.packet-mode .packet-frame { display: table; width: 100%; border-collapse: collapse; }
body.packet-mode .packet-frame > tbody { display: table-row-group; }
body.packet-mode .packet-frame > tfoot { display: table-footer-group; }
body.packet-mode .packet-frame > tbody > tr, body.packet-mode .packet-frame > tfoot > tr { display: table-row; }
body.packet-mode .packet-frame > tbody > tr > td, body.packet-mode .packet-frame > tfoot > tr > td { display: table-cell; padding: 0; }
body.packet-mode .packet-footer-space { height: 1.15in; }
body.packet-mode .packet-table th, body.packet-mode .packet-table td { border-bottom: 1px solid #000; color: #000; }
body.packet-mode * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
body.packet-mode .site-footer { background: #fff !important; }
}
</style>
</head>
<body>
<header id="top-bar" class="top-bar">
<div class="bar-inner">
<div class="brand">
<span id="brand-mark" class="brand-mark-slot"></span>
<h1 id="app-name"></h1>
</div>
<nav id="tabs" class="tabs" aria-labelledby="tabs-label">
<span id="tabs-label" class="sr-only"></span>
<a id="tab-overview" class="tab" href="#overview"></a>
<a id="tab-ledger" class="tab" href="#ledger"></a>
<a id="tab-taxes" class="tab" href="#taxes"></a>
<a id="tab-plan" class="tab" href="#plan"></a>
<a id="tab-rates" class="tab" href="#rates"></a>
</nav>
<div class="bar-actions">
<button id="add-button" type="button" class="primary"></button>
<button id="save-button" type="button" aria-keyshortcuts="Control+S Meta+S"><span id="save-label"></span><span id="unsaved-indicator" class="save-dot" hidden><span id="unsaved-text" class="sr-only"></span></span></button>
<div class="more">
<button id="more-button" type="button" aria-expanded="false" aria-controls="more-menu"><span id="more-label"></span><span id="more-dot" class="save-dot" hidden><span id="more-dot-text" class="sr-only"></span></span></button>
<div id="more-menu" class="menu" hidden>
<button id="more-save" type="button"></button>
<button id="open-button" type="button"></button>
<button id="start-own" type="button"></button>
<button id="see-example" type="button"></button>
<button id="more-packet" type="button"></button>
<button id="more-disclaimer" type="button"></button>
<p id="save-shortcut-hint" class="menu-note"></p>
</div>
</div>
<input id="open-input" type="file" accept=".json,.kyledger.json,application/json" aria-labelledby="open-button" hidden>
</div>
</div>
</header>
<div id="example-banner" class="banner" hidden>
<div class="banner-inner">
<p id="example-banner-text"></p>
<button id="use-my-numbers" type="button" class="primary"></button>
</div>
</div>
<div id="status" class="status" aria-live="polite"></div>
<div id="toast" class="toast" role="status" hidden></div>
<main id="main">
<section id="panel-overview" class="tab-panel" data-tab="overview" aria-labelledby="tab-overview">
<div id="overview-body" class="tab-body"></div>
</section>
<section id="panel-ledger" class="tab-panel" data-tab="ledger" aria-labelledby="tab-ledger" hidden>
<div id="ledger-segments" class="segmented" role="group" aria-labelledby="tab-ledger">
<button id="seg-ledger-entries" type="button" aria-pressed="true"></button>
<button id="seg-ledger-places" type="button" aria-pressed="false"></button>
<button id="seg-ledger-import" type="button" aria-pressed="false"></button>
<button id="seg-ledger-settings" type="button" aria-pressed="false"></button>
</div>
<div id="sub-ledger-entries" class="sub-panel" data-sub="entries">
<section id="ledger-section" class="panel" aria-labelledby="ledger-title"></section>
</div>
<div id="sub-ledger-places" class="sub-panel" data-sub="places" hidden>
<section id="locations-section" class="panel" aria-labelledby="locations-title"></section>
</div>
<div id="sub-ledger-import" class="sub-panel" data-sub="import" hidden>
<section id="import-section" class="panel" aria-labelledby="import-heading">
<h2 id="import-heading" tabindex="-1"></h2>
<p id="import-intro"></p>
<div id="import-tools" class="form-actions">
<button id="import-button" type="button"></button>
</div>
</section>
</div>
<div id="sub-ledger-settings" class="sub-panel" data-sub="settings" hidden>
<section id="settings-panel" class="panel" aria-labelledby="settings-title">
<h2 id="settings-title" tabindex="-1"></h2>
<div class="field">
<label for="workspace-name" id="workspace-name-label"></label>
<input id="workspace-name" type="text" maxlength="80" autocomplete="off">
</div>
<div class="field">
<label for="tax-year" id="tax-year-label"></label>
<select id="tax-year"></select>
</div>
<div class="field">
<label for="filing-status" id="filing-status-label"></label>
<select id="filing-status"></select>
</div>
<details id="settings-optional">
<summary id="settings-optional-summary"></summary>
<div class="field">
<label for="prior-year-tax" id="prior-year-tax-label"></label>
<input id="prior-year-tax" type="text" inputmode="decimal" autocomplete="off">
</div>
<div class="field">
<label for="prior-year-agi" id="prior-year-agi-label" data-tip="agi"></label>
<input id="prior-year-agi" type="text" inputmode="decimal" autocomplete="off">
</div>
<p id="prior-year-error" class="inline-error" role="alert" hidden></p>
</details>
</section>
<section id="workspace-section">
<p id="workspace-summary" tabindex="-1"></p>
<p id="open-drop-hint" class="hint"></p>
</section>
</div>
</section>
<section id="panel-taxes" class="tab-panel" data-tab="taxes" aria-labelledby="tab-taxes" hidden>
<div id="sub-taxes-summary" class="sub-panel" data-sub="summary">
<div id="tax-section" class="tab-body"></div>
</div>
<div id="sub-taxes-packet" class="sub-panel" data-sub="packet" hidden>
<section id="packet-view" class="packet-view" aria-labelledby="packet-title">
<div class="packet-toolbar">
<h2 id="packet-title"></h2>
<button id="packet-print" type="button" class="primary"></button>
<button id="packet-close" type="button"></button>
</div>
<div id="packet-body"></div>
</section>
</div>
</section>
<section id="panel-plan" class="tab-panel" data-tab="plan" aria-labelledby="tab-plan" hidden>
<div id="plan-body" class="tab-body"></div>
<section id="jar-section" class="panel" aria-labelledby="jar-title"></section>
<div id="plan-quarterly" class="tab-body"></div>
<section id="quant-section" class="panel" aria-labelledby="quant-title"></section>
</section>
<section id="panel-rates" class="tab-panel" data-tab="rates" aria-labelledby="tab-rates" hidden>
<div id="rates-segments" class="segmented" role="group" aria-labelledby="tab-rates">
<button id="seg-rates-rates" type="button" aria-pressed="true"></button>
<button id="seg-rates-assumptions" type="button" aria-pressed="false"></button>
<button id="seg-rates-about" type="button" aria-pressed="false"></button>
</div>
<div id="sub-rates-rates" class="sub-panel" data-sub="rates">
<section id="rates-view" class="panel" aria-labelledby="rates-title">
<h2 id="rates-title" tabindex="-1"></h2>
<div id="rates-body"></div>
</section>
</div>
<div id="sub-rates-assumptions" class="sub-panel" data-sub="assumptions" hidden>
<section id="assumptions-view" class="tab-body" aria-labelledby="assumptions-title">
<h2 id="assumptions-title" class="view-title" tabindex="-1"></h2>
<div id="assumptions-body" class="tab-body"></div>
</section>
</div>
<div id="sub-rates-about" class="sub-panel" data-sub="about" hidden>
<section id="credits-view" class="tab-body" aria-labelledby="credits-title">
<h2 id="credits-title" class="view-title" tabindex="-1"></h2>
<p id="privacy-text" class="view-lead"></p>
<div id="credits-body" class="tab-body"></div>
</section>
</div>
</section>
</main>
<footer class="site-footer">
<p><span id="footer-text" data-disclaimer></span> <span id="footer-privacy"></span> <button id="footer-disclaimer-button" type="button" class="plain"></button></p>
</footer>
<dialog id="disclaimer-dialog" aria-labelledby="disclaimer-title">
<h2 id="disclaimer-title"></h2>
<p id="disclaimer-short-1" data-disclaimer></p>
<p id="disclaimer-short-2" data-disclaimer></p>
<details id="disclaimer-more" data-disclaimer>
<summary id="disclaimer-more-summary"></summary>
<p id="disclaimer-full" data-disclaimer></p>
</details>
<div class="dialog-actions">
<button id="disclaimer-continue" type="button"></button>
</div>
</dialog>
<dialog id="replace-dialog" aria-labelledby="replace-title">
<h2 id="replace-title"></h2>
<p id="replace-body"></p>
<div class="dialog-actions">
<button id="replace-cancel" type="button"></button>
<button id="replace-confirm" type="button"></button>
</div>
</dialog>
<dialog id="quick-sheet" aria-labelledby="quick-title">
<section id="quick-section"></section>
</dialog>
<dialog id="file-error-dialog" aria-labelledby="file-error-title">
<h2 id="file-error-title"></h2>
<p id="file-error" role="alert"></p>
<div class="dialog-actions">
<button id="file-error-ok" type="button" class="primary"></button>
</div>
</dialog>
<dialog id="start-sheet" aria-labelledby="start-sheet-title">
<h2 id="start-sheet-title"></h2>
<div class="sheet-choices">
<button id="start-quick" type="button" class="primary"></button>
<button id="start-empty" type="button"></button>
<button id="start-open" type="button"></button>
</div>
<div class="dialog-actions">
<button id="start-cancel" type="button" class="plain"></button>
</div>
</dialog>
<script type="application/json" id="test-summary">{"unit":469,"e2e":1009,"golden":49}</script>
<script>
'use strict';
// ---- book ----
const book = (() => {
// book.js — layer 1. Workspace shape, Schedule C line identifiers, transaction hash.
// Pure: no DOM, clock, storage or randomness.
const APP_VERSION = '1.0.7';
// Schedule C line identifiers. Income lines: '1', '6'. Everything else is an expense line.
// On the current form, line 27a is "Other expenses (from line 48)" and line 27b is the energy efficient commercial
// buildings deduction (Form 7205). Versions 0.1.0 and 1.0.0 used '27b' for other expenses; io.migrate remaps them.
const SCHEDULE_C_LINES = ['1', '6', '8', '9', '10', '11', '12', '13', '14', '15', '16a', '16b', '17',
'18', '19', '20a', '20b', '21', '22', '23', '24a', '24b', '25', '26', '27a', '27b', '30'];
const INCOME_LINES = ['1', '6'];
// options = { seed }; seed defaults to 20260101. Key order is the save-file key order.
function emptyWorkspace(options) {
const seed = options && options.seed !== undefined ? options.seed : 20260101;
return {
format: 'ky-local-tax-ledger',
schemaVersion: 2,
appVersion: APP_VERSION,
savedAt: null,
seed: seed,
// WO-11 J3 (schema 2): the workspace's name, printed on the CPA packet cover.
name: '',
settings: {
taxYear: 2026,
filingStatus: 'single',
itemizedOverrideCents: null,
priorYearTaxCents: null,
priorYearAgiCents: null,
// J3 (schema 2): what is in the tax savings today, or null when not entered.
setAsideBalanceCents: null,
residentCountyId: null,
setAsideConfidence: 0.9,
bootstrapDraws: 2000,
csvMappings: []
},
locations: [],
customRates: [],
transactions: [],
filings: [],
// J3 (schema 2): estimated and other tax payments already made.
taxPayments: []
};
}
// Trim, collapse whitespace, upper-case, drop one trailing reference token (" #48213", " 004417"), trim.
function normalizeDescription(s) {
let out = String(s).trim().replace(/\s+/g, ' ').toUpperCase();
out = out.replace(/\s+#?\d{4,}$/, '');
return out.trim();
}
const FNV_OFFSET = 0xcbf29ce484222325n;
const FNV_PRIME = 0x100000001b3n;
const MASK_64 = 0xffffffffffffffffn;
// FNV-1a 64-bit over the UTF-8 bytes of s; 16 lowercase hex characters.
function fnv1a64(s) {
const bytes = new TextEncoder().encode(String(s));
let h = FNV_OFFSET;
for (let i = 0; i < bytes.length; i++) {
h ^= BigInt(bytes[i]);
h = (h * FNV_PRIME) & MASK_64;
}
return h.toString(16).padStart(16, '0');
}
function txnHash(txn) {
return fnv1a64(`${txn.date}|${txn.amountCents}|${normalizeDescription(txn.description)}`);
}
// ---- F1: ledger ----
const TXN_FIELDS = ['id', 'date', 'amountCents', 'description', 'category', 'scheduleCLine', 'locationId', 'source', 'hash'];
const MONEY_RE = /^(-)?\$?(\d{1,3}(?:,\d{3})+|\d+)?(?:\.(\d{1,2}))?$/;
// '1,234.56' | '$45' | '(45.00)' | '-12' | '45.5' -> integer cents; null if not a money string or more than 2 decimals.
function parseMoney(text) {
if (typeof text !== 'string') return null;
let s = text.trim();
let negative = false;
const paren = /^\((.*)\)$/.exec(s);
if (paren) {
negative = true;
s = paren[1].trim();
if (s.startsWith('-')) return null;
}
const m = MONEY_RE.exec(s);
if (!m || (m[2] === undefined && m[3] === undefined)) return null;
if (m[1]) {
if (negative) return null;
negative = true;
}
const whole = (m[2] || '0').replace(/,/g, '');
if (whole.length > 13) return null;
const cents = Number(whole) * 100 + Number((m[3] || '').padEnd(2, '0'));
if (cents === 0) return 0;
return negative ? -cents : cents;
}
// A real calendar date in YYYY-MM-DD form (leap years included).
function isIsoDate(s) {
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(typeof s === 'string' ? s : '');
if (!m) return false;
const y = Number(m[1]);
const mo = Number(m[2]);
const d = Number(m[3]);
const leap = (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0;
const days = [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
return mo >= 1 && mo <= 12 && d >= 1 && d <= days[mo - 1];
}
function nextTransactionId(workspace) {
let max = 0;
for (const t of workspace.transactions) {
const n = Number(t.id.slice(4));
if (n > max) max = n;
}
return 'txn_' + String(max + 1).padStart(6, '0');
}
function makeTxn(id, fields) {
const t = {};
for (const k of TXN_FIELDS) t[k] = k === 'id' ? id : fields[k];
t.hash = txnHash(t);
return t;
}
const LOCATION_FIELDS = ['id', 'name', 'zip', 'districtIds', 'insideCityLimits', 'confirmedBy'];
const CUSTOM_RATE_FIELDS = ['districtId', 'name', 'kind', 'base', 'ratePct', 'effectiveDate'];
function sameRecord(a, b, fields) {
return fields.every((k) => (Array.isArray(a[k]) && Array.isArray(b[k])
? a[k].length === b[k].length && a[k].every((v, i) => v === b[k][i])
: a[k] === b[k]));
}
function nextNumericId(ids, prefix) {
let max = 0;
for (const id of ids) {
const tail = id.slice(prefix.length);
if (/^\d+$/.test(tail) && Number(tail) > max) max = Number(tail);
}
return prefix + (max + 1);
}
// 'loc_' + (largest numeric suffix + 1); suffixes that are not plain integers are ignored.
function nextLocationId(workspace) {
return nextNumericId(workspace.locations.map((l) => l.id), 'loc_');
}
// J3: 'pay_' + six digits, one past the highest in use.
function nextPaymentId(workspace) {
const max = workspace.taxPayments.reduce((m, p) => Math.max(m, Number(p.id.slice(4))), 0);
return `pay_${String(max + 1).padStart(6, '0')}`;
}
const MAX_NAME_LENGTH = 80;
const PAYMENT_FIELDS = ['id', 'date', 'amountCents', 'office', 'taxYear'];
function nextCustomRateId(workspace) {
return nextNumericId(workspace.customRates.map((r) => r.districtId), 'custom_');
}
function sameTxn(a, b) {
return TXN_FIELDS.every((k) => a[k] === b[k]);
}
// Returns a NEW workspace, or the SAME object when nothing changes.
function reduce(workspace, action) {
const w = workspace;
switch (action && action.type) {
case 'txn/add': {
const txn = makeTxn(nextTransactionId(w), action.txn);
if (w.transactions.some((t) => t.hash === txn.hash)) return w;
return Object.assign({}, w, { transactions: w.transactions.concat([txn]) });
}
case 'txn/update': {
const i = w.transactions.findIndex((t) => t.id === action.id);
if (i < 0) return w;
const old = w.transactions[i];
const fields = Object.assign({}, old);
for (const k of Object.keys(action.patch || {})) if (k !== 'id' && k !== 'hash') fields[k] = action.patch[k];
const next = makeTxn(old.id, fields);
if (sameTxn(old, next)) return w;
if (w.transactions.some((t, j) => j !== i && t.hash === next.hash)) return w;
const transactions = w.transactions.slice();
transactions[i] = next;
return Object.assign({}, w, { transactions });
}
case 'txn/delete': {
if (!w.transactions.some((t) => t.id === action.id)) return w;
return Object.assign({}, w, { transactions: w.transactions.filter((t) => t.id !== action.id) });
}
case 'location/add': {
const loc = { id: nextLocationId(w) };
for (const k of LOCATION_FIELDS.slice(1)) loc[k] = action.location[k];
return Object.assign({}, w, { locations: w.locations.concat([loc]) });
}
case 'location/update': {
const i = w.locations.findIndex((l) => l.id === action.id);
if (i < 0) return w;
const old = w.locations[i];
const loc = {};
for (const k of LOCATION_FIELDS) {
const patched = k !== 'id' && action.patch && Object.prototype.hasOwnProperty.call(action.patch, k);
loc[k] = patched ? action.patch[k] : old[k];
}
if (sameRecord(old, loc, LOCATION_FIELDS)) return w;
const locations = w.locations.slice();
locations[i] = loc;
return Object.assign({}, w, { locations });
}
case 'location/delete': {
if (!w.locations.some((l) => l.id === action.id)) return w;
if (w.transactions.some((t) => t.locationId === action.id)) return w;
return Object.assign({}, w, { locations: w.locations.filter((l) => l.id !== action.id) });
}
case 'customRate/add': {
const rate = { districtId: nextCustomRateId(w) };
for (const k of CUSTOM_RATE_FIELDS.slice(1)) rate[k] = action.customRate[k];
return Object.assign({}, w, { customRates: w.customRates.concat([rate]) });
}
case 'customRate/delete': {
if (!w.customRates.some((r) => r.districtId === action.districtId)) return w;
if (w.locations.some((l) => l.districtIds.includes(action.districtId))) return w;
return Object.assign({}, w, { customRates: w.customRates.filter((r) => r.districtId !== action.districtId) });
}
// Q6: set the filing status of one district's return for one tax year, replacing that pair's record or adding one.
case 'filing/set': {
const i = w.filings.findIndex((f) => f.districtId === action.districtId && f.taxYear === action.taxYear);
if (i >= 0 && w.filings[i].status === action.status) return w;
const record = { districtId: action.districtId, taxYear: action.taxYear, status: action.status };
const filings = w.filings.slice();
if (i >= 0) filings[i] = record;
else filings.push(record);
return Object.assign({}, w, { filings });
}
// J3: a tax payment already made. office: 'federal', 'ky' or a district id.
case 'payment/add': {
const p = action.payment || {};
if (!isIsoDate(p.date) || !Number.isInteger(p.amountCents) || p.amountCents <= 0 || typeof p.office !== 'string' ||
p.office === '' || !Number.isInteger(p.taxYear)) return w;
const payment = { id: nextPaymentId(w) };
for (const k of PAYMENT_FIELDS.slice(1)) payment[k] = p[k];
return Object.assign({}, w, { taxPayments: w.taxPayments.concat([payment]) });
}
case 'payment/delete': {
if (!w.taxPayments.some((p) => p.id === action.id)) return w;
return Object.assign({}, w, { taxPayments: w.taxPayments.filter((p) => p.id !== action.id) });
}
// J3: the workspace's name, trimmed, at most 80 characters.
case 'name/set': {
const name = String(action.name === undefined || action.name === null ? '' : action.name).trim().slice(0, MAX_NAME_LENGTH);
return name === w.name ? w : Object.assign({}, w, { name });
}
case 'settings/set': {
if (!Object.prototype.hasOwnProperty.call(w.settings, action.key)) return w;
if (w.settings[action.key] === action.value) return w;
const settings = Object.assign({}, w.settings);
settings[action.key] = action.value;
return Object.assign({}, w, { settings });
}
default:
return w;
}
}
// Dedupe by txnHash against the workspace and within the batch. With allowDuplicates, a colliding entry
// gets ' (2)', ' (3)', ... appended to its description until its hash is unique.
function addTransactions(workspace, txns, options) {
const allowDuplicates = Boolean(options && options.allowDuplicates);
const hashes = new Set(workspace.transactions.map((t) => t.hash));
const added = [];
let skippedDuplicates = 0;
let nextNumber = Number(nextTransactionId(workspace).slice(4));
for (const fields of txns) {
let txn = makeTxn('txn_' + String(nextNumber).padStart(6, '0'), fields);
if (hashes.has(txn.hash)) {
if (!allowDuplicates) {
skippedDuplicates++;
continue;
}
for (let n = 2; hashes.has(txn.hash); n++) {
txn = makeTxn(txn.id, Object.assign({}, fields, { description: `${fields.description} (${n})` }));
}
}
hashes.add(txn.hash);
added.push(txn);
nextNumber++;
}
const next = added.length ? Object.assign({}, workspace, { transactions: workspace.transactions.concat(added) }) : workspace;
return { workspace: next, added: added.length, skippedDuplicates };
}
// ---- WO-10 D3: quick estimate ----
const QUICK_ESTIMATE_DESCRIPTION = 'Quick estimate';
// WO-12 J9: last year's summary entries, written from the fifth answer.
const QUICK_LAST_YEAR_DESCRIPTION = 'Quick estimate, last year';
// A quick-estimate entry stands for a whole year, not for the month it is dated in.
function isQuickSummary(t) {
return t.description === QUICK_ESTIMATE_DESCRIPTION || t.description === QUICK_LAST_YEAR_DESCRIPTION ||
/^Quick estimate(, last year)? \(\d+\)$/.test(t.description);
}
const QUICK_ESTIMATE_MAX_PLACES = 5;
// The day inside the tax year nearest to today: today itself when it falls in that year.
function dateInTaxYear(taxYear, todayIso) {
if (typeof todayIso === 'string' && todayIso.startsWith(`${taxYear}-`)) return todayIso;
return typeof todayIso === 'string' && todayIso > `${taxYear}-12-31` ? `${taxYear}-12-31` : `${taxYear}-01-01`;
}
// Whole numbers in proportion to the weights that total exactly 100 (largest remainders first, lowest index on a tie).
// All-zero weights split evenly.
function wholeShares(weights) {
if (weights.length === 0) return [];
const sum = weights.reduce((a, b) => a + b, 0);
const exact = weights.map((w) => (sum > 0 ? w * 100 / sum : 100 / weights.length));
const out = exact.map((x) => Math.floor(x + 1e-9));
const order = exact.map((x, i) => [x - out[i], i]).sort((a, b) => b[0] - a[0] || a[1] - b[1]);
let left = 100 - out.reduce((a, b) => a + b, 0);
for (let k = 0; left > 0; k = (k + 1) % order.length) {
out[order[k][1]]++;
left--;
}
return out;
}
// Whole-percent shares that always total 100: place `index` is set to `value` (0 to 100) and the other places share the
// rest in proportion to what they had, evenly when they had nothing. A single place is always 100.
function rebalanceShares(shares, index, value) {
if (shares.length <= 1) return shares.map(() => 100);
const v = Math.max(0, Math.min(100, Math.round(value)));
const others = shares.filter((s, i) => i !== index);
const sum = others.reduce((a, b) => a + b, 0);
const exact = others.map((s) => (sum > 0 ? s * (100 - v) / sum : (100 - v) / others.length));
const part = exact.map((x) => Math.floor(x + 1e-9));
const order = exact.map((x, i) => [x - part[i], i]).sort((a, b) => b[0] - a[0] || a[1] - b[1]);
let left = 100 - v - part.reduce((a, b) => a + b, 0);
for (let k = 0; left > 0; k = (k + 1) % order.length) {
part[order[k][1]]++;
left--;
}
const out = part.slice();
out.splice(index, 0, v);
return out;
}
// A new last place takes an even part (100 / n); the places already there shrink in proportion.
function sharesWithPlaceAdded(shares) {
const n = shares.length + 1;
return rebalanceShares(shares.concat([0]), n - 1, Math.round(100 / n));
}
// The places left share the removed one's part in proportion.
function sharesWithPlaceRemoved(shares, index) {
return wholeShares(shares.filter((s, i) => i !== index));
}
// The quick-estimate workspace, built through the reducers: each place becomes a location (as the ZIP flow would
// save it), with one income entry on line 1 for its share of the income, and what was spent is one expense entry on
// line 27a. Every entry is dated dateInTaxYear(today) and described "Quick estimate". The income entries add up to
// incomeCents exactly: the last place with a share takes the rounding remainder.
// WO-12 J9, the fifth answer: filed = 'all' | 'some' | 'none' | 'unsure' (absent: last year is left out, as before J9).
// With an answer, last year gets the same kind of summary: the same shares of lastYearIncomeCents (this year's income
// when null), the same spending, dated December 31 of the prior year and described "Quick estimate, last year"; and
// last year's returns are marked filed for every district ('all') or for filedDistrictIds ('some'). 'none' and 'unsure'
// mark nothing, so those returns show as never filed.
// answers = { incomeCents, expenseCents, places: [{ location, sharePct }], residentCountyId, todayIso,
// filed, filedDistrictIds, lastYearIncomeCents }
function quickEstimateWorkspace(base, answers) {
let w = reduce(base, { type: 'settings/set', key: 'residentCountyId', value: answers.residentCountyId });
const taxYear = w.settings.taxYear;
const date = dateInTaxYear(taxYear, answers.todayIso);
const txns = [];
const lastWithShare = answers.places.reduce((last, p, i) => (p.sharePct > 0 ? i : last), -1);
const locationIds = [];
for (const p of answers.places) {
locationIds.push(nextLocationId(w));
w = reduce(w, { type: 'location/add', location: p.location });
}
// One income entry per place for its share (the last place with a share takes the rounding remainder), one expense.
const summary = (incomeCents, on, description) => {
let left = incomeCents;
answers.places.forEach((p, i) => {
const cents = i === lastWithShare ? left : Math.min(left, Math.round(incomeCents * p.sharePct / 100));
left -= cents;
if (cents > 0) txns.push({ date: on, amountCents: cents, description, category: 'income', scheduleCLine: '1', locationId: locationIds[i], source: 'manual' });
});
if (answers.expenseCents > 0) {
txns.push({ date: on, amountCents: -answers.expenseCents, description, category: 'expense', scheduleCLine: '27a', locationId: null, source: 'manual' });
}
};
summary(answers.incomeCents, date, QUICK_ESTIMATE_DESCRIPTION);
if (answers.filed) {
const lastYearIncome = answers.lastYearIncomeCents === null || answers.lastYearIncomeCents === undefined ? answers.incomeCents : answers.lastYearIncomeCents;
summary(lastYearIncome, `${taxYear - 1}-12-31`, QUICK_LAST_YEAR_DESCRIPTION);
const every = [...new Set(answers.places.flatMap((p) => p.location.districtIds))];
const filedIds = answers.filed === 'all' ? every : answers.filed === 'some' ? every.filter((id) => (answers.filedDistrictIds || []).includes(id)) : [];
for (const districtId of filedIds) w = reduce(w, { type: 'filing/set', districtId, taxYear: taxYear - 1, status: 'filed' });
}
// Two places with the same share give two entries alike in date, amount and description; both are kept.
return addTransactions(w, txns, { allowDuplicates: true }).workspace;
}
// A ledger that still holds nothing but quick-estimate entries (this year's and, since J9, last year's).
function isQuickEstimate(workspace) {
return workspace.transactions.length > 0 && workspace.transactions.every(isQuickSummary);
}
function scheduleC(workspace, taxYear) {
const prefix = `${taxYear}-`;
let grossReceiptsCents = 0;
let otherIncomeCents = 0;
const byLine = {};
for (const t of workspace.transactions) {
if (!t.date.startsWith(prefix)) continue;
if (t.scheduleCLine === '1') grossReceiptsCents += t.amountCents;
else if (t.scheduleCLine === '6') otherIncomeCents += t.amountCents;
else byLine[t.scheduleCLine] = (byLine[t.scheduleCLine] || 0) - t.amountCents;
}
const expensesByLine = {};
let totalExpensesCents = 0;
for (const line of SCHEDULE_C_LINES) {
if (byLine[line]) {
expensesByLine[line] = byLine[line];
totalExpensesCents += byLine[line];
}
}
return {
grossReceiptsCents,
otherIncomeCents,
expensesByLine,
totalExpensesCents,
netProfitCents: grossReceiptsCents + otherIncomeCents - totalExpensesCents
};
}
// ---- F3: locations ----
function salesByLocation(workspace, taxYear) {
const prefix = `${taxYear}-`;
const out = {};
for (const t of workspace.transactions) {
if (t.category !== 'income' || !t.date.startsWith(prefix)) continue;
out[t.locationId] = (out[t.locationId] || 0) + t.amountCents;
}
return out;
}
return { APP_VERSION, SCHEDULE_C_LINES, INCOME_LINES, emptyWorkspace, normalizeDescription, fnv1a64, txnHash, parseMoney, isIsoDate, nextTransactionId, nextLocationId, nextPaymentId, MAX_NAME_LENGTH, nextCustomRateId, reduce, addTransactions, QUICK_ESTIMATE_DESCRIPTION, QUICK_LAST_YEAR_DESCRIPTION, isQuickSummary, QUICK_ESTIMATE_MAX_PLACES, dateInTaxYear, rebalanceShares, sharesWithPlaceAdded, sharesWithPlaceRemoved, quickEstimateWorkspace, isQuickEstimate, scheduleC, salesByLocation };
})();
// ---- constants ----
const constants = (() => {
// constants.js — layer 1. Federal and Kentucky constants, each with its source. Pure.
// Every record has exactly: value, effectiveDate, sourceUrl, verifiedOn, note. All verified on 2026-11-02.
// Bracket arrays are [upperBoundCents, rate] pairs, strictly increasing, with null for the open top bracket.
const IRC_1401 = 'https://www.law.cornell.edu/uscode/text/26/1401';
const IRC_1402 = 'https://www.law.cornell.edu/uscode/text/26/1402';
const IRC_199A = 'https://www.law.cornell.edu/uscode/text/26/199A';
const SSA_2026 = 'https://www.journalofaccountancy.com/news/2025/oct/social-security-wage-base-and-cola-announced-for-2026/';
const REV_PROC_2025_32 = 'https://www.currentfederaltaxdevelopments.com/blog/2025/10/9/2026-inflation-adjustments-for-tax-professionals-revenue-procedure-2025-32-analysis';
const KY_HB1 = 'https://taxnews.ey.com/news/2025-0543';
const KY_STD = 'https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026';
const VERIFIED = '2026-11-02';
function rec(value, effectiveDate, sourceUrl, note) {
return { value, effectiveDate, sourceUrl, verifiedOn: VERIFIED, note };
}
// WO-06 records, verified on 2026-11-04 (notes as the work order gives them).
function rec4(value, effectiveDate, sourceUrl, note) {
return { value, effectiveDate, sourceUrl, verifiedOn: '2026-11-04', note };
}
const CONSTANTS = {
'fed.se.rate.oasdi': rec(0.124, '2026-01-01', IRC_1401, 'IRC 1401(a)'),
'fed.se.rate.medicare': rec(0.029, '2026-01-01', IRC_1401, 'IRC 1401(b)(1)'),
'fed.se.rate.additionalMedicare': rec(0.009, '2026-01-01', IRC_1401, 'IRC 1401(b)(2)'),
'fed.se.netEarningsFactor': rec(0.9235, '2026-01-01', IRC_1402, 'IRC 1402(a)(12)'),
'fed.se.wageBaseCents': rec(18450000, '2026-01-01', SSA_2026, 'SSA announcement, Oct 2025'),
'fed.se.additionalMedicareThresholdCents.single': rec(20000000, '2013-01-01', IRC_1401, 'not indexed'),
'fed.se.additionalMedicareThresholdCents.mfj': rec(25000000, '2013-01-01', IRC_1401, 'not indexed'),
'fed.stdDeductionCents.single': rec(1610000, '2026-01-01', REV_PROC_2025_32, 'Rev. Proc. 2025-32'),
'fed.stdDeductionCents.mfj': rec(3220000, '2026-01-01', REV_PROC_2025_32, 'Rev. Proc. 2025-32'),
'fed.brackets.single': rec([[1240000, 0.10], [5040000, 0.12], [10570000, 0.22], [20177500, 0.24], [25622500, 0.32],
[64060000, 0.35], [null, 0.37]], '2026-01-01', REV_PROC_2025_32, 'Rev. Proc. 2025-32 §4.01'),
'fed.brackets.mfj': rec([[2480000, 0.10], [10080000, 0.12], [21140000, 0.22], [40355000, 0.24], [51245000, 0.32],
[76870000, 0.35], [null, 0.37]], '2026-01-01', REV_PROC_2025_32, 'Rev. Proc. 2025-32 §4.01'),
'fed.qbi.rate': rec(0.20, '2018-01-01', IRC_199A, 'IRC 199A, made permanent by P.L. 119-21'),
'fed.qbi.thresholdCents.single': rec(20175000, '2026-01-01', REV_PROC_2025_32, 'the 199A threshold, distinct from the 24% bracket top'),
'fed.qbi.thresholdCents.mfj': rec(40350000, '2026-01-01', REV_PROC_2025_32, ''),
'ky.incomeTax.rate': rec(0.035, '2026-01-01', KY_HB1, 'HB 1 (2025), signed Feb 6, 2025'),
'ky.stdDeductionCents': rec(336000, '2026-01-01', KY_STD, 'DOR 2026 withholding formula; re-check against the 2026 Form 740 instructions when published'),
// ---- F6: estimated-tax due dates ----
'fed.est.dueDates.2026': rec4(['2026-04-15', '2026-06-15', '2026-09-15', '2027-01-15'], '2026-01-01',
'https://www.irs.gov/pub/irs-pdf/f1040es.pdf',
'2026 Form 1040-ES payment schedule: April 15, 2026; June 15, 2026; Sept. 15, 2026; Jan. 15, 2027. Weekdays are Wed, Mon, Tue and Fri, and none is a fe'),
'ky.est.dueDates.2025': rec4(['2025-04-15', '2025-06-16', '2025-09-15', '2026-01-15'], '2025-01-01',
'https://revenue.ky.gov/Forms/740-ES%20(2025).pdf',
'2025 Form 740-ES vouchers: April 15, 2025; June 16, 2025 (June 15 was a Sunday); Sept. 15, 2025; Jan. 15, 2026. Form 2210-K (2025) labels the columns'),
'ky.est.dueDates.2026': rec4(['2026-04-15', '2026-06-15', '2026-09-15', '2027-01-15'], '2026-01-01',
'https://revenue.ky.gov/Forms/740-ES%20Instructions%20(2025).pdf',
"TY2026 740-ES instructions: 'Installments for calendar year 2026 are due April 15, June 15, September 15, 2026, and January 15, 2027.' None falls on a"),
// ---- Q3: safe harbor, underpayment and interest rates (notes as the work order gives them) ----
'fed.est.safeHarbor.currentPct': rec4(0.9, '1987-01-01',
"https://www.law.cornell.edu/uscode/text/26/6654",
"IRC 6654(d)(1)(B)(i): 90% of the tax shown on the return for the taxable year. Confirmed in the 2026 Form 1040-ES (General Rule 2a) and the 2025 Form"),
'fed.est.safeHarbor.priorPct': rec4(1.0, '1987-01-01',
"https://www.law.cornell.edu/uscode/text/26/6654",
"IRC 6654(d)(1)(B)(ii): 100% of the tax shown on the prior-year return. Available only if the preceding year was a full 12-month year and a return was"),
'fed.est.safeHarbor.priorPctHighAgi': rec4(1.1, '2018-03-23',
"https://www.law.cornell.edu/uscode/text/26/6654",
"IRC 6654(d)(1)(C)(i): substitute 110% for 100% if prior-year AGI exceeds $150,000. Flat 110% since Pub. L. 115-141 (2018) replaced the old year-by-yea"),
'fed.est.safeHarbor.highAgiThresholdCents': rec4(15000000, '2018-03-23',
"https://www.law.cornell.edu/uscode/text/26/6654",
"AGI threshold of $150,000 for Single and MFJ: the 110% rule applies when prior-year AGI is strictly MORE than this. Not inflation-indexed. Confirmed i"),
'fed.est.minimumOwedCents': rec4(100000, '1998-01-01',
"https://www.law.cornell.edu/uscode/text/26/6654",
"IRC 6654(e)(1): no addition to tax if the tax shown on the return, minus withholding (the sec. 31 credit), is less than $1,000. The threshold rose fro"),
'fed.est.installmentPct': rec4(0.25, '1987-01-01',
"https://www.law.cornell.edu/uscode/text/26/6654",
"IRC 6654(d)(1)(A): each required installment is 25% of the required annual payment."),
'fed.underpaymentRate.2025Q2': rec4(0.07, '2025-04-01',
"https://www.irs.gov/newsroom/interest-rates-remain-the-same-for-the-second-quarter-of-2025",
"IR-2025-29 (Mar. 6, 2025): 7% per year, compounded daily, for individual underpayments for the quarter beginning Apr. 1, 2025. Also in the IRS quarter"),
'fed.underpaymentRate.2025Q3': rec4(0.07, '2025-07-01',
"https://www.irs.gov/newsroom/interest-rates-remain-the-same-for-third-quarter-of-2025",
"IR-2025-59 (May 12, 2025): 7% for the quarter beginning July 1, 2025 (Rev. Rul. 2025-11, IRB 2025-23)."),
'fed.underpaymentRate.2025Q4': rec4(0.07, '2025-10-01',
"https://www.irs.gov/newsroom/interest-rates-remain-the-same-for-the-fourth-quarter-of-2025",
"IR-2025-87 (Aug. 25, 2025): 7% for the quarter beginning Oct. 1, 2025 (IRB 2025-37)."),
'fed.underpaymentRate.2026Q1': rec4(0.07, '2026-01-01',
"https://www.irs.gov/newsroom/interest-rates-remain-the-same-for-the-first-quarter-of-2026",
"IR-2025-112 (Nov. 13, 2025): 7% for the quarter beginning Jan. 1, 2026 (IRB 2025-48). The 2025 Form 2210 instructions use 0.07 for every 2025 penalty"),
'fed.underpaymentRate.2026Q2': rec4(0.06, '2026-04-01',
"https://www.irs.gov/pub/irs-irbs/irb26-08.pdf",
"Rev. Rul. 2026-5, IRB 2026-8 (Feb. 17, 2026): 'an underpayment rate of 6 percent' for the quarter beginning Apr. 1, 2026 (federal short-term rate of 3"),
'fed.underpaymentRate.2026Q3': rec4(0.07, '2026-07-01',
"https://www.irs.gov/irb/2026-22_IRB",
"Rev. Rul. 2026-10, IRB 2026-22: 7% for the quarter beginning July 1, 2026 (federal short-term rate of 4%, set in April 2026, + 3 points). Confirmed on"),
'fed.underpaymentRate.2026Q4': rec4(0.07, '2026-10-01',
"https://www.irs.gov/newsroom/interest-rates-remain-the-same-for-the-fourth-quarter-of-2026",
"IR-2026-98 (Aug. 21, 2026): 7% per year, compounded daily, for the quarter beginning Oct. 1, 2026 (Rev. Rul. 2026-15, IRB 2026-36)."),
'ky.est.thresholdCents': rec4(50000, '2019-06-27',
"https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=49196",
"KRS 141.305(2): 'No estimated tax shall be required if the estimated tax liability can reasonably be expected to be five hundred dollars ($500) or les"),
'ky.est.safeHarbor.currentPct': rec4(0.9, '2019-06-27',
"https://revenue.ky.gov/Forms/740-ES%20Instructions%20(2025).pdf",
"Via KRS 141.305(3) conformity to IRC 6654(d). TY2026 740-ES worksheet line 13(a) 'Multiply line 12 by 90%'; Form 2210-K (2025) line 6 = line 1 x .90."),
'ky.est.safeHarbor.priorPct': rec4(1.0, '2019-06-27',
"https://revenue.ky.gov/Forms/740-ES%20Instructions%20(2025).pdf",
"100% of the prior-year KY tax liability (the prior return must cover a full 12 months). 740-ES TY2026 line 13(b); Form 2210-K (2025) line 7."),
'ky.est.safeHarbor.priorPctHighAgi': rec4(1.1, '2019-06-27',
"https://revenue.ky.gov/Forms/740-ES%20Instructions%20(2025).pdf",
"Substitute 110% for 100% if prior-year KENTUCKY AGI exceeded $150,000 ($75,000 MFS); not applicable to farmers. Stated in the TY2026 740-ES instructio"),
'ky.est.safeHarbor.highAgiThresholdCents': rec4(15000000, '2019-06-27',
"https://revenue.ky.gov/Forms/2210-K%20(2025).pdf",
"Prior-year Kentucky AGI more than $150,000 (MFS $75,000; MFS status determined for the current year)."),
'ky.interestRate.2025': rec4(0.1, '2025-01-01',
"https://revenue.ky.gov/News/Pages/Tax-Interest-Rate-Update-for-01-01-25.aspx",
"UNDERPAYMENT (tax due) rate for 2025: 10% = tax interest rate 8% + 2% per KRS 131.183(2)(a). The DOR announcement: unpaid taxes accrue interest at 10%"),
'ky.interestRate.2026': rec4(0.09, '2026-01-01',
"https://revenue.ky.gov/News/Pages/Tax-Interest-Rate-Update-for-01-01-26.aspx",
"UNDERPAYMENT (tax due) rate for 2026: 9% = 7% + 2% under KRS 131.183(2)(a); the DOR announcement says unpaid taxes accrue at 9%. The overpayment rate"),
// ---- Q4: annualized-income installment factors (notes as the work order gives them) ----
'fed.ai.periodsEndMonth': rec4([3, 5, 8, 12], '2025-01-01',
"https://www.irs.gov/pub/irs-pdf/f2210.pdf",
"2025 Form 2210, Schedule AI, line 1 column headings: (a) 1/1/25-3/31/25, (b) 1/1/25-5/31/25, (c) 1/1/25-8/31/25, (d) 1/1/25-12/31/25. The periods are"),
'fed.ai.factors': rec4([4, 2.4, 1.5, 1], '2025-01-01',
"https://www.irs.gov/pub/irs-pdf/f2210.pdf",
"2025 Form 2210, Schedule AI, line 2 'Annualization amounts': 4, 2.4, 1.5, 1 (equal to 12/3, 12/5, 12/8, 12/12). The calendar-year individual factors a"),
'fed.ai.applicablePcts': rec4([0.225, 0.45, 0.675, 0.9], '2025-01-01',
"https://www.irs.gov/pub/irs-pdf/f2210.pdf",
"2025 Form 2210, Schedule AI, line 20 'Applicable percentage': 22.5%, 45%, 67.5%, 90%. Statutory source: IRC 6654(d)(2)(C)(ii) table (https://www.law.c"),
'ky.est.ai.factors': rec4([4, 2.4, 1.5, 1], '2025-01-01',
"https://revenue.ky.gov/Forms/2210-K%20(2025).pdf",
"Form 2210-K (2025) Part III (annualized income installment method): periods 1/1/25-3/31/25, -5/31/25, -8/31/25, -12/31/25; annualization factors (line"),
'ky.est.ai.applicablePcts': rec4([0.225, 0.45, 0.675, 0.9], '2025-01-01',
"https://revenue.ky.gov/Forms/2210-K%20(2025).pdf",
"Form 2210-K (2025) Part III line 13: 22.5%, 45%, 67.5%, 90% (same as federal).")
};
// WO-11 J4: facts about who the page is for. Not used in any computation; shown on Assumptions with their source.
// Same five fields as a constant.
const FACTS = {
'ky.nonemployerFirms': { value: 328057, effectiveDate: '2022-12-31',
sourceUrl: 'https://advocacy.sba.gov/wp-content/uploads/2025/06/Kentucky_2025-State-Profile.pdf', verifiedOn: '2026-11-11',
note: 'U.S. Small Business Administration, 2025 Kentucky profile, from Census 2022 data: businesses with no employees.' }
};
function constant(c, key) {
if (!c || !Object.prototype.hasOwnProperty.call(c, key)) throw new Error('missingConstant:' + key);
return c[key].value;
}
return { CONSTANTS, FACTS, constant };
})();
// ---- copy ----
const copy = (() => {
// copy.js — layer 1. Every user-visible string. Imported only by ui.js.
// Outside DISCLAIMER_KEYS no value may use a word from the no-advice list (the build checks this).
const DISCLAIMER_KEYS = ['disclaimerFull', 'disclaimerShort', 'footer'];
function plural(n, one, many) {
return `${n} ${n === 1 ? one : many}`;
}
const MONTHS_SHORT = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const MONTHS_LONG = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
// WO-12 J9: a total built from a ledger that stops before December is a year-to-date figure and says so.
// month: the ledger's last month of the tax year (1-12); anything else reads as a whole year.
const partYear = (month) => Number.isInteger(month) && month >= 1 && month <= 11;
const soFar = (month) => `so far this year (through ${MONTHS_LONG[month - 1]})`;
// WO-13 V4: the period a year-to-date figure runs through, as words: "October" for a ledger that ends on the last day
// of October, "Nov 16" for one that ends mid-month; null for a whole year. A bare month number means that whole month.
const through = (x) => (typeof x === 'number' ? (partYear(x) ? MONTHS_LONG[x - 1] : null) : x || null);
// WO-10 D1: every date a person reads is written "Nov 4, 2026". Inputs and files keep ISO; text that is not an ISO
// date comes back unchanged.
function formatDate(iso) {
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(iso));
if (!m || Number(m[2]) < 1 || Number(m[2]) > 12) return iso;
return `${MONTHS_SHORT[Number(m[2]) - 1]} ${Number(m[3])}, ${m[1]}`;
}
// WO-10 D2: a district's name in plain words for cards and tables. The full recorded name stays in the Rate table and
// the CPA packet. row: { districtId, name, kind, custom }.
const SHORT_NAMES = { 'ky-fayette-lfucg': 'Lexington-Fayette', 'ky-jefferson-metro': 'Louisville Metro',
'ky-boone-county-mental-health': 'Boone County mental health levy' };
function shortDistrictName(row) {
if (row.custom) return row.name;
if (Object.prototype.hasOwnProperty.call(SHORT_NAMES, row.districtId)) return SHORT_NAMES[row.districtId];
if (row.kind === 'school') {
const m = /^(.+? County)\b/.exec(row.name);
return m ? `${m[1]} Schools` : row.name;
}
return row.name.replace(/\s*\(.*\)\s*$/, '');
}
// A constant's value as shown in Assumptions and the CPA packet: a list of dates is written out, anything else is
// shown as stored.
function formatValue(value) {
const isDate = (v) => typeof v === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(v);
if (isDate(value)) return formatDate(value);
if (Array.isArray(value) && value.length > 0 && value.every(isDate)) return value.map(formatDate).join('; ');
return JSON.stringify(value);
}
// WO-11 J6: the product's name. Change it here and the header, the page title, the CPA packet cover and Credits follow.
const PRODUCT_NAME = 'County Line';
const PRODUCT_SUBTITLE = 'Kentucky local tax for the self-employed';
const COPY = {
productName: PRODUCT_NAME,
productSubtitle: PRODUCT_SUBTITLE,
pageTitle: `${PRODUCT_NAME} — ${PRODUCT_SUBTITLE}`,
// The mark: a circle split by a slanted line, as a county line splits a map. Two paths in a 32 by 32 box.
brandMark: { viewBox: '0 0 32 32', first: 'M17.61 2.09A14 14 0 0 0 12.46 29.55Z', second: 'M20.11 2.62A14 14 0 0 1 14.98 29.96Z' },
// WO-11: hero and headline figures are whole dollars and whole percents with "about"; tables, worksheets, the packet
// and What if keep cents and two decimals. Only the printed figure is rounded, never an input to a computation.
fmtDollars0: (cents) => `${cents < 0 ? '-' : ''}$${String(Math.round(Math.abs(cents) / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`,
fmtPctAbout: (share) => `about ${Math.round(share * 100)}%`,
fmtPct0: (share) => `${Math.round(share * 100)}%`,
// R6: disclaimer wording (settled 2026-11-03), shown on first load and reopenable from the footer on every screen.
disclaimerTitle: 'Educational use',
disclaimerFull: 'For educational use only. This page was built for the 2026 Kentucky PFM Challenge. It computes estimates from the numbers you enter and from published tax rates, and it explains how those rates apply. It is not financial, investment, tax or legal advice, it does not know your full situation, and it is not a substitute for a licensed professional or for the instructions that come with each return. Rates and rules change; the Assumptions screen shows the date each figure was verified and the source it came from. Nothing here recommends an investment, a security, a business structure or a specific action. Neither Globefin nor the University of Kentucky endorses this page\'s calculations or conclusions.',
// WO-11 J1: the dialog opens on two short paragraphs; the full text above expands in place.
disclaimerShort: ['This page is for education. It estimates taxes from the numbers you enter and from published rates. It is not financial, investment, tax or legal advice.',
'Your numbers never leave this browser.'],
disclaimerMore: 'Read the full text',
disclaimerContinue: 'Continue',
footer: 'For educational use only. Not financial, investment, tax or legal advice.',
// WO-13 V2: the footer is one line, the disclaimer sentence, this one, then a plain "Disclaimer" button.
footerPrivacy: 'Nothing leaves your browser.',
footerDisclaimerShort: 'Disclaimer',
privacy: "Your numbers stay in your browser and in the files you choose to save. This page makes no network requests, asks for no login, and never sends your numbers anywhere. You can confirm that with your browser's network tab.",
save: 'Save',
saveShortcutHint: 'Ctrl+S (⌘S on a Mac) also saves.',
openDrop: 'Drop a saved file anywhere on this page to open it.',
// WO-13 V2: read after "Save" (the dot on the button): "Save, unsaved changes".
unsaved: ', unsaved changes',
// ---- WO-13 V2: the shell ----
tabs: { overview: 'Overview', ledger: 'Ledger', taxes: 'Taxes', plan: 'Plan', rates: 'Rates' },
ledgerSegments: { entries: 'Entries', places: 'Places', import: 'Import', settings: 'Settings' },
ratesSegments: { rates: 'Rates', assumptions: 'Assumptions', about: 'About' },
add: '+ Add',
more: 'More',
moreItems: { open: 'Open a file', startEmpty: 'Start empty', seeExample: 'See the example', printPacket: 'Print CPA packet',
disclaimer: 'Read the full disclaimer' },
// WO-14 W1: n is the ledger's entry count for the tax year, as text.
exampleBanner: (n) => `Live example: computed from ${n} ledger entries for Marcus Bell, a mobile detailer. Change anything and it recalculates.`,
fmtCount: (n) => String(n).replace(/\B(?=(\d{3})+(?!\d))/g, ','),
heroSource: (n) => `From ${n} ${n === '1' ? 'entry' : 'entries'} in the Ledger`,
tryIt: { label: 'Try it: add a job', amount: 'Amount', place: 'Place', add: 'Add', exampleAmount: '500', examplePlace: 'Georgetown clients',
// WO-15 X3: in the example the row's job takes the ledger's last date, so the period and the monthly figure hold.
dated: (iso) => `Dated ${MONTHS_SHORT[Number(iso.slice(5, 7)) - 1]} ${Number(iso.slice(8, 10))}, the example's last day, so it lands in the same period.` },
useMyNumbers: 'Use my numbers',
startSheet: { quick: 'Quick estimate (1 minute)', empty: 'Start empty', open: 'Open a saved file', cancel: 'Cancel' },
importIntro: 'Choose a CSV file exported from your bank. You see how its columns were read and a preview of the rows before anything is added to the ledger.',
packetCardTitle: 'For your tax preparer',
packetCardText: 'Every figure, the ledger behind it and the source of every rate, laid out to print or save as a PDF.',
saved: (fileName) => `Saved as ${fileName}.`,
opened: (fileName, nTransactions, nLocations) =>
`Opened ${fileName}: ${plural(nTransactions, 'transaction', 'transactions')}, ${plural(nLocations, 'location', 'locations')}.`,
replaceTitle: 'Replace your current work?',
replaceBody: 'Opening this file replaces the work on screen, which has unsaved changes.',
replaceConfirm: 'Replace',
replaceCancel: 'Keep my work',
fileErrorLead: (fileName, field) => `${fileName} can't be opened. The problem is at ${field}:`,
workUnchanged: 'Your current work is unchanged.',
fileErrorTitle: "That file can't be opened",
fileErrorOk: 'OK',
fileErrors: {
json: 'the file is not readable JSON text; it may be cut short or damaged.',
tooLarge: 'the file is larger than the 20 MB this page reads.',
format: 'the file is not a Kentucky Local Tax Ledger save file.',
tooNew: 'the file was saved by a newer version of this page.',
required: 'a required value is missing.',
unknownKey: 'the file contains a field this page does not recognize.',
type: 'the value is not the expected kind (for example, text where a number belongs).',
enum: 'the value is not one of the allowed choices.',
pattern: 'the value is not in the expected format.',
range: 'the value is outside the allowed range or length.',
date: 'the date does not exist on the calendar.',
duplicateId: 'the same identifier appears more than once.',
refMissing: 'the value refers to an entry that is not in the file.',
hashMismatch: 'the entry was changed after it was saved, so its check value no longer matches.',
sign: "the amount's sign does not match its category (income is positive, expenses are negative).",
lineCategory: 'the Schedule C line does not match the category (income uses lines 1 and 6).',
tooMany: 'the list has more entries than this page accepts.'
},
settingsTitle: 'Settings',
settingsNameLabel: 'Workspace name',
taxYearLabel: 'Tax year',
filingStatusLabel: 'Filing status',
filingStatus: {
single: 'Single',
mfj: 'Married filing jointly',
mfs: 'Married filing separately',
hoh: 'Head of household'
},
workspaceSummary: (nTransactions, nLocations) =>
`This workspace holds ${plural(nTransactions, 'transaction', 'transactions')} and ${plural(nLocations, 'location', 'locations')}.`,
stubBanner: 'STUB DATA — NOT FOR SUBMISSION',
// ---- F1: ledger ----
ledgerTitle: 'Ledger',
ledgerYearNote: (taxYear) => `Showing entries dated in ${taxYear}. The tax year in Settings selects the year shown.`,
// ---- WO-13 V4: the add-entry sheet and the paged ledger ----
addTitle: 'Add an entry',
addKindLabel: 'Kind of entry',
addKinds: { job: 'Job', expense: 'Expense' },
addKindWords: { job: 'job', expense: 'expense' },
addFields: { place: 'Place', what: 'What for', description: 'Description (optional)' },
addSubmit: 'Add',
addAnother: 'Add and enter another',
addCancel: 'Cancel',
addPlaceFirst: 'Add a place first',
addedLine: (amount, kind, name) => `Added ${amount} ${kind}, ${name}.`,
addedKept: (kept) => `Kept so far: ${kept}.`,
// WO-14 W2: what the entry just added changed.
addedSeeChanged: 'Added. See what changed.',
changed: {
titleJob: (amount, place) => `What that ${amount} job in ${place} changed`,
titleJobNoPlace: (amount) => `What that ${amount} job changed`,
titleExpense: (amount) => `What that ${amount} expense changed`,
total: 'Total tax',
kept: (kept, pct) => `Kept from this job: ${kept} (${pct})`,
saved: (saved) => `Tax saved: ${saved}`,
caption: 'Each line is the full-year calculation run again with this entry included.',
dismiss: 'Dismiss'
},
ledgerFilters: { search: 'Search descriptions', place: 'Place', type: 'Type', allPlaces: 'All places', allTypes: 'Jobs and expenses', income: 'Jobs and other income',
expense: 'Expenses' },
ledgerPager: { previous: 'Previous', next: 'Next', none: '0 entries',
count: (first, last, total) => `${first}\u2013${last} of ${String(total).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}` },
ledgerNoMatch: 'No entries match the search and filters.',
ledgerEditLabel: (date, description) => `Edit ${description}, ${date}`,
ledgerEdit: 'Edit',
ledgerEditTitle: 'Edit entry',
ledgerDelete: 'Delete',
ledgerDeleteTitle: 'Delete this entry?',
ledgerDeleteConfirm: (date, description, amount) =>
`The ${date} entry "${description}" (${amount}) will be removed from the ledger.`,
ledgerDeleteCancel: 'Keep entry',
ledgerSaveEntry: 'Save changes',
ledgerNeedsLocation: 'Income entries are tied to a work location, and this workspace has no locations yet.',
ledgerDuplicate: 'An entry with the same date, amount and description is already in the ledger.',
ledgerAddAnyway: 'Add anyway',
ledgerEmpty: (taxYear) => `No entries dated in ${taxYear}.`,
ledgerUpdated: 'Entry updated.',
ledgerDeleted: 'Entry deleted.',
ledgerFields: {
date: 'Date',
amount: 'Amount ($)',
description: 'Description',
category: 'Category',
line: 'Schedule C line',
location: 'Work location'
},
ledgerCategory: { income: 'Income', expense: 'Expense' },
ledgerColumns: {
date: 'Date',
description: 'Description',
line: 'Schedule C line',
location: 'Location',
amount: 'Amount',
actions: 'Actions'
},
amountInvalid: 'Enter an amount above zero in dollars and cents, such as 1,234.56.',
amountNegative: 'Enter the amount without a minus sign. The category sets whether it is money in or money out.',
dateInvalid: 'Enter a real calendar date.',
dateRequired: 'Enter a date.',
ledgerLineChoose: '(choose)',
ledgerLineRequired: 'Choose what this expense was for.',
ledgerLineGroups: { common: 'Common', other: 'Other Schedule C lines' },
scheduleCTitle: 'Schedule C totals',
scheduleCGross: 'Gross receipts (line 1)',
scheduleCOther: 'Other income (line 6)',
scheduleCTotalExpenses: 'Total expenses',
scheduleCNet: 'Net profit (line 31)',
scheduleCNoExpenses: 'No expenses recorded for this year.',
scheduleCLabels: {
'1': 'Gross receipts or sales',
'6': 'Other income',
'8': 'Advertising',
'9': 'Car and truck expenses',
'10': 'Commissions and fees',
'11': 'Contract labor',
'12': 'Depletion',
'13': 'Depreciation and section 179 expense deduction',
'14': 'Employee benefit programs',
'15': 'Insurance (other than health)',
'16a': 'Interest: Mortgage (paid to banks, etc.)',
'16b': 'Interest: Other',
'17': 'Legal and professional services',
'18': 'Office expense',
'19': 'Pension and profit-sharing plans',
'20a': 'Rent or lease: Vehicles, machinery, and equipment',
'20b': 'Rent or lease: Other business property',
'21': 'Repairs and maintenance',
'22': 'Supplies (not included in Part III)',
'23': 'Taxes and licenses',
'24a': 'Travel',
'24b': 'Deductible meals',
'25': 'Utilities',
'26': 'Wages (less employment credits)',
'27a': 'Other expenses',
'27b': 'Energy-efficient commercial buildings deduction (Form 7205)',
'30': 'Expenses for business use of your home'
},
// ---- F2: bank CSV import ----
importButton: 'Import bank CSV',
importTitle: 'Import a bank CSV file',
importFileName: (fileName) => `File: ${fileName}`,
importRawTitle: 'First rows of the file',
importShape: 'How the file shows amounts',
importShapes: {
signed: 'One amount column (negative = money out)',
debitCredit: 'Separate debit and credit columns',
typed: 'Amount column plus a type column'
},
importColumn: {
date: 'Date column',
description: 'Description column',
amount: 'Amount column',
debit: 'Debit (money out) column',
credit: 'Credit (money in) column',
type: 'Type column',
inflowValue: 'Type value that means money in'
},
importChoose: '(choose)',
importDateOrderNote: 'Dates written with slashes are read month/day/year: 3/4/2026 is March 4, 2026.',
importPreviewTitle: 'Rows to import',
importPreviewCount: (nRows, nDuplicates) =>
`${plural(nRows, 'row', 'rows')} mapped; ${plural(nDuplicates, 'row is', 'rows are')} already in the ledger.`,
importPreviewMore: (nHidden) => `${plural(nHidden, 'more row', 'more rows')} not shown in this preview.`,
importPreviewColumns: { date: 'Date', description: 'Description', amount: 'Amount', category: 'Category', status: 'Status' },
importNew: 'New',
importDuplicate: 'Already in the ledger',
importParseErrorCount: (n) => `${plural(n, 'line', 'lines')} of the file could not be read:`,
importRowErrorCount: (n) => `${plural(n, 'row', 'rows')} could not be mapped:`,
importErrorLine: (line, text) => `Line ${line}: ${text}`,
importErrorRow: (row, text) => `Data row ${row}: ${text}`,
importErrors: {
fieldCount: 'the row has a different number of fields from the header row.',
unterminatedQuote: 'a quoted field is never closed.',
debitCredit: 'the debit and credit cells are both filled or both empty.',
zero: 'the amount is zero, so the row is skipped.',
date: 'the date could not be read.',
amount: 'the amount could not be read.'
},
importNeedsLocation: 'Money-in rows become income entries, which are tied to a work location, and this workspace has no locations yet.',
importDefaultLocation: 'Default location for income rows',
importCommit: 'Import',
importCancel: 'Cancel',
importDone: (added, skipped, errors) =>
`Imported ${plural(added, 'entry', 'entries')}; ${plural(skipped, 'row', 'rows')} skipped as already in the ledger; ${plural(errors, 'row', 'rows')} with problems.`,
importTooLarge: 'That CSV file is larger than the 5 MB this page imports.',
importNoRows: 'The file has a header row but no data rows.',
// ---- F3: locations ----
locationsTitle: 'Work locations',
locationsIntro: 'Each place you work has its own local taxes. A ZIP code only narrows the choice; you confirm the county and city.',
locationsEmpty: 'No work locations yet.',
residentCountyLabel: 'Where do you live?',
residentCountyNone: '(not set)',
locationAdd: 'Add a place',
placeAdd: 'Add a place',
locationEditTitle: 'Edit location',
locationEdit: 'Edit',
locationDelete: 'Delete',
locationSave: 'Save location',
locationCancel: 'Cancel',
locationName: 'Name',
locationZip: 'ZIP code',
locationCounty: 'County',
locationCity: 'City',
locationNoCity: 'Outside every city in the table',
// WO-11 J5: one plain question; the answers are the city names (without "City of"), a different city, or no city.
noneOfThese: "No, it's outside any city",
cityOther: 'A different city',
cityHint: "A mailing address isn't always inside the city limits. Your county's property tax bill or the PVA website shows it.",
zipNotInTable: (nJurisdictions) => `This page covers ${nJurisdictions} Kentucky jurisdictions, and this ZIP code is not in any of them. If you have your local license or last year's local return, enter its rate by hand; it is marked unverified.`,
mergedCountyNote: (name) => `${name} is one merged city and county government, so there is no separate city to choose here.`,
locationCountyChoose: '(choose a county)',
zipMode: 'Choose how to describe this location',
zipModeManual: 'Pick a county and city from the rate table',
zipModeCustom: 'Enter a local rate by hand (not in table)',
customRateName: 'District name',
customRateKind: 'District kind',
customRateKinds: { county: 'County', city: 'City', school: 'School district' },
customRateBase: 'Taxed on',
customRateBases: { netProfit: 'Net profit', grossReceipts: 'Gross receipts' },
customRatePct: 'Rate (%)',
customRatePctInvalid: 'Enter a rate from 0 to 5 percent, such as 1.25.',
customRateNameInvalid: 'Enter a district name of 1 to 120 characters.',
cityQuestion: 'Is this place inside a city?',
countyNotListed: "A county that isn't in this version's table",
cityNotListed: "Inside a city that isn't in this version's table",
cityNotListedName: 'City name',
requiresUserRate: (name) => {
const city = name.replace(/^City of /, '');
return `${city} taxes each business by its license class. Enter the rate on your ${city} license, or leave it blank to see this location without ${city}.`;
},
userRateLabel: 'Rate on your license (%)',
notInTable: 'not in table',
locationDistrictsPreview: 'Taxes that apply here',
locationDistrictsNone: 'Pick an answer above to see them.',
districtMissing: (districtId) => `${districtId} (no rate row in force for this tax year)`,
locationColumns: { name: 'Name', zip: 'ZIP', districts: 'Districts', income: 'Income entries', actions: 'Actions' },
locationNameInvalid: 'Enter a name of 1 to 120 characters.',
locationZipInvalid: 'Enter a 5-digit ZIP code, or leave it empty.',
locationCountyRequired: 'Choose a county.',
locationCityRequired: 'Answer the city-limits question.',
locationInUse: (n) => `This location has ${plural(n, 'income entry', 'income entries')}, so it stays. Move or delete those entries first.`,
locationSaved: 'Location saved.',
locationDeleted: 'Location deleted.',
// ---- F5: tax summary ----
taxTitle: 'Tax summary',
taxYearNote: (taxYear) => `Computed for tax year ${taxYear} from the ledger, the work locations and the rate table.`,
taxNetProfit: 'Schedule C net profit',
// WO-13 V5: the Taxes tab. The hero is a caption, the total in whole dollars and one line (its three figures are
// set between these four pieces); the CPA packet keeps the form's words.
taxHeroLabel: (period) => (through(period) ? 'Tax owed so far this year' : 'Tax owed this year'),
taxHeroSub: ['on ', ' of business profit. ', ' of profit, ', ' of what you took in.'],
taxLocalTitle: 'Local occupational taxes',
taxLocalColumns: { district: 'Office', rate: 'Rate', factor: 'Share of your work', liability: 'Tax', status: 'Status' },
taxLocalCaption: "A county taxes all the work done inside it. A city taxes only the part done inside city limits, so a city's share can be smaller than its county's.",
taxGroupOther: 'Entered by hand',
taxRestTitle: 'Everything else',
taxReasons: {
exemption: (amount) => `First ${amount} of profit there is exempt`,
cap: (amount) => `Capped at ${amount}`,
minimum: (amount) => `Minimum ${amount} applies`,
credit: (amount) => `${amount} credit for tax paid to another office`
},
taxBase: { netProfit: 'Net profit', grossReceipts: 'Gross receipts', payroll: 'Payroll', none: 'No business levy' },
taxLocalNone: 'No work location has a local tax in the rate table yet.',
taxLocalTotal: 'Local total',
taxSe: 'Self-employment tax',
taxFederal: 'Federal income tax',
taxKy: 'Kentucky income tax',
taxCombined: 'Combined total',
taxLocalShareNote: 'Each office taxes only the share of your work done there.',
taxShareOfGross: 'Combined total as a share of gross receipts',
taxShareOfNet: 'Combined total as a share of net profit',
taxShareNone: 'not computed (no positive base)',
taxUnsupported: 'Head of household and married filing separately are not computed in this version. The figures cover single and married filing jointly.',
filingStatusUnsupported: 'not computed in this version',
qbiAboveThreshold: 'Taxable income is above the IRC 199A threshold. This page still applies the simple 20% deduction and does not model the W-2 wage and property limits above it.',
taxAssumptionsTitle: 'Assumptions behind these figures',
assumptionPropertyFactor: 'Apportionment uses the sales factor only, because this version has no payroll or property inputs. In a district that uses three factors, a business with property elsewhere would apportion a smaller share.',
assumptionTaxTable: 'Federal income tax is computed from the rate schedule, not the IRS Tax Table, so for taxable income under $100,000 it can differ from a filed return by a few dollars.',
assumptionLocalNotDeducted: 'Local occupational license taxes are not deducted on Schedule C here. That is the conservative, higher-tax reading, and it remains an open question for a tax professional.',
// ---- F6: CPA packet ----
packetButton: 'Open the CPA packet',
packetTitle: 'CPA packet',
packetPrint: 'Print or save as PDF',
packetClose: 'Back to Taxes',
packetUntitled: 'Untitled workspace',
packetPurpose: 'Prepared for review by a tax professional. Every figure below is computed from the ledger and the rate table in this file.',
packetSections: {
cover: 'Cover', summary: 'Combined summary', scheduleC: 'Schedule C mapping', apportionment: 'Apportionment worksheet',
districts: 'District worksheets', dueDates: 'Due dates', ledger: 'Ledger', assumptions: 'Assumptions'
},
packetCover: { name: 'Workspace', taxYear: 'Tax year', filingStatus: 'Filing status', asOf: 'As of', resident: 'Resident county',
frozenOn: 'Rate table frozen on' },
packetResidentNone: 'Not set',
packetNetProfitLine: '31 Net profit',
packetTotalExpensesLine: '28 Total expenses',
packetApportionColumns: { district: 'District', salesIn: 'Sales in district', salesEverywhere: 'Sales everywhere', factor: 'Factor',
method: 'Method' },
apportionmentMethods: { krs67753: 'Sales and payroll (KRS 67.753)', threeFactor: 'Payroll, sales and property' },
packetNoDistricts: 'No district lines for this tax year.',
returnLine: {
base: 'Base', factor: 'Apportionment factor', apportioned: 'Apportioned base', exemption: 'Exemption', taxable: 'Taxable amount',
rate: 'Rate', computed: 'Computed tax', afterCap: 'After the cap', afterMinimum: 'After the minimum', flatFee: 'Flat license fee',
credit: 'Credit', liability: 'Liability'
},
returnLinePortion: (cityName, ratePct) => `Portion inside ${cityName} at ${ratePct}%`,
returnLinePortionOutside: (ratePct) => `Portion outside at ${ratePct}%`,
returnWorksheetNote: "Line labels follow this page's computation; the official form's line numbers differ by district.",
packetForm: (formId) => `Form: ${formId}`,
packetFormNone: 'Form: not named in the rate table',
packetSource: (url) => `Source: ${url}`,
packetSourceNone: 'Source: entered by hand',
calendarUnavailable: (taxYear) => `Estimated-tax due dates for ${taxYear} are not in this version's constants.`,
packetDueColumns: { installment: 'Installment', federal: 'Federal (Form 1040-ES)', ky: 'Kentucky (Form 740-ES)' },
packetLedgerColumns: { date: 'Date', description: 'Description', location: 'Location', line: 'Schedule C line', amount: 'Amount' },
packetLedgerEmpty: (taxYear) => `No entries dated in ${taxYear}.`,
packetConstantsTitle: 'Constants used',
packetConstantColumns: { key: 'Key', value: 'Value', source: 'Source' },
// ---- WO-06: What if (quant panels) ----
whatIfTitle: 'What if',
whatIfIntro: 'Each panel recomputes the year from this ledger. Nothing here is saved except the settings each panel shows.',
quantNoLocations: 'Add a work location to see these figures.',
q1Title: 'Next $1,000',
q1StepLabel: 'Next amount of gross receipts (dollars, $100 to $10,000)',
q1StepInvalid: 'Enter an amount from $100 to $10,000.',
q1Columns: { location: 'Location', se: 'Self-employment tax', federal: 'Federal income tax', ky: 'Kentucky income tax',
local: 'Local taxes', total: 'Total tax', kept: 'Kept', rate: 'Rate' },
q1ApportionmentNote: 'Each figure recomputes the whole year. Income earned in one place also shifts how your profit is divided among every district you work in, so the local change is not simply the stacked rate.',
q2Title: 'Price a job',
q2FromLabel: 'Job location',
q2QuoteLabel: 'Quote (dollars)',
q2ToLabel: 'Compared with',
q2QuoteInvalid: 'Enter a quote in dollars, such as 165.',
q2Result: (quote, fromName, net, toName, equivalent) =>
`A ${quote} job in ${fromName} leaves ${net} after every tax; to net the same in ${toName}, the equivalent quote is ${equivalent}.`,
q2Lower: (fromName, toName) =>
`The equivalent quote in ${toName} is lower than in ${fromName}: the districts there take a smaller share of the apportioned profit, so each dollar nets more.`,
q2None: (toName) => `No quote up to four times this one nets the same in ${toName}.`,
q5Title: 'How much to save',
q5Result: (pct, confidencePct, draws) =>
`Setting aside ${pct} of every invoice covers the projected year-end total in ${confidencePct} of ${draws} simulated years.`,
q5ConfidenceLabel: 'Confidence',
q5Totals: { p10: 'Year-end total, 10th percentile', p50: 'Year-end total, median', p90: 'Year-end total, 90th percentile' },
q5History: (historyMonths, asOfMonth) =>
`Resampled from ${historyMonths} earlier ${historyMonths === 1 ? 'month' : 'months'}; the ledger runs through month ${asOfMonth} of the tax year.`,
q5FullYear: 'The ledger already runs through December, so every simulated year is the actual year and the three totals match.',
q5NoHistory: 'No earlier month in this ledger to resample yet. The set-aside appears once the ledger holds a month before its latest one.',
q3Title: 'Quarterly payments',
q3FederalTitle: 'Federal estimated tax (Form 1040-ES)',
q3KyTitle: 'Kentucky estimated tax (Form 740-ES)',
// WO-11 J3: the comparison is one line above the table; each row ends with its status (Passed and paid or missed, or Due).
q3Columns: { due: 'Due date', amount: 'Installment', skipCost: 'If skipped until the filing date', days: 'Days', hold: 'Held instead, it earns',
status: 'Status' },
q3CompareLead: 'Paying an installment at its due date avoids the underpayment penalty in the "If skipped" column, which runs to the filing date.',
q3HoldLead: (rate) => `The last amount is what the installment would earn at ${rate} a year if held until the filing date.`,
q3Passed: (status) => `Passed · ${status}`,
q3Due: 'Due',
q3PassedStatus: { paid: 'paid', short: 'part paid', missed: 'missed' },
q3Basis: {
current90: "90% of this year's tax",
prior100: "100% of last year's federal tax",
prior110: "110% of last year's federal tax (last year's AGI was over $150,000)",
noPriorLiability: 'No federal tax for last year, so no estimated payments are due',
belowThreshold: 'Under the threshold, so no estimated payments are due'
},
q3Required: (basis, amount) => `Required annual payment: ${amount} (${basis}).`,
q3SavingsLabel: 'Savings rate for comparison (percent a year)',
q3SavingsInvalid: 'Enter a rate from 0 to 20 percent, such as 4.5.',
noPriorLiabilityNote: 'No estimated payments are due when last year was a full 12-month tax year, you were a U.S. citizen or resident for all of it, and your total tax for it was zero (IRC 6654(e)(2)).',
kyPriorYearNote: "This version stores no prior-year Kentucky tax, so Kentucky's 100% / 110% prior-year test is not offered; the 90% current-year figure is the higher one.",
rateCarriedForward: 'Some days fall after the latest announced rate, so that rate is carried forward for them.',
localEstimatesNote: 'Some districts ask for local estimated payments; this version does not model them.',
priorYearTaxLabel: 'Prior-year federal total tax (income tax plus self-employment tax, dollars)',
priorYearAgiLabel: 'Prior-year federal AGI (dollars)',
priorYearInvalid: 'Enter a dollar amount, such as 10000, or leave it blank.',
packetDueAmountsColumns: { fedAmount: 'Federal installment', kyAmount: 'Kentucky installment' },
q6Title: 'Unfiled returns',
q6AsOf: (date) => `As of ${date}. Local returns only; federal and Kentucky back taxes are not computed here.`,
q6Columns: { district: 'District', year: 'Tax year', status: 'Status', tax: 'Tax', months: 'Months late', penalty: 'Penalty',
interest: 'Interest', total: 'Total', action: 'Filing' },
q6Status: { late: 'Late', accruing: 'Not yet due' },
q6MarkFiled: 'Mark filed',
q6MarkFiledLabel: (name, year) => `Mark ${name} ${year} filed`,
q6Totals: { late: 'Late returns, with penalty and interest', accrued: 'This year, accruing', exposure: 'Total' },
q6Result: (exposure, perMonth) => `Filing these returns today: ${exposure}. Each month of waiting adds about ${perMonth}.`,
q6RateUnknown: 'rate not in the table',
q6None: 'No unfiled local returns for earlier years in this ledger.',
q6CurveTitle: 'The total over the next twelve months',
q6CurveColumns: { date: 'Date', exposure: 'Total' },
assumptionDueDate: 'Local returns are taken as due April 15 after the tax year: calendar-year filers, with no shift for weekends or holidays.',
q4Title: 'Uneven income',
q4Explain: 'The annualized method sets each payment from the income earned so far, so a slow first half means smaller early payments. Both schedules avoid the underpayment penalty when paid on time.',
q4Columns: { due: 'Due date', regular: 'Even schedule', required: 'Annualized schedule', deferred: 'Held until later', status: 'Period' },
q4Pending: 'pending: the ledger does not reach this period yet',
q4Available: 'available',
q4NoneDue: 'No estimated payments are due on this basis, so both schedules are zero.',
assumptionAiWageBase: 'The annualized schedule computes self-employment tax on annualized earnings with the full Social Security wage base; Schedule AI prorates the wage base, which matters only above it.',
// ---- WO-07: demo and screens ----
startedOwn: 'Started an empty workspace. "See the example" brings the demo back.',
openedExample: 'The example is open again.',
seeExampleReplaceBody: 'Opening the example replaces the work on screen, which has unsaved changes.',
startOwnReplaceBody: 'Starting with your own data replaces the work on screen, which has unsaved changes.',
// WO-11 J1: screen 1 leads with what is left, then what goes to the tax offices and what to set aside.
// ---- WO-13 V3: the Overview dashboard ----
throughLabel: (month, day, monthEnd) => (monthEnd ? MONTHS_LONG[month - 1] : `${MONTHS_SHORT[month - 1]} ${day}`),
heroCaption: (period) => (through(period) ? `Kept so far this year (through ${through(period)})` : 'Kept this year'),
heroSub: (gross, monthly) => `of ${gross} invoiced. About ${monthly} a month.`,
statTax: (period) => (through(period) ? 'Total tax so far' : 'Total tax this year'),
statSetAside: 'Set aside from every invoice',
statSetAsideTypical: (amount, ticket) => `${amount} on a typical ${ticket} job`,
statSetAsidePer: (amount, per) => `${amount} on every ${per} invoiced`,
statJar: 'Tax jar',
statJarValue: { short: (gap) => `Short by ${gap}`, ahead: (gap) => `Ahead by ${gap}`, even: () => 'On target' },
statJarCaption: (saved, target) => `${saved} saved of ${target}`,
officesCardTitle: 'Where the tax goes',
officeColumns: { office: 'Office', kind: 'What it is', amount: 'Amount', status: 'Status' },
unfiledTitle: 'Unfiled returns',
missedTitle: 'Missed payments',
unfiledRows: {
never: (n, period) => `Local tax owed ${through(period) ? 'so far' : 'this year'} to the ${plural(n, 'office', 'offices')} he has never filed with`,
neverYours: (n, period) => `Local tax owed ${through(period) ? 'so far' : 'this year'} to the ${plural(n, 'office', 'offices')} with an earlier return not marked filed`,
catchUp: "Catch-up on last year's returns today",
catchUpYours: "Catch-up on earlier years' returns today",
later: 'The same returns a year from now',
thisYear: 'Added if this year also goes unfiled',
skip: 'Underpayment penalties on missed quarterly payments',
skipYours: 'Underpayment penalties on quarterly payments not entered in the Tax jar'
},
unfiledTotal: (total) => `${total} of that is pure penalty and interest.`,
unfiledDetail: 'See the detail',
placesCardTitle: 'Where the job is changes the tax',
placesCardLink: 'Price a job',
localTitleNext: (step) => `Local tax alone on the next ${step}, by place`,
overviewClosing: "Bookkeeping apps, tax software and bank apps don't track these local returns.",
// WO-14 W5: why the numbers can be trusted. Every count is passed in: the rate table's jurisdictions, the worked
// examples of the last full test run, and the names of the places left out of the table.
trust: {
title: 'Why you can trust these numbers',
rates: (n) => `Every rate comes from a published ordinance or the tax office's own form. ${n} offices, each with its source and the date it was checked.`,
examples: (n) => `The arithmetic is checked against ${n} worked examples, to the cent, every time the page is built.`,
leftOut: (names) => `Places that couldn't be confirmed from published documents were left out: ${names}. Anywhere else takes a rate you enter, marked unverified.`,
leftOutNone: 'A place the table does not cover takes a rate you enter, marked unverified.',
seeRates: 'See the rates and sources',
showMath: 'Show the math'
},
hundredTitle: 'Where every $100 goes',
hundredParts: { costs: 'Business costs', taxes: 'Taxes', kept: 'What he keeps', keptYours: 'What you keep' },
hundredLabel: (costs, taxes, kept) => `Of every $100 invoiced, ${costs} goes to business costs, ${taxes} to taxes, and ${kept} is kept.`,
hundredColumns: { part: 'Part', amount: 'Of every $100' },
yoursHeroNone: (gross, period) => `Of the ${gross} this ledger shows ${through(period) ? `so far this year (through ${through(period)})` : 'this year'}, nothing is left after business costs and taxes.`,
// J9: with months still to come, the year's whole bill at the pace so far (Q5's median).
screen1Pace: (total) => `At this pace the full-year bill is about ${total}.`,
screen1Owed: (combined, nOffices, nUnfiled) => `${combined} goes to ${nOffices} tax offices. ${nUnfiled} of them he has never filed with.`,
yoursOwed: (combined, nOffices, nUnfiled) => `${combined} goes to ${nOffices} tax offices.${nUnfiled === 0 ? ''
: nUnfiled === 1 ? ' One of them has an earlier return not marked filed.' : ` ${nUnfiled} of them have an earlier return not marked filed.`}`,
yoursHeadlineEmpty: "Add where you work and what you took in to see this year's taxes and who they go to.",
officeNames: { irs: 'IRS', kydor: 'Kentucky Department of Revenue' },
officeKinds: { federal: 'Federal income tax and self-employment tax', state: 'Kentucky income tax', county: 'County occupational tax',
city: 'City occupational tax', school: 'School district occupational tax', merged: 'City-county occupational tax',
custom: 'Local rate entered by hand' },
officeStatus: { filed: 'Filed', neverFiled: 'Never filed', notDue: 'Not due yet' },
// J9: the IRS and Kentucky cards say what the tax jar says about the quarterly payments that have come due.
officePaymentsMissed: (n) => `${n} ${n === 1 ? 'payment' : 'payments'} missed`,
officePaymentsShort: (n) => `${n} ${n === 1 ? 'payment' : 'payments'} short`,
// WO-11 J4: the hidden part of the bill, in whole dollars. Each line shows only when its amount is more than zero.
// J9: like for like. The same returns today and a year from now; this year's, if they go unfiled too, on their own line.
catchUpNone: 'This ledger shows no unfiled local returns for earlier years.',
sparkLabel: (start, end) => `Total owed over the next twelve months, from ${start} today to ${end} in twelve months.`,
sparkTitle: 'Cost of the unfiled returns, next twelve months',
sparkToday: 'today',
sparkPlus12: '+12 mo',
sparkDueTick: 'This year\'s returns become late here.',
sparkJump: (date) => `The jump is ${date}, when this year's returns become late.`,
sparkColumns: { date: 'Date', total: 'Total' },
barOutsideCity: (county) => `${county} outside city`,
barSegments: { se: 'Self-employment', federal: 'Federal', ky: 'Kentucky', local: 'Local' },
barLabel: (rate, kept) => `${rate} · keeps ${kept}`,
// WO-10 D2: screen 2 shows one place in full for context, then the local tax alone for every place.
contextTitle: (step, place) => `Every tax on the next ${step}, in ${place}`,
contextChartLabel: (step, place) => `Tax on the next ${step} of receipts in ${place}, split into self-employment, federal, Kentucky and local tax.`,
contextColumns: { tax: 'Tax', amount: 'Amount' },
localChartLabel: (step) => `Local tax on the next ${step} of receipts, by where it is earned, highest first.`,
localColumns: { place: 'Place', local: 'Local tax' },
barSegmentTitle: (segment, amount) => `${segment}: ${amount}`,
localSpread: (ratio) => (ratio >= 2.25 ? `The local share is ${ratio.toFixed(1)} times as large in the costliest place as in the cheapest.`
: ratio >= 2 ? 'The local share doubles depending on where the job is.'
: ratio >= 1.75 ? 'The local share nearly doubles depending on where the job is.'
: ratio >= 1.05 ? `The local share is ${Math.round((ratio - 1) * 100)}% larger in the costliest place than in the cheapest.`
: 'The local share is about the same wherever the job is.'),
localSpreadZero: (max) => `Some places here add no local tax on that job; the costliest adds ${max}.`,
screen2Annual: (localTotal, period) => (through(period) ? `So far this year (through ${through(period)}), local taxes take ${localTotal}.`
: `Across the year, local taxes take ${localTotal}.`),
// WO-13 V6: the Plan tab's cards.
setAsideTitle: (pct) => `Set aside ${pct} of every invoice`,
proofLegendNote: (band) => `The green band is where the money set aside is ahead of the bill.${band ? ' The shaded range is where the bill lands in 10 to 90 of every 100 simulated years.' : ''}`,
quarterlyTitle: 'Quarterly payments',
whyTheseDatesText: 'Estimated tax goes in four times a year: April 15, June 15, September 15 and January 15 of the next year, or the next business day when one falls on a weekend or a holiday. Each amount is the year\'s required payment split in four; the What if panel "Quarterly payments" shows how that figure is worked out.',
whyTheseDatesLink: 'See every assumption',
whatIfStats: {
q1Kept: 'Kept', q1Tax: 'Tax on it', q1Rate: 'Rate', q1Note: (step, place) => `On the next ${step} earned at ${place}.`,
q2Quote: 'Quote', q2Net: 'Kept from it', q2Equivalent: 'Quote for the same take-home there',
q3Federal: 'IRS, each payment', q3Ky: 'Kentucky, each payment',
q4Regular: 'First IRS payment, in four equal parts', q4Required: 'First IRS payment, by income so far'
},
screen3Basis: (historyMonths, draws) => `Based on his own ${historyMonths} months of income, resampled ${draws} times.`,
yoursScreen3Basis: (historyMonths, draws) => `Based on this ledger's ${historyMonths} months of income, resampled ${draws} times.`,
computing: 'Computing…',
// WO-11 J7: plan next year (screen 3 and "How much to save").
planToggle: 'Plan next year',
planBack: 'Back to this year',
planHeading: (year, pct, conf) => `In ${year}, setting aside ${pct} of every invoice covers the year-end bill ${conf} of the time.`,
planResult: (year, pct, confidencePct, draws) =>
`For ${year}, setting aside ${pct} of every invoice covers the year-end total in ${confidencePct} of ${draws} simulated years.`,
planCaption: (year, pct, conf) => `In ${year}, at ${pct}, the money set aside stays ahead of the bill in ${conf} of simulated years.`,
planBasis: (year, historyMonths) =>
`All twelve months of ${year} are drawn from the ${historyMonths} ${historyMonths === 1 ? 'month' : 'months'} in this ledger, at the local rates in force for ${year}.`,
planFallback: (figuresYear, year) => `Uses ${figuresYear} federal and Kentucky figures until ${year}'s are published.`,
planNoHistory: 'Add a month of entries to plan next year.',
planTotals: (year) => ({ p10: `${year} total, 10th percentile`, p50: `${year} total, median`, p90: `${year} total, 90th percentile` }),
// WO-11 J4: the proof chart.
proofTitle: 'Tax built up and money set aside, month by month',
proofTax: 'Tax built up',
proofTaxPlan: 'Tax built up',
proofSet: (pct) => `Set aside at ${pct}`,
proofCovered: 'Covered',
proofPaid: (amount) => `Paid and saved: ${amount}`,
proofCaption: (pct, conf) => `At ${pct}, the money set aside stays ahead of the bill in ${conf} of simulated years.`,
proofLabel: (tax, set, pct) => `Tax built up month by month against money set aside at ${pct}; by December the tax is ${tax} and the money set aside is ${set}.`,
proofColumns: { month: 'Month', tax: 'Tax built up (median)', set: 'Set aside', p10: 'Tax, 10th percentile', p90: 'Tax, 90th percentile' },
fanToday: 'today',
fanActual: 'actual',
fanProjected: 'projected',
monthsShort: MONTHS_SHORT,
screen3DateColumns: { due: 'Due date', federal: 'Federal', ky: 'Kentucky', status: 'Status' },
screen3DateStatus: (office, status) => `${office}: ${status}`,
whyTheseDates: 'Why these dates',
rateBrowserTitle: 'Rate table',
rateBrowserHeader: (rowCount, districtCount, frozenOn) =>
`${districtCount} Kentucky jurisdictions, ${rowCount} rate rows, verified against published documents and frozen ${frozenOn}.`,
rateYearLabel: 'Rows in force for tax year',
rateCountyLabel: 'County',
rateCountyAll: 'All counties',
rateSearchLabel: 'Search by name',
rateShowing: (n) => `Showing ${n} ${n === 1 ? 'row' : 'rows'}.`,
// WO-11 J6: seven columns; the rest of a row is in its detail.
rateColumns: { name: 'Place', base: 'Taxed on', rate: 'Rate', limits: 'Limits', source: 'Source', verified: 'Checked' },
rateChevron: '\u203A',
// WO-14 W4: the arithmetic behind a local office's tax, and where its rate comes from. The amounts and percents are
// passed in as text; ui-math.js checks every line it builds from these before showing it.
math: {
baseWords: { netProfit: 'profit', grossReceipts: 'receipts' },
plain: (base, word, share, rate) => `${base} ${word} × ${share} of your work × ${rate}`,
withExemption: (base, share, exempt, rate) => `(${base} × ${share} − ${exempt} exempt) × ${rate}`,
fromApportioned: (amount, rate) => `${amount} × ${rate}`,
fromApportionedExempt: (amount, exempt, rate) => `(${amount} − ${exempt} exempt) × ${rate}`,
apportionedLead: (amount, base, word, share) => `${amount} of the ${base} ${word} is for work here (about ${share} of your work).`,
insideExemption: (amount, base, word, full) => `${amount} of the ${base} ${word} is for work here, all of it inside the ${full} exemption: $0.00`,
equals: (line, result) => `${line} = ${result}`,
cap: (cap) => `capped at ${cap} = ${cap}`,
minimum: (min) => `raised to the ${min} minimum = ${min}`,
fee: (from, fee, to) => `${from} + ${fee} license fee = ${to}`,
credit: (from, credit, name, to) => `${from} − ${credit} credit${name ? ` for tax paid to ${name}` : ''} = ${to}`,
portionTerm: (amount, where, rate) => `${amount} ${where} × ${rate}`,
outsideCities: 'outside the cities',
insideCity: (name) => `inside ${name}`,
source: (title, date) => `Rate from ${title}, checked ${date}.`,
sourceUndated: (title) => `Rate from ${title}.`,
sourceCustom: 'Rate entered by hand for a place the table does not cover. It has no published source here and is marked unverified.',
caption: 'Check it with a calculator.',
none: 'This figure takes more steps than fit on one line. The CPA packet lists each one.',
toggleLabel: (name) => `Show the math for ${name}`,
toggleTitle: 'Show the math',
forms: {
irs: 'Self-employment tax on net profit, plus income tax from the federal rate schedule after the deductions listed in Assumptions.',
kydor: "Kentucky's flat income tax rate on net profit after the Kentucky deductions listed in Assumptions."
},
assumptionsLink: 'See the assumptions',
column: 'Show the math'
},
rateRulesLine: (rules) => `Special rules: ${rules}`,
rateLimits: { minimum: (amount) => `minimum ${amount}`, cap: (amount) => `capped at ${amount}`, exemption: (amount) => `first ${amount} exempt`,
flat: (amount) => `flat ${amount}` },
rateDetail: 'Details',
rateDetailLabel: (name) => `Details for ${name}`,
rateDetailLines: { kind: (kind) => `Kind: ${kind}`, dates: (dates) => `In force: ${dates}`, flags: (flags) => `Checks: ${flags}` },
rateKinds: { county: 'County', city: 'City', school: 'School district', merged: 'Merged government' },
rateUserEntered: 'set by license class',
rateNone: '—',
rateSourceLink: 'source',
rateDates: (from, to) => `${from} to ${to}`,
rateBefore2024: 'before 2024',
rateInForce: 'in force',
rateRules: {
outsideCities: 'outside cities only',
notInside: (cities) => `not inside ${cities}`,
insideRate: (rate, city) => `${rate}% inside ${city}`,
creditAgainst: (name) => `credit against ${name}`,
userRate: 'you enter your rate',
residentsOnly: 'residents only',
fileAtZero: 'file even at $0'
},
rateFee: (label, amount) => `${label} — ${amount} — shown for information; not added to the tax`,
rateShowChecks: "Show every row's details",
rateNotesLead: 'Source notes (quoted as recorded)',
droppedTitle: 'Dropped from this version',
droppedNames: { 'ky-london-city': 'London (city)', 'ky-powell-county': 'Powell County' },
droppedReasons: {
'ky-london-city': 'Rate and base of the city levy not readable from any published document (Ord. 2008-08 is a scan that could not be read); London Privilege License noted as a credit on the Laurel County return.',
'ky-powell-county': 'Base (net profits vs wages only) not settled by any published document; county pages unreachable.'
},
notInTableHow: 'A location there asks for the rate on your own return and marks it unverified.',
// ---- WO-10 D3: quick estimate ----
quickTitle: 'Quick estimate',
quickIntro: 'Five answers, about a minute. Your numbers stay on this page.',
quickIncome: 'What you took in this year ($)',
quickExpenses: 'What you spent on the business ($)',
quickPlaces: 'Where you work',
quickPlacesHint: 'Add up to five places by ZIP code and slide each one to its part of your work. The parts always total 100%.',
quickZip: (n) => `ZIP code of place ${n}`,
quickZipPlaceholder: 'ZIP code',
quickCounty: (n) => `County of place ${n}`,
quickCity: (n) => `City limits for place ${n}`,
quickCityChoose: '(inside city limits?)',
quickCityInside: (city) => `Inside ${city} city limits`,
quickCityOutside: 'Outside city limits',
quickMerged: 'One city-county government, so no city question.',
quickShare: (n) => `Part of your work at place ${n}`,
quickShareValue: (pct) => `${pct}%`,
quickAddPlace: 'Add another place',
quickRemove: 'Remove',
quickRemovePlace: (n) => `Remove place ${n}`,
quickResident: 'Which county you live in',
quickResidentChoose: '(choose)',
quickResidentOther: 'Another county',
quickShow: 'Show my numbers',
quickSkip: 'Enter everything myself',
quickErrors: {
income: 'Enter what you took in, in dollars, such as 60,000.',
expenses: 'Enter what you spent in dollars, such as 12,000, or leave it empty.',
zip: 'Enter a 5-digit ZIP code.',
zipOutside: (nJurisdictions) => `This ZIP code is not in the ${nJurisdictions} Kentucky jurisdictions this page covers. Remove this place here; Locations can take its rate by hand.`,
city: 'Say whether this place is inside the city limits.',
share: 'Give each place a part above 0%, or remove it.',
resident: 'Choose the county you live in.',
filed: 'Choose one of the four answers.',
lastYear: "Enter last year's income in dollars, such as 55,000, or leave it empty."
},
// WO-12 J9: the fifth answer, and last year's income when it differed.
quickFiled: 'Have you ever filed a local occupational tax return?',
quickFiledOptions: { all: 'Yes, with every place I work', some: 'Only with some', none: 'No', unsure: "I'm not sure what that is" },
quickFiledWhich: 'Tick the offices you have filed with',
quickFiledWhichNone: 'Enter the ZIP codes above to see the offices.',
quickLastYear: "Last year's income, if different ($)",
quickPlaceName: (place, zip) => `${place}, ${zip}`,
quickBuilt: (nPlaces) => `Quick estimate built from your five answers: ${plural(nPlaces, 'place', 'places')}.`,
quickBanner: 'These figures come from your quick answers.',
quickBannerAssumed: "These figures come from your five quick answers. Last year's figures are assumed equal to this year's, since no income was entered for it.",
quickBannerEntered: "These figures come from your five quick answers, with the income you entered for last year and this year's spending.",
quickBannerLink: 'Add real entries or import your bank file for exact figures',
settingsOptional: 'Optional, for the quarterly schedule',
screen3NoHistory: 'With a few months of real entries, this screen shows how far the year-end bill could swing.',
// ---- WO-11 J3: the tax jar ----
jarTitle: 'Tax jar',
jarIntro: 'What you have paid and saved, against the set-aside share of what you have taken in so far.',
// The work order's label for this figure used a word on the no-advice list; "target" says the same thing.
jarShould: 'Target',
jarCovered: 'Paid and saved',
jarShort: 'Short by',
jarAhead: 'Ahead by',
jarBarLabel: (covered, target) => `${covered} paid and saved, against a target of ${target} for today.`,
jarBasis: (pct, gross, paid, saved) => `${pct} of the ${gross} taken in so far this year. Paid: ${paid}. In savings: ${saved}.`,
jarNext: (date, federal, ky) => `Next due ${date}: ${federal} to the IRS and ${ky} to Kentucky.`,
jarNextNone: 'No estimated payment is left for this tax year.',
jarOffices: { federal: 'IRS', ky: 'Kentucky' },
jarStatus: { paid: 'Paid', short: 'Short', missed: 'Missed', upcoming: 'Upcoming' },
jarShortBy: (amount) => `by ${amount}`,
jarNoShare: 'Add a few entries to see what fits today.',
jarRecord: 'Record a payment',
jarSavedLabel: "What's in your tax savings today? ($)",
jarSavedInvalid: 'Enter a dollar amount, such as 6,000, or leave it empty.',
jarPayments: 'Payments made',
jarPaymentsNone: 'No payments entered for this tax year.',
jarPaymentColumns: { date: 'Date', office: 'Paid to', amount: 'Amount', actions: 'Actions' },
jarAddTitle: 'Add a payment',
jarPayDate: 'Date',
jarPayAmount: 'Amount ($)',
jarPayOffice: 'Paid to',
jarPayAdd: 'Add payment',
jarPayAdded: 'Payment added.',
jarPayDelete: 'Delete',
jarPayDeleted: 'Payment deleted.',
jarPayDeleteLabel: (date, amount) => `Delete the ${date} payment of ${amount}`,
screen1Paid: (paid) => `${paid} of that is already paid.`,
// ---- U6: navigation, Assumptions, Credits ----
navLabel: 'Sections',
// WO-10 D4: one bar, grouped: Overview · Enter · Results · Reference.
residentCountyHint: 'Some school districts tax only the people who live there.',
// WO-11 J5: the tabs in plain words; the official term shows once inside each panel, in a grey line.
whatIfTabs: { q1: 'Next $1,000', q2: 'Price a job', q5: 'How much to save', q3: 'Quarterly payments', q6: 'Unfiled returns', q4: 'Uneven income' },
whatIfOfficial: {
q1: 'Tax people call this the marginal rate: the tax on the next dollar earned.',
q2: 'Tax people call this an after-tax quote.',
q5: 'Tax people call this a set-aside for estimated tax.',
q3: 'Tax people call this the safe harbor rule.',
q6: 'Tax people call this back-filing.',
q4: 'Tax people call this the annualized income installment method.'
},
// WO-11 J5: quick add on the Ledger.
quickJobDescription: (place, n) => `Job, ${place}${n > 1 ? ` (${n})` : ''}`,
quickExpenseDescription: (kind, n) => `${kind}${n > 1 ? ` (${n})` : ''}`,
// What the money went on, in plain words, with the Schedule C line each one lands on.
quickExpenseKinds: [
['Gas and vehicle costs', '9'],
['Supplies and materials', '22'],
['Insurance', '15'],
['Phone, internet and utilities', '25'],
['Advertising', '8'],
['Office costs and software', '18'],
['Licenses and business taxes', '23'],
['Rent for a shop or storage', '20b'],
['Accountant or lawyer', '17'],
['Repairs', '21'],
['Something else', '27a']
],
ledgerMore: 'More options',
ledgerIncomeKind: 'Kind of income',
ledgerIncomeKinds: { '1': 'Payment for work', '6': 'Other business income' },
// WO-11 J5: one-sentence explanations behind the small "?" beside a term.
tipButton: (term) => `What does "${term}" mean?`,
tips: {
netProfit: { term: 'net profit', text: 'Net profit is what is left of your business income after your business expenses, before any tax.' },
apportioned: { term: 'share of your work', text: 'Your profit is apportioned, which means split among the places you worked, so each place taxes only its share.' },
olt: { term: 'occupational license tax', text: 'An occupational license tax is a local tax on money earned by working inside a city, county or school district.' },
estimated: { term: 'estimated payments', text: 'Estimated payments are tax sent in during the year, in four installments, because nobody holds tax back from a self-employed person\'s pay.' },
agi: { term: 'AGI', text: 'AGI means adjusted gross income: the income on a federal return after a few adjustments and before the standard deduction.' },
scheduleC: { term: 'Schedule C', text: 'Schedule C is the federal form where a self-employed person lists business income and expenses.' }
},
rateLegalName: (name) => `Legal name: ${name}`,
assumptionsHeading: 'Every number this page uses, where it came from, and when it was checked.',
assumptionsConstantsTitle: 'Constants',
assumptionsConstantColumns: { key: 'Key', value: 'Value', effective: 'Effective', verified: 'Verified on', source: 'Source' },
assumptionsListTitle: 'Assumptions behind the figures',
// WO-11 J4.
assumptionsReachTitle: 'How many people this is for',
assumptionsReach: (n) => `Kentucky has about ${n} businesses with no employees (U.S. Small Business Administration, 2025 Kentucky profile, from Census 2022 data).`,
assumptionsRatesLink: 'Open the rate table',
sourceLink: 'source',
contact: 'Found an error? Email reso225@uky.edu.',
creditsTitle: 'Credits',
creditsAuthor: 'Roland Songer, University of Kentucky',
creditsCode: 'All code in this file was written for this entry; no third-party code or libraries are included.',
creditsAI: 'Built with Claude as strategy and implementation assistant; every figure is checked by worked examples with known answers.',
creditsServices: 'This page uses no outside services or AI features while you use it.',
creditsDataTitle: 'Data sources',
creditsData: 'County and city ordinances and tax offices (see the Rate table), the Kentucky Department of Revenue, the IRS, and U.S. Census Bureau 2020 ZCTA relationship files.',
creditsLicenseTitle: 'License',
// WO-12 J9: the worked-example count shows once, on its own line.
creditsTests: (unit, e2e) => `${unit} unit tests and ${e2e} browser tests.`,
// WO-11 J6: Credits leads with who built it and how the numbers were checked.
creditsBuiltTitle: 'Who built it',
creditsCheckedTitle: 'How the numbers were checked',
creditsCheckedSources: (n) => `${n} jurisdictions, each traced to a published source and re-checked.`,
creditsCheckedExamples: (golden) => `${golden} worked examples with known answers, enforced on every build.`,
creditsAboutTitle: 'AI and outside services',
creditsLicenseLine: 'Released under the MIT License.',
reviewer: '',
testerQuote: '',
mitLicense: "MIT License\n\nCopyright (c) 2026 Roland Songer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
assumptionSeFloor: 'No self-employment tax is due when net earnings from self-employment are under $400.',
assumptionPaducahCredit: "A Paducah rate you enter counts as a rate outside this version's table, so the McCracken County credit for Paducah tax is not applied. That is the conservative, higher-tax reading."
};
return { DISCLAIMER_KEYS, formatDate, shortDistrictName, formatValue, COPY };
})();
// ---- data_demo ----
const data_demo = (() => {
// Generated by tools/make-demo.mjs (WO-07 U1; ledger rewritten in WO-11 J2): the Marcus demo fixture, loaded on first open.
// Do not edit by hand; run node tools/make-demo.mjs.
const DEMO_WORKSPACE = {
"format": "ky-local-tax-ledger",
"schemaVersion": 2,
"appVersion": "1.0.4",
"savedAt": null,
"seed": 20260101,
"name": "Marcus Bell — Bell Mobile Detailing",
"settings": {
"taxYear": 2026,
"filingStatus": "single",
"itemizedOverrideCents": null,
"priorYearTaxCents": null,
"priorYearAgiCents": null,
"setAsideBalanceCents": 600000,
"residentCountyId": "ky-fayette-lfucg",
"setAsideConfidence": 0.9,
"bootstrapDraws": 2000,
"csvMappings": []
},
"locations": [
{
"id": "loc_1",
"name": "Home base, Lexington",
"zip": "40503",
"districtIds": [
"ky-fayette-lfucg",
"ky-fayette-schools"
],
"insideCityLimits": true,
"confirmedBy": "fixture"
},
{
"id": "loc_2",
"name": "Beaumont area clients",
"zip": "40513",
"districtIds": [
"ky-fayette-lfucg",
"ky-fayette-schools"
],
"insideCityLimits": true,
"confirmedBy": "fixture"
},
{
"id": "loc_3",
"name": "Nicholasville clients",
"zip": "40356",
"districtIds": [
"ky-jessamine-county",
"ky-nicholasville-city"
],
"insideCityLimits": true,
"confirmedBy": "fixture"
},
{
"id": "loc_4",
"name": "Keene Road farm",
"zip": "40356",
"districtIds": [
"ky-jessamine-county"
],
"insideCityLimits": false,
"confirmedBy": "fixture"
},
{
"id": "loc_5",
"name": "Georgetown clients",
"zip": "40324",
"districtIds": [
"ky-scott-county",
"ky-georgetown-city",
"ky-scott-schools"
],
"insideCityLimits": true,
"confirmedBy": "fixture"
},
{
"id": "loc_6",
"name": "Sadieville Road client",
"zip": "40370",
"districtIds": [
"ky-scott-county",
"ky-scott-schools"
],
"insideCityLimits": false,
"confirmedBy": "fixture"
}
],
"customRates": [],
"transactions": [
{
"id": "txn_000001",
"date": "2025-01-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "cc00fa9009911cda"
},
{
"id": "txn_000002",
"date": "2025-01-02",
"amountCents": -7400,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bf00a02edcec485f"
},
{
"id": "txn_000003",
"date": "2025-01-03",
"amountCents": -9595,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "63ccf3e2da6acbab"
},
{
"id": "txn_000004",
"date": "2025-01-04",
"amountCents": 8500,
"description": "CHECK 1041",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "302cbac02f1e5550"
},
{
"id": "txn_000005",
"date": "2025-01-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "c138d1d5c785c5bd"
},
{
"id": "txn_000006",
"date": "2025-01-06",
"amountCents": 8500,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "fdec488dc767a7ae"
},
{
"id": "txn_000007",
"date": "2025-01-06",
"amountCents": 16500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "328588be1a253aa5"
},
{
"id": "txn_000008",
"date": "2025-01-07",
"amountCents": -5800,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "8b36c70a16f1961e"
},
{
"id": "txn_000009",
"date": "2025-01-08",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "fb6bce68bcdb2db2"
},
{
"id": "txn_000010",
"date": "2025-01-09",
"amountCents": -16749,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "49a51b40ac351b4f"
},
{
"id": "txn_000011",
"date": "2025-01-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "b3b7fe5eaee936de"
},
{
"id": "txn_000012",
"date": "2025-01-11",
"amountCents": 32000,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "80a9dc4db6137038"
},
{
"id": "txn_000013",
"date": "2025-01-11",
"amountCents": 8500,
"description": "ZELLE FROM W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "442da723bc82263f"
},
{
"id": "txn_000014",
"date": "2025-01-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "c7f360301f83de08"
},
{
"id": "txn_000015",
"date": "2025-01-13",
"amountCents": 8500,
"description": "ZELLE FROM R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "dcd41856c85bfce2"
},
{
"id": "txn_000016",
"date": "2025-01-13",
"amountCents": -6500,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6c3cb0d44a921a5c"
},
{
"id": "txn_000017",
"date": "2025-01-15",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d5db75400d5483af"
},
{
"id": "txn_000018",
"date": "2025-01-16",
"amountCents": -13749,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "a15eeb768bd80996"
},
{
"id": "txn_000019",
"date": "2025-01-17",
"amountCents": 8500,
"description": "VENMO A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a2d2e9266a5cbf10"
},
{
"id": "txn_000020",
"date": "2025-01-18",
"amountCents": -5600,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "2d32e7ed50893dc2"
},
{
"id": "txn_000021",
"date": "2025-01-22",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "00f8100bb88740e2"
},
{
"id": "txn_000022",
"date": "2025-01-22",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "0869998fd59981c4"
},
{
"id": "txn_000023",
"date": "2025-01-22",
"amountCents": 8500,
"description": "VENMO C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "646a4dba0788297c"
},
{
"id": "txn_000024",
"date": "2025-01-22",
"amountCents": -16699,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "7b285c425f31ca63"
},
{
"id": "txn_000025",
"date": "2025-01-23",
"amountCents": 48000,
"description": "VENMO N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b327b07b9ea24ec4"
},
{
"id": "txn_000026",
"date": "2025-01-24",
"amountCents": -7200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "fd35a718fb7ecfd7"
},
{
"id": "txn_000027",
"date": "2025-01-25",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9c5af3cde41c89d6"
},
{
"id": "txn_000028",
"date": "2025-01-27",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "21ec663084fea26c"
},
{
"id": "txn_000029",
"date": "2025-02-01",
"amountCents": 8500,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9dbf81c24b287c15"
},
{
"id": "txn_000030",
"date": "2025-02-01",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5424c45f9940d0d6"
},
{
"id": "txn_000031",
"date": "2025-02-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "23a8fe60d29d8677"
},
{
"id": "txn_000032",
"date": "2025-02-02",
"amountCents": -6400,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "eb15890ccc17c041"
},
{
"id": "txn_000033",
"date": "2025-02-03",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "32efd8ebfcca6472"
},
{
"id": "txn_000034",
"date": "2025-02-03",
"amountCents": -17299,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "b8b4e2c419e8f217"
},
{
"id": "txn_000035",
"date": "2025-02-04",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "4381659f637f5619"
},
{
"id": "txn_000036",
"date": "2025-02-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "f3c13d441ff2b290"
},
{
"id": "txn_000037",
"date": "2025-02-06",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6bf7d89081779289"
},
{
"id": "txn_000038",
"date": "2025-02-06",
"amountCents": -6000,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "cccfb4d166ac34ca"
},
{
"id": "txn_000039",
"date": "2025-02-07",
"amountCents": 16500,
"description": "VENMO C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a60f48e3facb4f36"
},
{
"id": "txn_000040",
"date": "2025-02-08",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "92fa1260891680e1"
},
{
"id": "txn_000041",
"date": "2025-02-08",
"amountCents": -8379,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "06b05addcfb8781c"
},
{
"id": "txn_000042",
"date": "2025-02-10",
"amountCents": 32000,
"description": "ZELLE FROM E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "459018a4b651149a"
},
{
"id": "txn_000043",
"date": "2025-02-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "a496847d04b806e1"
},
{
"id": "txn_000044",
"date": "2025-02-10",
"amountCents": -7800,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "64490955d65aac2f"
},
{
"id": "txn_000045",
"date": "2025-02-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "65c16d5c797c71e1"
},
{
"id": "txn_000046",
"date": "2025-02-14",
"amountCents": -7399,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "e48c425111c4d3c6"
},
{
"id": "txn_000047",
"date": "2025-02-14",
"amountCents": -5700,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "80d74e75f78a47b6"
},
{
"id": "txn_000048",
"date": "2025-02-15",
"amountCents": 32000,
"description": "CHECK 1042",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b2e949157981abd7"
},
{
"id": "txn_000049",
"date": "2025-02-18",
"amountCents": -7100,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "1544463cf0742fea"
},
{
"id": "txn_000050",
"date": "2025-02-19",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "83a2dd643c93edea"
},
{
"id": "txn_000051",
"date": "2025-02-19",
"amountCents": 16500,
"description": "VENMO S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "f184d76c97173bf5"
},
{
"id": "txn_000052",
"date": "2025-02-19",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "e5fa96cfb9e3930a"
},
{
"id": "txn_000053",
"date": "2025-02-20",
"amountCents": 16500,
"description": "ZELLE FROM W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c2726002e21b4413"
},
{
"id": "txn_000054",
"date": "2025-02-20",
"amountCents": -14489,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "a3b446c458d300d0"
},
{
"id": "txn_000055",
"date": "2025-02-20",
"amountCents": -60000,
"description": "LEXINGTON HOME AND GARDEN SHOW BOOTH",
"category": "expense",
"scheduleCLine": "8",
"locationId": null,
"source": "fixture",
"hash": "229f702f07f65ebd"
},
{
"id": "txn_000056",
"date": "2025-02-21",
"amountCents": 8500,
"description": "VENMO D KING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ee0b43724ad897ea"
},
{
"id": "txn_000057",
"date": "2025-02-22",
"amountCents": -7000,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "7039f0db5e07f48a"
},
{
"id": "txn_000058",
"date": "2025-02-25",
"amountCents": 8500,
"description": "ZELLE FROM G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4c05e5361706a8c3"
},
{
"id": "txn_000059",
"date": "2025-02-28",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "42ad257ea3513944"
},
{
"id": "txn_000060",
"date": "2025-03-01",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a2837a51c7fdf563"
},
{
"id": "txn_000061",
"date": "2025-03-01",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6f246f4cbfced28d"
},
{
"id": "txn_000062",
"date": "2025-03-01",
"amountCents": 48000,
"description": "ZELLE FROM J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "2331459e6999116c"
},
{
"id": "txn_000063",
"date": "2025-03-01",
"amountCents": 32000,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "8ed765e676c87b3c"
},
{
"id": "txn_000064",
"date": "2025-03-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "85e45e8e42ffeae4"
},
{
"id": "txn_000065",
"date": "2025-03-02",
"amountCents": -5200,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "ce12043e2b693fa2"
},
{
"id": "txn_000066",
"date": "2025-03-03",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d0f30f46c4f1f41d"
},
{
"id": "txn_000067",
"date": "2025-03-03",
"amountCents": -12049,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "b92dc4a18d710d50"
},
{
"id": "txn_000068",
"date": "2025-03-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "e7fe50249dc1b3bf"
},
{
"id": "txn_000069",
"date": "2025-03-06",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bcceeffbb41726ca"
},
{
"id": "txn_000070",
"date": "2025-03-07",
"amountCents": -5900,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "a873fac533e6b9df"
},
{
"id": "txn_000071",
"date": "2025-03-09",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "78156eb6499f463b"
},
{
"id": "txn_000072",
"date": "2025-03-09",
"amountCents": 48000,
"description": "VENMO K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "30d9a9043f67c807"
},
{
"id": "txn_000073",
"date": "2025-03-09",
"amountCents": -9179,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "28995d22898e339a"
},
{
"id": "txn_000074",
"date": "2025-03-10",
"amountCents": 16500,
"description": "ZELLE FROM B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d53cf0863f6bd69c"
},
{
"id": "txn_000075",
"date": "2025-03-10",
"amountCents": 32000,
"description": "ZELLE FROM A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e89a5c7f90518dba"
},
{
"id": "txn_000076",
"date": "2025-03-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "eb1610170c10d714"
},
{
"id": "txn_000077",
"date": "2025-03-11",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f52b798c15ef1b4c"
},
{
"id": "txn_000078",
"date": "2025-03-11",
"amountCents": 8500,
"description": "VENMO L NAPIER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f89a71c94ad367b6"
},
{
"id": "txn_000079",
"date": "2025-03-12",
"amountCents": 48000,
"description": "VENMO E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c4c7eccf7e7cb834"
},
{
"id": "txn_000080",
"date": "2025-03-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "c351880aa248ef7a"
},
{
"id": "txn_000081",
"date": "2025-03-13",
"amountCents": -7000,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "4e6be827c46ca0ad"
},
{
"id": "txn_000082",
"date": "2025-03-14",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "2fa2eed4d8e9cc94"
},
{
"id": "txn_000083",
"date": "2025-03-15",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "fe564b068a2a5a2c"
},
{
"id": "txn_000084",
"date": "2025-03-15",
"amountCents": -190000,
"description": "NORTHERN TOOL PRESSURE WASHER",
"category": "expense",
"scheduleCLine": "13",
"locationId": null,
"source": "fixture",
"hash": "d10a5b6135e7fda9"
},
{
"id": "txn_000085",
"date": "2025-03-16",
"amountCents": -11489,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "4c4f30f3913545f0"
},
{
"id": "txn_000086",
"date": "2025-03-18",
"amountCents": -7600,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "9d02a7692a7171f2"
},
{
"id": "txn_000087",
"date": "2025-03-21",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "a272954113a98aa5"
},
{
"id": "txn_000088",
"date": "2025-03-22",
"amountCents": 16500,
"description": "VENMO B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "6946d285c15af236"
},
{
"id": "txn_000089",
"date": "2025-03-22",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "a74c55d9c856a9d2"
},
{
"id": "txn_000090",
"date": "2025-03-22",
"amountCents": -11595,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "7f7fcb5b55b7144a"
},
{
"id": "txn_000091",
"date": "2025-03-24",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6e53b7ec47a6570c"
},
{
"id": "txn_000092",
"date": "2025-03-24",
"amountCents": -7100,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "96ba04825756e2e2"
},
{
"id": "txn_000093",
"date": "2025-03-25",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d9687cba0826014f"
},
{
"id": "txn_000094",
"date": "2025-03-25",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "0647e3966a945199"
},
{
"id": "txn_000095",
"date": "2025-03-26",
"amountCents": 16500,
"description": "VENMO M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ffa7b27a5fe79963"
},
{
"id": "txn_000096",
"date": "2025-03-28",
"amountCents": 48000,
"description": "VENMO F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c0ef264b2076785d"
},
{
"id": "txn_000097",
"date": "2025-03-28",
"amountCents": 8500,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f8a8555df5b0eb0a"
},
{
"id": "txn_000098",
"date": "2025-03-29",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "58586e8d2570b3c3"
},
{
"id": "txn_000099",
"date": "2025-03-31",
"amountCents": 16500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0a1c51e9967985f4"
},
{
"id": "txn_000100",
"date": "2025-03-31",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "94541a290c9fa915"
},
{
"id": "txn_000101",
"date": "2025-03-31",
"amountCents": 16500,
"description": "ZELLE FROM V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f3f67de0a07b0125"
},
{
"id": "txn_000102",
"date": "2025-04-01",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a5f03ad6571ffaf6"
},
{
"id": "txn_000103",
"date": "2025-04-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "342deb373f707869"
},
{
"id": "txn_000104",
"date": "2025-04-02",
"amountCents": 8500,
"description": "VENMO M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a5a9cf08c031df43"
},
{
"id": "txn_000105",
"date": "2025-04-02",
"amountCents": -7200,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "9e959e6d5fbe4c66"
},
{
"id": "txn_000106",
"date": "2025-04-03",
"amountCents": 16500,
"description": "ZELLE FROM K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2d436ce40cfe8e3b"
},
{
"id": "txn_000107",
"date": "2025-04-03",
"amountCents": 8500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a6a3c0e4fc056571"
},
{
"id": "txn_000108",
"date": "2025-04-03",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "71881dd21a24013e"
},
{
"id": "txn_000109",
"date": "2025-04-03",
"amountCents": -9499,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "98d391140f8b0799"
},
{
"id": "txn_000110",
"date": "2025-04-05",
"amountCents": 16500,
"description": "VENMO T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "4cac7fb0297745e2"
},
{
"id": "txn_000111",
"date": "2025-04-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "3ef8a7c6e2c2236a"
},
{
"id": "txn_000112",
"date": "2025-04-06",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "16171984540e4e1d"
},
{
"id": "txn_000113",
"date": "2025-04-07",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9ca20f23fe885456"
},
{
"id": "txn_000114",
"date": "2025-04-07",
"amountCents": 16500,
"description": "VENMO R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1fa4241cc8c07d95"
},
{
"id": "txn_000115",
"date": "2025-04-07",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "10a26a8a376f0928"
},
{
"id": "txn_000116",
"date": "2025-04-07",
"amountCents": -6400,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "ba013c4108e8f642"
},
{
"id": "txn_000117",
"date": "2025-04-08",
"amountCents": 16500,
"description": "ZELLE FROM L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d872cf3b1e1efe58"
},
{
"id": "txn_000118",
"date": "2025-04-09",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "149747effd6112fe"
},
{
"id": "txn_000119",
"date": "2025-04-09",
"amountCents": -9689,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "921639f8ee595f66"
},
{
"id": "txn_000120",
"date": "2025-04-10",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "f1087e33233c24a2"
},
{
"id": "txn_000121",
"date": "2025-04-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "73e42a72d08cb41f"
},
{
"id": "txn_000122",
"date": "2025-04-12",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "80cb7859ccfdd131"
},
{
"id": "txn_000123",
"date": "2025-04-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "afca48d85fe9d54b"
},
{
"id": "txn_000124",
"date": "2025-04-12",
"amountCents": -6700,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "a140c33ff5cf2993"
},
{
"id": "txn_000125",
"date": "2025-04-13",
"amountCents": 16500,
"description": "ZELLE FROM E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ac2b45d9f0cffac0"
},
{
"id": "txn_000126",
"date": "2025-04-13",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "e65e30a69560a63d"
},
{
"id": "txn_000127",
"date": "2025-04-14",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "54736dd2c12d8a7b"
},
{
"id": "txn_000128",
"date": "2025-04-14",
"amountCents": 32000,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "10747cfe0f7d5407"
},
{
"id": "txn_000129",
"date": "2025-04-14",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1937f6012626178d"
},
{
"id": "txn_000130",
"date": "2025-04-15",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "41596718ba95f9ab"
},
{
"id": "txn_000131",
"date": "2025-04-15",
"amountCents": -14089,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "4fa3afd68cbd10f2"
},
{
"id": "txn_000132",
"date": "2025-04-16",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a8d6634b9391eac2"
},
{
"id": "txn_000133",
"date": "2025-04-17",
"amountCents": 32000,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7d58a8b17adc2b67"
},
{
"id": "txn_000134",
"date": "2025-04-18",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "12d5c4337d2242b4"
},
{
"id": "txn_000135",
"date": "2025-04-18",
"amountCents": 32000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "192cc13f40c55a2a"
},
{
"id": "txn_000136",
"date": "2025-04-18",
"amountCents": -5800,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6f11dfdc91801017"
},
{
"id": "txn_000137",
"date": "2025-04-19",
"amountCents": 8500,
"description": "VENMO M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4b2974e65d5b53ca"
},
{
"id": "txn_000138",
"date": "2025-04-19",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d39b4442a6609010"
},
{
"id": "txn_000139",
"date": "2025-04-19",
"amountCents": 8500,
"description": "CHECK 1043",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5f81b24a4f3f0e65"
},
{
"id": "txn_000140",
"date": "2025-04-20",
"amountCents": 8500,
"description": "VENMO B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2411419dfcdf42d4"
},
{
"id": "txn_000141",
"date": "2025-04-21",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "571883fbc5d094fd"
},
{
"id": "txn_000142",
"date": "2025-04-21",
"amountCents": 8500,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "097f06f4c6012d8f"
},
{
"id": "txn_000143",
"date": "2025-04-21",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "308caa4e713aaa56"
},
{
"id": "txn_000144",
"date": "2025-04-21",
"amountCents": -11849,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "e40fc6c2b0002edb"
},
{
"id": "txn_000145",
"date": "2025-04-22",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "880fdf8b968533ab"
},
{
"id": "txn_000146",
"date": "2025-04-22",
"amountCents": 8500,
"description": "ZELLE FROM W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "405ef869bd85f77e"
},
{
"id": "txn_000147",
"date": "2025-04-23",
"amountCents": 8500,
"description": "ZELLE FROM S HURLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "5e621f1ca0da875e"
},
{
"id": "txn_000148",
"date": "2025-04-23",
"amountCents": -6400,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "3d94aa3b44991e99"
},
{
"id": "txn_000149",
"date": "2025-04-24",
"amountCents": 32000,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1d2e665c05b671ae"
},
{
"id": "txn_000150",
"date": "2025-04-24",
"amountCents": 16500,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "7aadf434f25169f2"
},
{
"id": "txn_000151",
"date": "2025-04-24",
"amountCents": 8500,
"description": "VENMO R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f877176243d54744"
},
{
"id": "txn_000152",
"date": "2025-04-26",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "3aadff8eb3192dbf"
},
{
"id": "txn_000153",
"date": "2025-04-28",
"amountCents": 8500,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d63e330b73eed583"
},
{
"id": "txn_000154",
"date": "2025-04-28",
"amountCents": 16500,
"description": "CHECK 1044",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6cfaf5cd76298ddc"
},
{
"id": "txn_000155",
"date": "2025-05-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "790ab25e833d2d8e"
},
{
"id": "txn_000156",
"date": "2025-05-02",
"amountCents": 32000,
"description": "VENMO N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c9385c9b3222ff52"
},
{
"id": "txn_000157",
"date": "2025-05-02",
"amountCents": -6600,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bb9cf2d5c34b884a"
},
{
"id": "txn_000158",
"date": "2025-05-03",
"amountCents": 8500,
"description": "VENMO C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f8f92db4039ce6b1"
},
{
"id": "txn_000159",
"date": "2025-05-03",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ad653f576a540803"
},
{
"id": "txn_000160",
"date": "2025-05-03",
"amountCents": 16500,
"description": "VENMO G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "5f258a1bfc7daf9a"
},
{
"id": "txn_000161",
"date": "2025-05-03",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "30b3348c9332fa80"
},
{
"id": "txn_000162",
"date": "2025-05-03",
"amountCents": -9679,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f3315c664cc8b6d9"
},
{
"id": "txn_000163",
"date": "2025-05-05",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a7b054d2c501785b"
},
{
"id": "txn_000164",
"date": "2025-05-05",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "13945846ff4e07e8"
},
{
"id": "txn_000165",
"date": "2025-05-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "b199a50b235098f9"
},
{
"id": "txn_000166",
"date": "2025-05-06",
"amountCents": 48000,
"description": "CHECK 1045",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c46076282d522a7f"
},
{
"id": "txn_000167",
"date": "2025-05-06",
"amountCents": 8500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "83b55e7e1dfa0f54"
},
{
"id": "txn_000168",
"date": "2025-05-06",
"amountCents": -5300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "789a3bdc4cbd72ca"
},
{
"id": "txn_000169",
"date": "2025-05-08",
"amountCents": 32000,
"description": "ZELLE FROM M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b0d87892af85efc5"
},
{
"id": "txn_000170",
"date": "2025-05-08",
"amountCents": 8500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "b7e07370df235ded"
},
{
"id": "txn_000171",
"date": "2025-05-09",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "31bb46c9beb9addc"
},
{
"id": "txn_000172",
"date": "2025-05-09",
"amountCents": -12199,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "b3b03edb86ff27d7"
},
{
"id": "txn_000173",
"date": "2025-05-10",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "d4ce653a436d6294"
},
{
"id": "txn_000174",
"date": "2025-05-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "1b1cbe1136be23f2"
},
{
"id": "txn_000175",
"date": "2025-05-11",
"amountCents": -7500,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "873ef78fabc48dd0"
},
{
"id": "txn_000176",
"date": "2025-05-12",
"amountCents": 32000,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bba6435392ada5d9"
},
{
"id": "txn_000177",
"date": "2025-05-12",
"amountCents": 16500,
"description": "ZELLE FROM P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "65ffb5e6efa70032"
},
{
"id": "txn_000178",
"date": "2025-05-12",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "752f3f2fb4ddb0bc"
},
{
"id": "txn_000179",
"date": "2025-05-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "ed7b1b1ad6f4c23c"
},
{
"id": "txn_000180",
"date": "2025-05-13",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "11ac727df1152a6e"
},
{
"id": "txn_000181",
"date": "2025-05-14",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "7f0adf59d18a8536"
},
{
"id": "txn_000182",
"date": "2025-05-15",
"amountCents": 8500,
"description": "ZELLE FROM P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b605561c3e891413"
},
{
"id": "txn_000183",
"date": "2025-05-15",
"amountCents": 16500,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "8880051195b815a3"
},
{
"id": "txn_000184",
"date": "2025-05-15",
"amountCents": 32000,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "0d2c9714e9fa1e41"
},
{
"id": "txn_000185",
"date": "2025-05-16",
"amountCents": 16500,
"description": "CHECK 1046",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "1dfc1b549bfd82d8"
},
{
"id": "txn_000186",
"date": "2025-05-16",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "fdfdca85ca824c38"
},
{
"id": "txn_000187",
"date": "2025-05-16",
"amountCents": -14989,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5ae408e4c6379a83"
},
{
"id": "txn_000188",
"date": "2025-05-16",
"amountCents": -7600,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6db81bec2cecd2a7"
},
{
"id": "txn_000189",
"date": "2025-05-20",
"amountCents": -6400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "ee3002d02e82b2d4"
},
{
"id": "txn_000190",
"date": "2025-05-21",
"amountCents": 16500,
"description": "ZELLE FROM R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ad0da3b887437931"
},
{
"id": "txn_000191",
"date": "2025-05-22",
"amountCents": -8199,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "6d0cdcb9c75bf424"
},
{
"id": "txn_000192",
"date": "2025-05-23",
"amountCents": 16500,
"description": "ZELLE FROM B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "4bb3307e172e47b0"
},
{
"id": "txn_000193",
"date": "2025-05-23",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "82fbf97b613f539b"
},
{
"id": "txn_000194",
"date": "2025-05-23",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "7adc405028b023b2"
},
{
"id": "txn_000195",
"date": "2025-05-24",
"amountCents": 8500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "839bd63949496bf2"
},
{
"id": "txn_000196",
"date": "2025-05-24",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "07216eae8eea6f6b"
},
{
"id": "txn_000197",
"date": "2025-05-24",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "026809a0c8eb189a"
},
{
"id": "txn_000198",
"date": "2025-05-25",
"amountCents": 8500,
"description": "VENMO R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "10c567301f929fc6"
},
{
"id": "txn_000199",
"date": "2025-05-25",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6b09a041c2c3255d"
},
{
"id": "txn_000200",
"date": "2025-05-25",
"amountCents": -7200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e9bd77c911262714"
},
{
"id": "txn_000201",
"date": "2025-05-26",
"amountCents": 48000,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4722e9bb81a6f1c0"
},
{
"id": "txn_000202",
"date": "2025-05-27",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2b559e3e89601880"
},
{
"id": "txn_000203",
"date": "2025-05-27",
"amountCents": 32000,
"description": "CHECK 1047",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bc0f9e9427683945"
},
{
"id": "txn_000204",
"date": "2025-05-27",
"amountCents": 8500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "4527b609d73f0f77"
},
{
"id": "txn_000205",
"date": "2025-05-28",
"amountCents": 16500,
"description": "VENMO W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "29578a384ed5d47d"
},
{
"id": "txn_000206",
"date": "2025-05-28",
"amountCents": 48000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "7a1e89b748b24b39"
},
{
"id": "txn_000207",
"date": "2025-05-29",
"amountCents": 8500,
"description": "ZELLE FROM H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "266f635de1d0100f"
},
{
"id": "txn_000208",
"date": "2025-05-29",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1923bcfcf8b1c15e"
},
{
"id": "txn_000209",
"date": "2025-05-29",
"amountCents": 8500,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9a2ba9ec991c1058"
},
{
"id": "txn_000210",
"date": "2025-05-29",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "54022c69b790fe9f"
},
{
"id": "txn_000211",
"date": "2025-05-30",
"amountCents": 8500,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e25f43edc6173ca5"
},
{
"id": "txn_000212",
"date": "2025-05-30",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "824b6a80c6b5b1f0"
},
{
"id": "txn_000213",
"date": "2025-06-01",
"amountCents": 8500,
"description": "VENMO R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7f6d76de2445dc3a"
},
{
"id": "txn_000214",
"date": "2025-06-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "78c64fede2aadbfb"
},
{
"id": "txn_000215",
"date": "2025-06-02",
"amountCents": 32000,
"description": "CHECK 1048",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8e8c1b2b79b15833"
},
{
"id": "txn_000216",
"date": "2025-06-02",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "bf38b3cadeccf77b"
},
{
"id": "txn_000217",
"date": "2025-06-02",
"amountCents": -6200,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6c3cf4d38c5bb9fb"
},
{
"id": "txn_000218",
"date": "2025-06-03",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "5bf2d1dce488b0e1"
},
{
"id": "txn_000219",
"date": "2025-06-03",
"amountCents": -8649,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "e29fd56b8e58d3db"
},
{
"id": "txn_000220",
"date": "2025-06-04",
"amountCents": 8500,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "536c8101534af7cc"
},
{
"id": "txn_000221",
"date": "2025-06-04",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "b5990dbe222694e3"
},
{
"id": "txn_000222",
"date": "2025-06-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "a8b981d694db726c"
},
{
"id": "txn_000223",
"date": "2025-06-06",
"amountCents": -5700,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bbacd706fcf0a767"
},
{
"id": "txn_000224",
"date": "2025-06-07",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "09738252536fc2b3"
},
{
"id": "txn_000225",
"date": "2025-06-07",
"amountCents": 8500,
"description": "ZELLE FROM E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "56e6add05db9da00"
},
{
"id": "txn_000226",
"date": "2025-06-08",
"amountCents": 8500,
"description": "VENMO V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1532e7140b45f32e"
},
{
"id": "txn_000227",
"date": "2025-06-09",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7992ae43e727c9f9"
},
{
"id": "txn_000228",
"date": "2025-06-09",
"amountCents": 16500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "1b9cd276ba5b7188"
},
{
"id": "txn_000229",
"date": "2025-06-09",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "7071badd58f16359"
},
{
"id": "txn_000230",
"date": "2025-06-09",
"amountCents": -16099,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "67336026a8ecc82c"
},
{
"id": "txn_000231",
"date": "2025-06-10",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c8522e3d81288726"
},
{
"id": "txn_000232",
"date": "2025-06-10",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "c67445e78c126039"
},
{
"id": "txn_000233",
"date": "2025-06-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "7a44175b1a5b9165"
},
{
"id": "txn_000234",
"date": "2025-06-11",
"amountCents": 16500,
"description": "VENMO P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "f16872cb066d04d5"
},
{
"id": "txn_000235",
"date": "2025-06-11",
"amountCents": -7600,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6fdb1ff330d7901d"
},
{
"id": "txn_000236",
"date": "2025-06-12",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "f00d11daf8a3d660"
},
{
"id": "txn_000237",
"date": "2025-06-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "1a010f76ec941855"
},
{
"id": "txn_000238",
"date": "2025-06-13",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4709db2e13cfbc4f"
},
{
"id": "txn_000239",
"date": "2025-06-13",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "67db9aca6fe7e0b2"
},
{
"id": "txn_000240",
"date": "2025-06-13",
"amountCents": 16500,
"description": "ZELLE FROM J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "df2ac651ad1f28e8"
},
{
"id": "txn_000241",
"date": "2025-06-15",
"amountCents": -11349,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "d94d32f982cf619d"
},
{
"id": "txn_000242",
"date": "2025-06-15",
"amountCents": -5400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f7c2cc66e8c689f8"
},
{
"id": "txn_000243",
"date": "2025-06-16",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "098c052005c47ad4"
},
{
"id": "txn_000244",
"date": "2025-06-16",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "7458bb7d2003c7fc"
},
{
"id": "txn_000245",
"date": "2025-06-17",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9921a0698d6bb59b"
},
{
"id": "txn_000246",
"date": "2025-06-19",
"amountCents": 16500,
"description": "ZELLE FROM K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b3e6a3daf4c5b1dc"
},
{
"id": "txn_000247",
"date": "2025-06-19",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "08eda80c0c68389f"
},
{
"id": "txn_000248",
"date": "2025-06-19",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "f46480fc67bd9b47"
},
{
"id": "txn_000249",
"date": "2025-06-20",
"amountCents": 16500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8d5ff290a0bb0cf1"
},
{
"id": "txn_000250",
"date": "2025-06-20",
"amountCents": -7700,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "cbaa3d4804978843"
},
{
"id": "txn_000251",
"date": "2025-06-21",
"amountCents": 16500,
"description": "VENMO P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "3efbeb449264a045"
},
{
"id": "txn_000252",
"date": "2025-06-21",
"amountCents": -11689,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "6dafe805f7ae8df1"
},
{
"id": "txn_000253",
"date": "2025-06-22",
"amountCents": 16500,
"description": "ZELLE FROM G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a48ec282be091225"
},
{
"id": "txn_000254",
"date": "2025-06-23",
"amountCents": 16500,
"description": "VENMO B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "14ed776bc5bddc32"
},
{
"id": "txn_000255",
"date": "2025-06-24",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6359781b7d35bc6c"
},
{
"id": "txn_000256",
"date": "2025-06-24",
"amountCents": -7200,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "41b63d7b2437a624"
},
{
"id": "txn_000257",
"date": "2025-06-25",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a0a11d973a5a1b1c"
},
{
"id": "txn_000258",
"date": "2025-06-25",
"amountCents": 16500,
"description": "ZELLE FROM T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "95a598a50d77b33d"
},
{
"id": "txn_000259",
"date": "2025-06-25",
"amountCents": 32000,
"description": "VENMO R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "3ff607ef335651e3"
},
{
"id": "txn_000260",
"date": "2025-06-26",
"amountCents": 16500,
"description": "ZELLE FROM N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bb3b6663f10aa1a3"
},
{
"id": "txn_000261",
"date": "2025-06-26",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "90718e0cb4e154c3"
},
{
"id": "txn_000262",
"date": "2025-06-26",
"amountCents": 32000,
"description": "VENMO R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "5f45d1e13804afec"
},
{
"id": "txn_000263",
"date": "2025-06-26",
"amountCents": 16500,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1056e986139c4e7c"
},
{
"id": "txn_000264",
"date": "2025-06-27",
"amountCents": 48000,
"description": "VENMO M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "047cbb69f9a16237"
},
{
"id": "txn_000265",
"date": "2025-06-28",
"amountCents": 16500,
"description": "VENMO S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a0f2625318669871"
},
{
"id": "txn_000266",
"date": "2025-06-28",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d1d8a370d1c5ad8e"
},
{
"id": "txn_000267",
"date": "2025-06-28",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f6e07c915b54099e"
},
{
"id": "txn_000268",
"date": "2025-06-29",
"amountCents": 16500,
"description": "VENMO H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b22747d18229250e"
},
{
"id": "txn_000269",
"date": "2025-06-30",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "1b34075e28673a95"
},
{
"id": "txn_000270",
"date": "2025-07-01",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "e646f6e86b3aaf43"
},
{
"id": "txn_000271",
"date": "2025-07-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "a2dff9c3e217a848"
},
{
"id": "txn_000272",
"date": "2025-07-02",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4a7bf6443556efa4"
},
{
"id": "txn_000273",
"date": "2025-07-02",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "3df57e5a487db242"
},
{
"id": "txn_000274",
"date": "2025-07-02",
"amountCents": 16500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0f9dd906e782722b"
},
{
"id": "txn_000275",
"date": "2025-07-02",
"amountCents": -7100,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "737aa50c60dbd7e2"
},
{
"id": "txn_000276",
"date": "2025-07-03",
"amountCents": 16500,
"description": "VENMO T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "483fecd439b69c8f"
},
{
"id": "txn_000277",
"date": "2025-07-03",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "50aba9fde52ab251"
},
{
"id": "txn_000278",
"date": "2025-07-03",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "70a0e712fef934b0"
},
{
"id": "txn_000279",
"date": "2025-07-03",
"amountCents": -9589,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "607d9f04d2160600"
},
{
"id": "txn_000280",
"date": "2025-07-05",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "360aab06db636015"
},
{
"id": "txn_000281",
"date": "2025-07-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "ee8fb050d2907e7b"
},
{
"id": "txn_000282",
"date": "2025-07-07",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "c41294af5782bdcc"
},
{
"id": "txn_000283",
"date": "2025-07-07",
"amountCents": -5200,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "fd5ad3f9442a5ec1"
},
{
"id": "txn_000284",
"date": "2025-07-08",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "14e1c8ef3bfacb9e"
},
{
"id": "txn_000285",
"date": "2025-07-09",
"amountCents": -16289,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5b68b315bbb7c6fc"
},
{
"id": "txn_000286",
"date": "2025-07-10",
"amountCents": 16500,
"description": "ZELLE FROM P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "5d1a12fbc9020da2"
},
{
"id": "txn_000287",
"date": "2025-07-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "21943132d42416f8"
},
{
"id": "txn_000288",
"date": "2025-07-11",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a38275181268911e"
},
{
"id": "txn_000289",
"date": "2025-07-11",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1e22e43ae15cbd23"
},
{
"id": "txn_000290",
"date": "2025-07-12",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "05cf614a6718e2ed"
},
{
"id": "txn_000291",
"date": "2025-07-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "77addf56027f1ebe"
},
{
"id": "txn_000292",
"date": "2025-07-13",
"amountCents": -7400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "97e2a386c799b6b7"
},
{
"id": "txn_000293",
"date": "2025-07-14",
"amountCents": 8500,
"description": "ZELLE FROM V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a42605daf0d1aa65"
},
{
"id": "txn_000294",
"date": "2025-07-14",
"amountCents": 16500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dfad50fe122002f7"
},
{
"id": "txn_000295",
"date": "2025-07-14",
"amountCents": 8500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2d33afe352522619"
},
{
"id": "txn_000296",
"date": "2025-07-14",
"amountCents": 48000,
"description": "ZELLE FROM W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9fb167d8c85ccf47"
},
{
"id": "txn_000297",
"date": "2025-07-15",
"amountCents": 8500,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7624ab7fe28e12b2"
},
{
"id": "txn_000298",
"date": "2025-07-16",
"amountCents": 8500,
"description": "CHECK 1049",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "57079a88cfd41e17"
},
{
"id": "txn_000299",
"date": "2025-07-16",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "1fd3224cc7beb5a1"
},
{
"id": "txn_000300",
"date": "2025-07-16",
"amountCents": -14849,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "a0057815415dfd42"
},
{
"id": "txn_000301",
"date": "2025-07-18",
"amountCents": 8500,
"description": "CHECK 1050",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "85af629515bfa6f1"
},
{
"id": "txn_000302",
"date": "2025-07-18",
"amountCents": -5900,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "38bac0d8a2e33fb1"
},
{
"id": "txn_000303",
"date": "2025-07-19",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "396d52674c88acd4"
},
{
"id": "txn_000304",
"date": "2025-07-19",
"amountCents": 16500,
"description": "ZELLE FROM L NAPIER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d64bfe2e62056d62"
},
{
"id": "txn_000305",
"date": "2025-07-19",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "aa092604116670d8"
},
{
"id": "txn_000306",
"date": "2025-07-22",
"amountCents": 16500,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d58c4d0fed200ae3"
},
{
"id": "txn_000307",
"date": "2025-07-22",
"amountCents": -7989,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5dc8924f7e0537c3"
},
{
"id": "txn_000308",
"date": "2025-07-23",
"amountCents": 32000,
"description": "CHECK 1051",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "69d2a8efb5e1e3b3"
},
{
"id": "txn_000309",
"date": "2025-07-23",
"amountCents": 8500,
"description": "ZELLE FROM G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c870068bd1497d98"
},
{
"id": "txn_000310",
"date": "2025-07-23",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "2f159eab6744f107"
},
{
"id": "txn_000311",
"date": "2025-07-23",
"amountCents": 16500,
"description": "CHECK 1052",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "dee9efc0a350c942"
},
{
"id": "txn_000312",
"date": "2025-07-24",
"amountCents": 32000,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "509363916f1726c0"
},
{
"id": "txn_000313",
"date": "2025-07-24",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "b5e15132eb9c36ef"
},
{
"id": "txn_000314",
"date": "2025-07-24",
"amountCents": -5600,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "a968bdd7c6acefb9"
},
{
"id": "txn_000315",
"date": "2025-07-25",
"amountCents": 16500,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8b52d6b1d81019bb"
},
{
"id": "txn_000316",
"date": "2025-07-25",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "7df8f263ffac7863"
},
{
"id": "txn_000317",
"date": "2025-07-25",
"amountCents": 32000,
"description": "ZELLE FROM N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "359e26829e2805b4"
},
{
"id": "txn_000318",
"date": "2025-07-26",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7a7d9a27b2614c8b"
},
{
"id": "txn_000319",
"date": "2025-07-26",
"amountCents": 16500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f751da51506054b7"
},
{
"id": "txn_000320",
"date": "2025-07-30",
"amountCents": 16500,
"description": "VENMO K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b891637e217ddea1"
},
{
"id": "txn_000321",
"date": "2025-07-31",
"amountCents": 32000,
"description": "VENMO C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "eaa1f2822a6ef12c"
},
{
"id": "txn_000322",
"date": "2025-07-31",
"amountCents": 32000,
"description": "CHECK 1053",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1d47454b7f5b6104"
},
{
"id": "txn_000323",
"date": "2025-08-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "6dbfc2501f1a0e6d"
},
{
"id": "txn_000324",
"date": "2025-08-02",
"amountCents": 32000,
"description": "VENMO M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7ec9d736c0cea62b"
},
{
"id": "txn_000325",
"date": "2025-08-02",
"amountCents": 8500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e1c64531f08a50f6"
},
{
"id": "txn_000326",
"date": "2025-08-02",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2dbda0c8ee7e2a69"
},
{
"id": "txn_000327",
"date": "2025-08-02",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "c897222562a0e83c"
},
{
"id": "txn_000328",
"date": "2025-08-02",
"amountCents": -7800,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "95efbd830d24c99d"
},
{
"id": "txn_000329",
"date": "2025-08-03",
"amountCents": -14679,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "3c62de67afea8386"
},
{
"id": "txn_000330",
"date": "2025-08-04",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "d8a6977c66505b5e"
},
{
"id": "txn_000331",
"date": "2025-08-05",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "9456579fa98c90a6"
},
{
"id": "txn_000332",
"date": "2025-08-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "d35ff46bbc082e06"
},
{
"id": "txn_000333",
"date": "2025-08-06",
"amountCents": 32000,
"description": "VENMO P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "28d2031cc453d482"
},
{
"id": "txn_000334",
"date": "2025-08-06",
"amountCents": -5400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "5eb5e14cd940271e"
},
{
"id": "txn_000335",
"date": "2025-08-07",
"amountCents": 32000,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "0fceefbc74e11bc9"
},
{
"id": "txn_000336",
"date": "2025-08-07",
"amountCents": 32000,
"description": "ZELLE FROM L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "29c5388549c8f23c"
},
{
"id": "txn_000337",
"date": "2025-08-07",
"amountCents": 8500,
"description": "VENMO F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "914d39456f3ace47"
},
{
"id": "txn_000338",
"date": "2025-08-07",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "a09a15c63e7f1a87"
},
{
"id": "txn_000339",
"date": "2025-08-08",
"amountCents": 8500,
"description": "ZELLE FROM A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a5f0023abe0e8d20"
},
{
"id": "txn_000340",
"date": "2025-08-08",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "043c29486380e3ce"
},
{
"id": "txn_000341",
"date": "2025-08-08",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5a3cbcbda2eb8847"
},
{
"id": "txn_000342",
"date": "2025-08-09",
"amountCents": 16500,
"description": "VENMO K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "640acf8185c547ca"
},
{
"id": "txn_000343",
"date": "2025-08-09",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "008b173b07cdbd2d"
},
{
"id": "txn_000344",
"date": "2025-08-09",
"amountCents": -11289,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "6c700b44036e1657"
},
{
"id": "txn_000345",
"date": "2025-08-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "f5187fe0a060b563"
},
{
"id": "txn_000346",
"date": "2025-08-11",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "359e4e7889387222"
},
{
"id": "txn_000347",
"date": "2025-08-11",
"amountCents": -5600,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "61755217c2d716d4"
},
{
"id": "txn_000348",
"date": "2025-08-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "5c41cd24d6c97c8f"
},
{
"id": "txn_000349",
"date": "2025-08-14",
"amountCents": 32000,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1573bff114c18530"
},
{
"id": "txn_000350",
"date": "2025-08-14",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "a546b8d1904ac4d9"
},
{
"id": "txn_000351",
"date": "2025-08-16",
"amountCents": 16500,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d8c8152de0fce441"
},
{
"id": "txn_000352",
"date": "2025-08-16",
"amountCents": -17595,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "973e66c2d9430513"
},
{
"id": "txn_000353",
"date": "2025-08-16",
"amountCents": -5300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e2944e460b358242"
},
{
"id": "txn_000354",
"date": "2025-08-17",
"amountCents": 8500,
"description": "ZELLE FROM H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bebedbd79980ff63"
},
{
"id": "txn_000355",
"date": "2025-08-17",
"amountCents": 16500,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2917d50918b318fc"
},
{
"id": "txn_000356",
"date": "2025-08-18",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "618adbf5c8a0b011"
},
{
"id": "txn_000357",
"date": "2025-08-19",
"amountCents": 48000,
"description": "VENMO J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "fd17930150d92f4e"
},
{
"id": "txn_000358",
"date": "2025-08-20",
"amountCents": 32000,
"description": "ZELLE FROM E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "0d33a7372329d2ba"
},
{
"id": "txn_000359",
"date": "2025-08-20",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "55581b03f709bcff"
},
{
"id": "txn_000360",
"date": "2025-08-20",
"amountCents": -5300,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bca98a3c11e3ea69"
},
{
"id": "txn_000361",
"date": "2025-08-21",
"amountCents": 8500,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0f75492e76a8b203"
},
{
"id": "txn_000362",
"date": "2025-08-21",
"amountCents": 16500,
"description": "CHECK 1054",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "88112db3605e2c17"
},
{
"id": "txn_000363",
"date": "2025-08-22",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "d733e31cd734fcd7"
},
{
"id": "txn_000364",
"date": "2025-08-22",
"amountCents": -12895,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "421d3052e018e751"
},
{
"id": "txn_000365",
"date": "2025-08-23",
"amountCents": 16500,
"description": "VENMO L MOORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d198dc27d66f6128"
},
{
"id": "txn_000366",
"date": "2025-08-24",
"amountCents": 16500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ce64b39382451536"
},
{
"id": "txn_000367",
"date": "2025-08-24",
"amountCents": 16500,
"description": "CHECK 1055",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "776d5c12d52dc9dc"
},
{
"id": "txn_000368",
"date": "2025-08-25",
"amountCents": 16500,
"description": "ZELLE FROM G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b6275d58700cc75c"
},
{
"id": "txn_000369",
"date": "2025-08-25",
"amountCents": -5200,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "71c59efec7ded452"
},
{
"id": "txn_000370",
"date": "2025-08-28",
"amountCents": 8500,
"description": "VENMO F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5bfb5b67116e567d"
},
{
"id": "txn_000371",
"date": "2025-08-30",
"amountCents": 8500,
"description": "VENMO J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f86cc390ab7f340c"
},
{
"id": "txn_000372",
"date": "2025-09-01",
"amountCents": 16500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f782d95611fe656f"
},
{
"id": "txn_000373",
"date": "2025-09-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "3839c280c9c428d2"
},
{
"id": "txn_000374",
"date": "2025-09-02",
"amountCents": 8500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5fe03b6b74a22568"
},
{
"id": "txn_000375",
"date": "2025-09-02",
"amountCents": 32000,
"description": "VENMO J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6f7e14df57eebb76"
},
{
"id": "txn_000376",
"date": "2025-09-02",
"amountCents": -5600,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "8f6c33924d3d869b"
},
{
"id": "txn_000377",
"date": "2025-09-03",
"amountCents": 8500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "6b11d745fa250538"
},
{
"id": "txn_000378",
"date": "2025-09-03",
"amountCents": -13179,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "a08e2113eb3bf455"
},
{
"id": "txn_000379",
"date": "2025-09-04",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "cf362841f6a01ebd"
},
{
"id": "txn_000380",
"date": "2025-09-05",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "ce5e4e440e8b28ec"
},
{
"id": "txn_000381",
"date": "2025-09-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "3126e9592f11ea45"
},
{
"id": "txn_000382",
"date": "2025-09-06",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "048e736ba96e1e28"
},
{
"id": "txn_000383",
"date": "2025-09-07",
"amountCents": 48000,
"description": "VENMO K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "dbf79aeefb184acd"
},
{
"id": "txn_000384",
"date": "2025-09-07",
"amountCents": 16500,
"description": "CHECK 1056",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "31d4fe7ae49a0a4e"
},
{
"id": "txn_000385",
"date": "2025-09-07",
"amountCents": -6900,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "32a1ca429230d250"
},
{
"id": "txn_000386",
"date": "2025-09-08",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "a3781be696fc414a"
},
{
"id": "txn_000387",
"date": "2025-09-09",
"amountCents": -11995,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "a967498ae5000571"
},
{
"id": "txn_000388",
"date": "2025-09-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "a4ffcb76f932abd6"
},
{
"id": "txn_000389",
"date": "2025-09-11",
"amountCents": 16500,
"description": "ZELLE FROM K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "47f34d39cbb22846"
},
{
"id": "txn_000390",
"date": "2025-09-11",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "1fca3715f705335d"
},
{
"id": "txn_000391",
"date": "2025-09-12",
"amountCents": 8500,
"description": "ZELLE FROM M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "bd9134058381fd38"
},
{
"id": "txn_000392",
"date": "2025-09-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "8df848a86bea4530"
},
{
"id": "txn_000393",
"date": "2025-09-12",
"amountCents": -6300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "67c52d1da415dd1c"
},
{
"id": "txn_000394",
"date": "2025-09-13",
"amountCents": 8500,
"description": "ZELLE FROM E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "67c100a720872865"
},
{
"id": "txn_000395",
"date": "2025-09-13",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "fc514db3766fb3e3"
},
{
"id": "txn_000396",
"date": "2025-09-15",
"amountCents": 8500,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ff2ee134eb81e9f9"
},
{
"id": "txn_000397",
"date": "2025-09-15",
"amountCents": -12289,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "613790dedc886dc8"
},
{
"id": "txn_000398",
"date": "2025-09-16",
"amountCents": 16500,
"description": "VENMO A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ef1afb2c21bfeea4"
},
{
"id": "txn_000399",
"date": "2025-09-17",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a105409c61c07c4b"
},
{
"id": "txn_000400",
"date": "2025-09-18",
"amountCents": 8500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "54bad578405b4013"
},
{
"id": "txn_000401",
"date": "2025-09-18",
"amountCents": -6700,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "b5695969951347c4"
},
{
"id": "txn_000402",
"date": "2025-09-19",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "801c9228ec1ccb2e"
},
{
"id": "txn_000403",
"date": "2025-09-19",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "c905f3eae7d28a29"
},
{
"id": "txn_000404",
"date": "2025-09-21",
"amountCents": -17789,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "9212bf9e0e511446"
},
{
"id": "txn_000405",
"date": "2025-09-22",
"amountCents": 16500,
"description": "VENMO G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "36616f31cd6eca0f"
},
{
"id": "txn_000406",
"date": "2025-09-23",
"amountCents": 32000,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bd9d819e36b42923"
},
{
"id": "txn_000407",
"date": "2025-09-23",
"amountCents": 16500,
"description": "ZELLE FROM V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e8f1869a42fd9bda"
},
{
"id": "txn_000408",
"date": "2025-09-23",
"amountCents": -6700,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "fc73c3aa80b162f1"
},
{
"id": "txn_000409",
"date": "2025-09-24",
"amountCents": 32000,
"description": "CHECK 1057",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "a7563a8324f5c1c8"
},
{
"id": "txn_000410",
"date": "2025-09-25",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "cd9e4f7a59837180"
},
{
"id": "txn_000411",
"date": "2025-09-26",
"amountCents": 16500,
"description": "ZELLE FROM H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f914cb14aef6970f"
},
{
"id": "txn_000412",
"date": "2025-09-27",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "e78f795e8bffa872"
},
{
"id": "txn_000413",
"date": "2025-09-28",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "219054b0a14ee546"
},
{
"id": "txn_000414",
"date": "2025-09-30",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4e6a866a1958b884"
},
{
"id": "txn_000415",
"date": "2025-10-01",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6842849c00673301"
},
{
"id": "txn_000416",
"date": "2025-10-01",
"amountCents": 32000,
"description": "CHECK 1058",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "a741613786a16b37"
},
{
"id": "txn_000417",
"date": "2025-10-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "155d8f8c8202dbb4"
},
{
"id": "txn_000418",
"date": "2025-10-02",
"amountCents": 8500,
"description": "VENMO K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2f30e09adcf33848"
},
{
"id": "txn_000419",
"date": "2025-10-02",
"amountCents": -6600,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "91cf69fd4161a328"
},
{
"id": "txn_000420",
"date": "2025-10-03",
"amountCents": 16500,
"description": "VENMO J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "9ecc29de057dc806"
},
{
"id": "txn_000421",
"date": "2025-10-03",
"amountCents": 8500,
"description": "VENMO A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "6253933176634e6f"
},
{
"id": "txn_000422",
"date": "2025-10-03",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "d52258e037507f3c"
},
{
"id": "txn_000423",
"date": "2025-10-03",
"amountCents": -7179,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "ab6d6d37e9dbb371"
},
{
"id": "txn_000424",
"date": "2025-10-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "2e08b350a93fd9cf"
},
{
"id": "txn_000425",
"date": "2025-10-06",
"amountCents": 16500,
"description": "CHECK 1059",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "3cc33b1e23765b17"
},
{
"id": "txn_000426",
"date": "2025-10-06",
"amountCents": 16500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "3ed90f49b4e0bdbe"
},
{
"id": "txn_000427",
"date": "2025-10-06",
"amountCents": 8500,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "53b928440ce30810"
},
{
"id": "txn_000428",
"date": "2025-10-07",
"amountCents": -6000,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "5e21d3fd372038a3"
},
{
"id": "txn_000429",
"date": "2025-10-08",
"amountCents": 8500,
"description": "CHECK 1060",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "6b3cba57df282c22"
},
{
"id": "txn_000430",
"date": "2025-10-08",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "04538e9be478ebd1"
},
{
"id": "txn_000431",
"date": "2025-10-09",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "4c288f32e8c8095c"
},
{
"id": "txn_000432",
"date": "2025-10-10",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d2fd52f9519f0e07"
},
{
"id": "txn_000433",
"date": "2025-10-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "a6eae1facaac74e4"
},
{
"id": "txn_000434",
"date": "2025-10-11",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "5b87d434f1a70927"
},
{
"id": "txn_000435",
"date": "2025-10-11",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "89811945f945f6cd"
},
{
"id": "txn_000436",
"date": "2025-10-11",
"amountCents": -8989,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "c35b106027139568"
},
{
"id": "txn_000437",
"date": "2025-10-12",
"amountCents": 16500,
"description": "VENMO G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "87b27b33659a934e"
},
{
"id": "txn_000438",
"date": "2025-10-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "3e84f0a7fb74996a"
},
{
"id": "txn_000439",
"date": "2025-10-13",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "47d3140d58907f5c"
},
{
"id": "txn_000440",
"date": "2025-10-13",
"amountCents": 48000,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7ff2aab03cca4beb"
},
{
"id": "txn_000441",
"date": "2025-10-13",
"amountCents": -7000,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "0138c4ddb8166423"
},
{
"id": "txn_000442",
"date": "2025-10-14",
"amountCents": 32000,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "4918e4151ccfdfbe"
},
{
"id": "txn_000443",
"date": "2025-10-14",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "26b1f54c7aaab7b3"
},
{
"id": "txn_000444",
"date": "2025-10-16",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "37a5e8b0180576a4"
},
{
"id": "txn_000445",
"date": "2025-10-17",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7c1ec5c61120aa46"
},
{
"id": "txn_000446",
"date": "2025-10-18",
"amountCents": 32000,
"description": "VENMO R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "746ae8e1c747d692"
},
{
"id": "txn_000447",
"date": "2025-10-18",
"amountCents": 8500,
"description": "ZELLE FROM T BAILEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2d96c1b35bf095a7"
},
{
"id": "txn_000448",
"date": "2025-10-18",
"amountCents": -7700,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "de7824a54acebd4c"
},
{
"id": "txn_000449",
"date": "2025-10-20",
"amountCents": -11799,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "ea161e71cab4fe36"
},
{
"id": "txn_000450",
"date": "2025-10-21",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "dd7ef1f6f707e36b"
},
{
"id": "txn_000451",
"date": "2025-10-22",
"amountCents": 8500,
"description": "CHECK 1061",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "054371b9f0b1f692"
},
{
"id": "txn_000452",
"date": "2025-10-24",
"amountCents": -7500,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6cfda8528f1839a8"
},
{
"id": "txn_000453",
"date": "2025-10-25",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8d4237b0ca7d3f79"
},
{
"id": "txn_000454",
"date": "2025-10-25",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "014614fabb4a6e3f"
},
{
"id": "txn_000455",
"date": "2025-10-27",
"amountCents": 16500,
"description": "ZELLE FROM J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c1ef6764b6ebd782"
},
{
"id": "txn_000456",
"date": "2025-10-27",
"amountCents": 16500,
"description": "CHECK 1062",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "555f3c438f443bca"
},
{
"id": "txn_000457",
"date": "2025-10-28",
"amountCents": 8500,
"description": "VENMO H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9c4df38028f752c1"
},
{
"id": "txn_000458",
"date": "2025-10-28",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "cf1df9c3156412e3"
},
{
"id": "txn_000459",
"date": "2025-10-29",
"amountCents": 8500,
"description": "ZELLE FROM T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c7346a3369325955"
},
{
"id": "txn_000460",
"date": "2025-10-29",
"amountCents": 16500,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d9c49284309ebea9"
},
{
"id": "txn_000461",
"date": "2025-10-29",
"amountCents": 32000,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dc619b04d3717645"
},
{
"id": "txn_000462",
"date": "2025-10-30",
"amountCents": 16500,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "943088146a2c80e4"
},
{
"id": "txn_000463",
"date": "2025-10-30",
"amountCents": 16500,
"description": "CHECK 1063",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "b0a455c25516a52e"
},
{
"id": "txn_000464",
"date": "2025-10-31",
"amountCents": 8500,
"description": "VENMO R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "bcfac3077ef3c024"
},
{
"id": "txn_000465",
"date": "2025-10-31",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "1401fa4084b2d117"
},
{
"id": "txn_000466",
"date": "2025-11-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "5c6d7cb684599d47"
},
{
"id": "txn_000467",
"date": "2025-11-02",
"amountCents": -6700,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "5660991bba02939a"
},
{
"id": "txn_000468",
"date": "2025-11-03",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "3f793131ab2d2cbb"
},
{
"id": "txn_000469",
"date": "2025-11-03",
"amountCents": -12889,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "8cd4871fe0c049d7"
},
{
"id": "txn_000470",
"date": "2025-11-04",
"amountCents": 48000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "301aa7dc771f603e"
},
{
"id": "txn_000471",
"date": "2025-11-04",
"amountCents": 8500,
"description": "VENMO J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e5b72b6551743337"
},
{
"id": "txn_000472",
"date": "2025-11-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "25ba7b4dfe8f6e60"
},
{
"id": "txn_000473",
"date": "2025-11-06",
"amountCents": 8500,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "f71d5a89a1317112"
},
{
"id": "txn_000474",
"date": "2025-11-06",
"amountCents": -6600,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "90412a3503a012cf"
},
{
"id": "txn_000475",
"date": "2025-11-08",
"amountCents": 8500,
"description": "ZELLE FROM K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "44615999db64530e"
},
{
"id": "txn_000476",
"date": "2025-11-08",
"amountCents": 8500,
"description": "ZELLE FROM P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b7dc19f59cedfa1a"
},
{
"id": "txn_000477",
"date": "2025-11-08",
"amountCents": 16500,
"description": "CHECK 1064",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "cb597a849b32134c"
},
{
"id": "txn_000478",
"date": "2025-11-08",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "9fe646e992da45b3"
},
{
"id": "txn_000479",
"date": "2025-11-10",
"amountCents": 32000,
"description": "CHECK 1065",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9f0fbb0654a7cd84"
},
{
"id": "txn_000480",
"date": "2025-11-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "69dd999f43ff7431"
},
{
"id": "txn_000481",
"date": "2025-11-11",
"amountCents": -17599,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "593f4940576ea774"
},
{
"id": "txn_000482",
"date": "2025-11-11",
"amountCents": -6100,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "df13e3181468fedd"
},
{
"id": "txn_000483",
"date": "2025-11-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "096521e81c777a51"
},
{
"id": "txn_000484",
"date": "2025-11-13",
"amountCents": 8500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "01226183668eae39"
},
{
"id": "txn_000485",
"date": "2025-11-14",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "60ff81e2b172b7d8"
},
{
"id": "txn_000486",
"date": "2025-11-15",
"amountCents": 48000,
"description": "VENMO K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "691223cab0dc376f"
},
{
"id": "txn_000487",
"date": "2025-11-15",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f8d24bf9cb7750ce"
},
{
"id": "txn_000488",
"date": "2025-11-15",
"amountCents": 8500,
"description": "VENMO A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "693ab6900e088466"
},
{
"id": "txn_000489",
"date": "2025-11-15",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "b4dc569b4acef981"
},
{
"id": "txn_000490",
"date": "2025-11-15",
"amountCents": -6800,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "482ad0ac41130709"
},
{
"id": "txn_000491",
"date": "2025-11-17",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "5e0a79f6555f9de4"
},
{
"id": "txn_000492",
"date": "2025-11-18",
"amountCents": 8500,
"description": "ZELLE FROM C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "13420e140f17b24d"
},
{
"id": "txn_000493",
"date": "2025-11-19",
"amountCents": 8500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "cf00ba0c21ffca9b"
},
{
"id": "txn_000494",
"date": "2025-11-19",
"amountCents": 8500,
"description": "VENMO H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4399ecc968ab58ee"
},
{
"id": "txn_000495",
"date": "2025-11-19",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "1a40592088a5923a"
},
{
"id": "txn_000496",
"date": "2025-11-19",
"amountCents": -16695,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "fafd06bedfb61923"
},
{
"id": "txn_000497",
"date": "2025-11-20",
"amountCents": -6400,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "464761a5b28dbb47"
},
{
"id": "txn_000498",
"date": "2025-11-21",
"amountCents": 8500,
"description": "CHECK 1066",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9d11b2be9663b0be"
},
{
"id": "txn_000499",
"date": "2025-11-22",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0d8d6f63949fa263"
},
{
"id": "txn_000500",
"date": "2025-11-22",
"amountCents": 16500,
"description": "VENMO S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "cec58ea61e543ebb"
},
{
"id": "txn_000501",
"date": "2025-11-22",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "bdab036cb4b67407"
},
{
"id": "txn_000502",
"date": "2025-11-22",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "c3169ecccfdc1d60"
},
{
"id": "txn_000503",
"date": "2025-11-23",
"amountCents": 8500,
"description": "VENMO N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1bc93c0c906288fe"
},
{
"id": "txn_000504",
"date": "2025-11-24",
"amountCents": 8500,
"description": "CHECK 1067",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "865bc30280272903"
},
{
"id": "txn_000505",
"date": "2025-11-24",
"amountCents": 16500,
"description": "CHECK 1068",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "8eb9903b07ef5e5e"
},
{
"id": "txn_000506",
"date": "2025-11-24",
"amountCents": -5600,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "85679b99ae01cd5e"
},
{
"id": "txn_000507",
"date": "2025-11-25",
"amountCents": 8500,
"description": "CHECK 1069",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d401caf470ff4b32"
},
{
"id": "txn_000508",
"date": "2025-11-26",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "a9e5d3a3e327b242"
},
{
"id": "txn_000509",
"date": "2025-11-26",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "00de1467a8ed8c9c"
},
{
"id": "txn_000510",
"date": "2025-11-27",
"amountCents": 8500,
"description": "ZELLE FROM M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "59d87cc9ebedc76e"
},
{
"id": "txn_000511",
"date": "2025-11-27",
"amountCents": 8500,
"description": "CHECK 1070",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "217b98a6442a51d8"
},
{
"id": "txn_000512",
"date": "2025-11-27",
"amountCents": 16500,
"description": "VENMO C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "ee1444de68d6d6e5"
},
{
"id": "txn_000513",
"date": "2025-11-28",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "41ed02e88a296006"
},
{
"id": "txn_000514",
"date": "2025-11-30",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "b4d4cb15e8765433"
},
{
"id": "txn_000515",
"date": "2025-12-01",
"amountCents": 8500,
"description": "ZELLE FROM L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "6cda8ce93f45692d"
},
{
"id": "txn_000516",
"date": "2025-12-01",
"amountCents": -2900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "8127712fc288fcaa"
},
{
"id": "txn_000517",
"date": "2025-12-02",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5a86d7d1da2e49ee"
},
{
"id": "txn_000518",
"date": "2025-12-02",
"amountCents": -6000,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "928c5e69fbd87dba"
},
{
"id": "txn_000519",
"date": "2025-12-03",
"amountCents": -17595,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "49de639af3a2610e"
},
{
"id": "txn_000520",
"date": "2025-12-05",
"amountCents": -38500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "66878c6b5d2ce00d"
},
{
"id": "txn_000521",
"date": "2025-12-07",
"amountCents": 8500,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "66de5bbbebbc9ad5"
},
{
"id": "txn_000522",
"date": "2025-12-07",
"amountCents": -6500,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "503657777bcf3e0d"
},
{
"id": "txn_000523",
"date": "2025-12-09",
"amountCents": 16500,
"description": "CHECK 1071",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f556068211e79dc0"
},
{
"id": "txn_000524",
"date": "2025-12-09",
"amountCents": -14195,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "990ecd5121f72134"
},
{
"id": "txn_000525",
"date": "2025-12-10",
"amountCents": 32000,
"description": "ZELLE FROM P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "9e2cb38166697957"
},
{
"id": "txn_000526",
"date": "2025-12-10",
"amountCents": -19500,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "d924035f6f72d36e"
},
{
"id": "txn_000527",
"date": "2025-12-11",
"amountCents": 48000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4ccda3b14c4a66af"
},
{
"id": "txn_000528",
"date": "2025-12-11",
"amountCents": 32000,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "cca3c1ab2f7a22c6"
},
{
"id": "txn_000529",
"date": "2025-12-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "25bc1ec0b3fbe038"
},
{
"id": "txn_000530",
"date": "2025-12-13",
"amountCents": 32000,
"description": "CHECK 1072",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "130cd4cbf70c449e"
},
{
"id": "txn_000531",
"date": "2025-12-13",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6699f48e6bbcf1c1"
},
{
"id": "txn_000532",
"date": "2025-12-13",
"amountCents": -6200,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "20e9d930dc3b98a4"
},
{
"id": "txn_000533",
"date": "2025-12-14",
"amountCents": 16500,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "95d4016b219ba4a1"
},
{
"id": "txn_000534",
"date": "2025-12-14",
"amountCents": 16500,
"description": "CHECK 1073",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "45910313671cea96"
},
{
"id": "txn_000535",
"date": "2025-12-16",
"amountCents": -16489,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "75a76f8e1c9fcb05"
},
{
"id": "txn_000536",
"date": "2025-12-18",
"amountCents": -6600,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "3f4747a8006ce749"
},
{
"id": "txn_000537",
"date": "2025-12-20",
"amountCents": 16500,
"description": "ZELLE FROM G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d0b184179077b81a"
},
{
"id": "txn_000538",
"date": "2025-12-20",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "9fb8f700291abc0b"
},
{
"id": "txn_000539",
"date": "2025-12-21",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "717cab6b49b73162"
},
{
"id": "txn_000540",
"date": "2025-12-21",
"amountCents": 32000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "32b0c1195953d2e9"
},
{
"id": "txn_000541",
"date": "2025-12-22",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c6eabbe9a5f2444f"
},
{
"id": "txn_000542",
"date": "2025-12-22",
"amountCents": -14297,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "be77de1314230c7d"
},
{
"id": "txn_000543",
"date": "2025-12-24",
"amountCents": -5900,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "28c3937ed1dd1118"
},
{
"id": "txn_000544",
"date": "2025-12-25",
"amountCents": 16500,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4f042eb266737743"
},
{
"id": "txn_000545",
"date": "2025-12-25",
"amountCents": 16500,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7922d00db151803b"
},
{
"id": "txn_000546",
"date": "2025-12-27",
"amountCents": 16500,
"description": "CHECK 1074",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "8e7acdec0f656a64"
},
{
"id": "txn_000547",
"date": "2025-12-27",
"amountCents": 48000,
"description": "ZELLE FROM D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "efcf834cfb44630c"
},
{
"id": "txn_000548",
"date": "2025-12-27",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "40dae53b3ce4520b"
},
{
"id": "txn_000549",
"date": "2025-12-28",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "66c94e9ae86ac94e"
},
{
"id": "txn_000550",
"date": "2025-12-30",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "21d18f42df467f35"
},
{
"id": "txn_000551",
"date": "2026-01-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "9101ac149aa97a22"
},
{
"id": "txn_000552",
"date": "2026-01-02",
"amountCents": 8500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dc0befa689cca83e"
},
{
"id": "txn_000553",
"date": "2026-01-02",
"amountCents": -6300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "be6dc7bb6fbc0b14"
},
{
"id": "txn_000554",
"date": "2026-01-03",
"amountCents": 8500,
"description": "VENMO B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "549e936fb1a7b56b"
},
{
"id": "txn_000555",
"date": "2026-01-03",
"amountCents": -14089,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5d53655e9350a669"
},
{
"id": "txn_000556",
"date": "2026-01-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "efeba4b388fc2cda"
},
{
"id": "txn_000557",
"date": "2026-01-06",
"amountCents": 16500,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "fc1b13a731be1e56"
},
{
"id": "txn_000558",
"date": "2026-01-06",
"amountCents": -7000,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "7906f5a1fc738076"
},
{
"id": "txn_000559",
"date": "2026-01-08",
"amountCents": 8500,
"description": "VENMO L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "074cf8c8b1009344"
},
{
"id": "txn_000560",
"date": "2026-01-09",
"amountCents": -9279,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f4bfee939d4b8253"
},
{
"id": "txn_000561",
"date": "2026-01-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "0eb4ec5e5ba6621c"
},
{
"id": "txn_000562",
"date": "2026-01-11",
"amountCents": -6300,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f83f00fa74951125"
},
{
"id": "txn_000563",
"date": "2026-01-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "a783456fc146f453"
},
{
"id": "txn_000564",
"date": "2026-01-13",
"amountCents": 8500,
"description": "CHECK 1075",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "21ad1ca8029c03e7"
},
{
"id": "txn_000565",
"date": "2026-01-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "326410cc57b59508"
},
{
"id": "txn_000566",
"date": "2026-01-15",
"amountCents": 16500,
"description": "VENMO F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "56e5c6a3a980e056"
},
{
"id": "txn_000567",
"date": "2026-01-16",
"amountCents": -16199,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "15758e121a870166"
},
{
"id": "txn_000568",
"date": "2026-01-16",
"amountCents": -6800,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "0439192676d67700"
},
{
"id": "txn_000569",
"date": "2026-01-17",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5e89e6f6ac5877f9"
},
{
"id": "txn_000570",
"date": "2026-01-17",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6bb151a61c30351d"
},
{
"id": "txn_000571",
"date": "2026-01-17",
"amountCents": 16500,
"description": "CHECK 1076",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "76219d0d150ac896"
},
{
"id": "txn_000572",
"date": "2026-01-19",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "7457c2f0d9bb96d1"
},
{
"id": "txn_000573",
"date": "2026-01-20",
"amountCents": -6100,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "3c9f8df4e9989dfa"
},
{
"id": "txn_000574",
"date": "2026-01-21",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1cfc976b19d8afdc"
},
{
"id": "txn_000575",
"date": "2026-01-22",
"amountCents": 8500,
"description": "VENMO K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c36fcd1c3a7c54ee"
},
{
"id": "txn_000576",
"date": "2026-01-22",
"amountCents": -12879,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "78b2a2971a672b1f"
},
{
"id": "txn_000577",
"date": "2026-01-24",
"amountCents": 8500,
"description": "VENMO E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1a33d36ab9217d6d"
},
{
"id": "txn_000578",
"date": "2026-01-25",
"amountCents": 16500,
"description": "VENMO B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "88b44544fbf3b376"
},
{
"id": "txn_000579",
"date": "2026-01-25",
"amountCents": -7200,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "4e50e0b01bdfaf7f"
},
{
"id": "txn_000580",
"date": "2026-01-27",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "8ba6cdd20f1e30fc"
},
{
"id": "txn_000581",
"date": "2026-01-28",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9b70c96edd22c6e1"
},
{
"id": "txn_000582",
"date": "2026-01-29",
"amountCents": 16500,
"description": "ZELLE FROM K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "8a1a8d7f35937b97"
},
{
"id": "txn_000583",
"date": "2026-01-29",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "fe21bd655d01beb1"
},
{
"id": "txn_000584",
"date": "2026-01-29",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "a774bedb01902e87"
},
{
"id": "txn_000585",
"date": "2026-02-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "eabc75a455fc0d67"
},
{
"id": "txn_000586",
"date": "2026-02-02",
"amountCents": 16500,
"description": "CHECK 1077",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8af2ff7bc9396f67"
},
{
"id": "txn_000587",
"date": "2026-02-02",
"amountCents": -7200,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "885ab46f559e9157"
},
{
"id": "txn_000588",
"date": "2026-02-03",
"amountCents": 8500,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "036128bbcb1c4722"
},
{
"id": "txn_000589",
"date": "2026-02-03",
"amountCents": 16500,
"description": "ZELLE FROM N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "185b7d4cfea751db"
},
{
"id": "txn_000590",
"date": "2026-02-03",
"amountCents": 8500,
"description": "CHECK 1078",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "8d0d31a9f08180c5"
},
{
"id": "txn_000591",
"date": "2026-02-03",
"amountCents": -18849,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "2fe8421ac296d436"
},
{
"id": "txn_000592",
"date": "2026-02-04",
"amountCents": 16500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1ee93634d10c6c95"
},
{
"id": "txn_000593",
"date": "2026-02-05",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "e69dab7adc15bd2e"
},
{
"id": "txn_000594",
"date": "2026-02-05",
"amountCents": 8500,
"description": "VENMO V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "369356a43d6c2778"
},
{
"id": "txn_000595",
"date": "2026-02-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "5a58026c008ca85f"
},
{
"id": "txn_000596",
"date": "2026-02-06",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2ca80f61561b80bc"
},
{
"id": "txn_000597",
"date": "2026-02-06",
"amountCents": -8000,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f2880f896dc68b65"
},
{
"id": "txn_000598",
"date": "2026-02-07",
"amountCents": 16500,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "10302582f268b077"
},
{
"id": "txn_000599",
"date": "2026-02-07",
"amountCents": -10579,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "e7dae95c643dc7bc"
},
{
"id": "txn_000600",
"date": "2026-02-09",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "137e107d335a8d20"
},
{
"id": "txn_000601",
"date": "2026-02-09",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "7e763b894c87f65d"
},
{
"id": "txn_000602",
"date": "2026-02-10",
"amountCents": 16500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "785099db6b19e74b"
},
{
"id": "txn_000603",
"date": "2026-02-10",
"amountCents": 8500,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7d8b72e7eb5c3ad5"
},
{
"id": "txn_000604",
"date": "2026-02-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "ad78a0d78aedab27"
},
{
"id": "txn_000605",
"date": "2026-02-10",
"amountCents": -7000,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "25e5989f51a9dfc8"
},
{
"id": "txn_000606",
"date": "2026-02-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "c10fa6954f79df26"
},
{
"id": "txn_000607",
"date": "2026-02-12",
"amountCents": -14295,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "38d5ab5abe14afb6"
},
{
"id": "txn_000608",
"date": "2026-02-13",
"amountCents": 16500,
"description": "VENMO D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5b5507d92930e9c6"
},
{
"id": "txn_000609",
"date": "2026-02-14",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "c61d69b6c7e3931e"
},
{
"id": "txn_000610",
"date": "2026-02-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "96750fb1d6b9eee7"
},
{
"id": "txn_000611",
"date": "2026-02-14",
"amountCents": -8200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "24b682b610b4f409"
},
{
"id": "txn_000612",
"date": "2026-02-15",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "67d589b61302b61f"
},
{
"id": "txn_000613",
"date": "2026-02-16",
"amountCents": -18295,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "1c6b43d7270d689d"
},
{
"id": "txn_000614",
"date": "2026-02-17",
"amountCents": 48000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "656ee2267860f14a"
},
{
"id": "txn_000615",
"date": "2026-02-18",
"amountCents": -6300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "97cadedc572f7248"
},
{
"id": "txn_000616",
"date": "2026-02-20",
"amountCents": 32000,
"description": "ZELLE FROM W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dcd16981794dc7cf"
},
{
"id": "txn_000617",
"date": "2026-02-20",
"amountCents": -60000,
"description": "LEXINGTON HOME AND GARDEN SHOW BOOTH",
"category": "expense",
"scheduleCLine": "8",
"locationId": null,
"source": "fixture",
"hash": "46fcac57c83eb52c"
},
{
"id": "txn_000618",
"date": "2026-02-21",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "fa1372abe350174d"
},
{
"id": "txn_000619",
"date": "2026-02-21",
"amountCents": -11895,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f58d24c3b1e513b4"
},
{
"id": "txn_000620",
"date": "2026-02-22",
"amountCents": 16500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4af010c6606ad33d"
},
{
"id": "txn_000621",
"date": "2026-02-22",
"amountCents": -6900,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "7814d45ff350ab6d"
},
{
"id": "txn_000622",
"date": "2026-02-25",
"amountCents": 8500,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "804a5da64bec84ce"
},
{
"id": "txn_000623",
"date": "2026-02-25",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "49b86785c2a597d2"
},
{
"id": "txn_000624",
"date": "2026-02-26",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "994535192a94f616"
},
{
"id": "txn_000625",
"date": "2026-03-01",
"amountCents": 16500,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "827ef2b39a9de210"
},
{
"id": "txn_000626",
"date": "2026-03-01",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "9cbf7a927b581a99"
},
{
"id": "txn_000627",
"date": "2026-03-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "237f6b1ee41e2e5c"
},
{
"id": "txn_000628",
"date": "2026-03-02",
"amountCents": 16500,
"description": "CHECK 1079",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f897be26e1eb951a"
},
{
"id": "txn_000629",
"date": "2026-03-02",
"amountCents": 32000,
"description": "CHECK 1080",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "43bf9275c31ff34b"
},
{
"id": "txn_000630",
"date": "2026-03-02",
"amountCents": 16500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ee36f4eece3348f0"
},
{
"id": "txn_000631",
"date": "2026-03-02",
"amountCents": -6100,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "b067d35b48d64de5"
},
{
"id": "txn_000632",
"date": "2026-03-03",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "c1b7937169f98eaa"
},
{
"id": "txn_000633",
"date": "2026-03-03",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "642ce4287e23af0a"
},
{
"id": "txn_000634",
"date": "2026-03-03",
"amountCents": -18495,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "99703c26ca0cda81"
},
{
"id": "txn_000635",
"date": "2026-03-04",
"amountCents": 8500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "fa588d4640925f7d"
},
{
"id": "txn_000636",
"date": "2026-03-04",
"amountCents": 32000,
"description": "ZELLE FROM G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "8f424534f5ba2cfa"
},
{
"id": "txn_000637",
"date": "2026-03-05",
"amountCents": 8500,
"description": "VENMO K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e6b6ab2c5944a847"
},
{
"id": "txn_000638",
"date": "2026-03-05",
"amountCents": 32000,
"description": "ZELLE FROM M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "30d4045db22fdc75"
},
{
"id": "txn_000639",
"date": "2026-03-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "3e1aee758669dafc"
},
{
"id": "txn_000640",
"date": "2026-03-06",
"amountCents": 16500,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ea4131a7cc7fda2c"
},
{
"id": "txn_000641",
"date": "2026-03-06",
"amountCents": 16500,
"description": "ZELLE FROM N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5358f4be7e09ac5d"
},
{
"id": "txn_000642",
"date": "2026-03-06",
"amountCents": -6400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "a5da0480728e7e85"
},
{
"id": "txn_000643",
"date": "2026-03-07",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f7335c38ba27ded1"
},
{
"id": "txn_000644",
"date": "2026-03-08",
"amountCents": 16500,
"description": "ZELLE FROM B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "67b73260d295f0fc"
},
{
"id": "txn_000645",
"date": "2026-03-09",
"amountCents": -9895,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f990cb98f4c83da7"
},
{
"id": "txn_000646",
"date": "2026-03-10",
"amountCents": 16500,
"description": "ZELLE FROM P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d584c57543048ffe"
},
{
"id": "txn_000647",
"date": "2026-03-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "aefc22371a9d685a"
},
{
"id": "txn_000648",
"date": "2026-03-10",
"amountCents": -7200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bab056a418516627"
},
{
"id": "txn_000649",
"date": "2026-03-11",
"amountCents": 8500,
"description": "ZELLE FROM L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7c3aa7af75d784c3"
},
{
"id": "txn_000650",
"date": "2026-03-12",
"amountCents": 8500,
"description": "VENMO P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "08206e625f93c567"
},
{
"id": "txn_000651",
"date": "2026-03-12",
"amountCents": 8500,
"description": "VENMO C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "20057f6b3062a239"
},
{
"id": "txn_000652",
"date": "2026-03-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "3033f3a38f19d9bd"
},
{
"id": "txn_000653",
"date": "2026-03-13",
"amountCents": 16500,
"description": "ZELLE FROM H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "27524778f578eaa4"
},
{
"id": "txn_000654",
"date": "2026-03-14",
"amountCents": 8500,
"description": "VENMO W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f19a5a97ffffeb30"
},
{
"id": "txn_000655",
"date": "2026-03-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "9c987ccf792a0cc6"
},
{
"id": "txn_000656",
"date": "2026-03-14",
"amountCents": -8200,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "d7256116ea3e5d10"
},
{
"id": "txn_000657",
"date": "2026-03-15",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "68e824c6f7380ada"
},
{
"id": "txn_000658",
"date": "2026-03-15",
"amountCents": -175000,
"description": "DETAIL KING STEAM EXTRACTOR",
"category": "expense",
"scheduleCLine": "13",
"locationId": null,
"source": "fixture",
"hash": "7db450bdafc1e5ba"
},
{
"id": "txn_000659",
"date": "2026-03-16",
"amountCents": -18899,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "9275871367116256"
},
{
"id": "txn_000660",
"date": "2026-03-17",
"amountCents": 32000,
"description": "CHECK 1081",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "b0d865885e27ba25"
},
{
"id": "txn_000661",
"date": "2026-03-18",
"amountCents": 8500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0a2eb53cfc288c17"
},
{
"id": "txn_000662",
"date": "2026-03-18",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c7655eb279bbde4d"
},
{
"id": "txn_000663",
"date": "2026-03-18",
"amountCents": -5900,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "31d6fe866acad08a"
},
{
"id": "txn_000664",
"date": "2026-03-19",
"amountCents": 8500,
"description": "CHECK 1082",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1c82d691fab54bcb"
},
{
"id": "txn_000665",
"date": "2026-03-21",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "438c696471baba5d"
},
{
"id": "txn_000666",
"date": "2026-03-22",
"amountCents": 16500,
"description": "VENMO T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9d47153a8776ac2b"
},
{
"id": "txn_000667",
"date": "2026-03-22",
"amountCents": -18579,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "c730eb5a9b4fda4b"
},
{
"id": "txn_000668",
"date": "2026-03-22",
"amountCents": -6300,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "2a220dfe9d35b5d1"
},
{
"id": "txn_000669",
"date": "2026-03-23",
"amountCents": 32000,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "863f1a16d9a990d5"
},
{
"id": "txn_000670",
"date": "2026-03-23",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "bc24f43aca991cc2"
},
{
"id": "txn_000671",
"date": "2026-03-23",
"amountCents": 48000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "4ed77b49867df00f"
},
{
"id": "txn_000672",
"date": "2026-03-25",
"amountCents": 8500,
"description": "CHECK 1083",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "80189351c80686f6"
},
{
"id": "txn_000673",
"date": "2026-03-25",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "0d418ac851006c35"
},
{
"id": "txn_000674",
"date": "2026-03-26",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "046c80d6c16919d8"
},
{
"id": "txn_000675",
"date": "2026-03-26",
"amountCents": 8500,
"description": "ZELLE FROM N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5f2afcf4f0af07ef"
},
{
"id": "txn_000676",
"date": "2026-03-26",
"amountCents": -7400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "38301b9674c987a8"
},
{
"id": "txn_000677",
"date": "2026-03-28",
"amountCents": 8500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "84029df9345b397f"
},
{
"id": "txn_000678",
"date": "2026-03-30",
"amountCents": 8500,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2959eab58f518aef"
},
{
"id": "txn_000679",
"date": "2026-04-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "ba0278ab7e5f0fd1"
},
{
"id": "txn_000680",
"date": "2026-04-02",
"amountCents": 16500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "fced5d527d67a69c"
},
{
"id": "txn_000681",
"date": "2026-04-02",
"amountCents": 16500,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2caef2573e6b5fc8"
},
{
"id": "txn_000682",
"date": "2026-04-02",
"amountCents": 16500,
"description": "VENMO W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "57ad0418af692345"
},
{
"id": "txn_000683",
"date": "2026-04-02",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "430324eae05f51db"
},
{
"id": "txn_000684",
"date": "2026-04-02",
"amountCents": -7900,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "2b95906262c89342"
},
{
"id": "txn_000685",
"date": "2026-04-03",
"amountCents": 8500,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1d0074da87345d27"
},
{
"id": "txn_000686",
"date": "2026-04-03",
"amountCents": 16500,
"description": "ZELLE FROM H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4c847d9df3216270"
},
{
"id": "txn_000687",
"date": "2026-04-03",
"amountCents": -13349,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "744b56c75e31f238"
},
{
"id": "txn_000688",
"date": "2026-04-04",
"amountCents": 16500,
"description": "VENMO E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7b99a8d9cfaf8163"
},
{
"id": "txn_000689",
"date": "2026-04-04",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "07a48d382cd63afb"
},
{
"id": "txn_000690",
"date": "2026-04-04",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "329187e2840ef993"
},
{
"id": "txn_000691",
"date": "2026-04-04",
"amountCents": 16500,
"description": "VENMO T BAILEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "bd1bdf6c96c7207c"
},
{
"id": "txn_000692",
"date": "2026-04-05",
"amountCents": 8500,
"description": "ZELLE FROM N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d8bdb5709a49bfa3"
},
{
"id": "txn_000693",
"date": "2026-04-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "d838d27802bf3bc1"
},
{
"id": "txn_000694",
"date": "2026-04-06",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "2175016452f204b2"
},
{
"id": "txn_000695",
"date": "2026-04-06",
"amountCents": -8200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "9760231d7eedb11c"
},
{
"id": "txn_000696",
"date": "2026-04-08",
"amountCents": 16500,
"description": "CHECK 1084",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1384e84736e6ac97"
},
{
"id": "txn_000697",
"date": "2026-04-08",
"amountCents": 16500,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "858e1b3d6c4f7bc4"
},
{
"id": "txn_000698",
"date": "2026-04-08",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "2ca79af1c077ce64"
},
{
"id": "txn_000699",
"date": "2026-04-08",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "dcc63c41bda78c6c"
},
{
"id": "txn_000700",
"date": "2026-04-09",
"amountCents": 8500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c6f9430a2c953c01"
},
{
"id": "txn_000701",
"date": "2026-04-09",
"amountCents": 32000,
"description": "ZELLE FROM R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "7a0d1413d4893dbd"
},
{
"id": "txn_000702",
"date": "2026-04-09",
"amountCents": -11679,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f6303de406da2287"
},
{
"id": "txn_000703",
"date": "2026-04-10",
"amountCents": 8500,
"description": "VENMO M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d4b454b0077dbba0"
},
{
"id": "txn_000704",
"date": "2026-04-10",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a45c6aa1809b4b02"
},
{
"id": "txn_000705",
"date": "2026-04-10",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "923424e72d6c7d40"
},
{
"id": "txn_000706",
"date": "2026-04-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "dca773ac7fa9eaf5"
},
{
"id": "txn_000707",
"date": "2026-04-11",
"amountCents": 32000,
"description": "VENMO M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "df5f46b7d4a06ca2"
},
{
"id": "txn_000708",
"date": "2026-04-11",
"amountCents": 8500,
"description": "CHECK 1085",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "345934996ea7825e"
},
{
"id": "txn_000709",
"date": "2026-04-11",
"amountCents": 48000,
"description": "VENMO A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f451abcd2711d6a9"
},
{
"id": "txn_000710",
"date": "2026-04-11",
"amountCents": -6100,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bf370376ea37b491"
},
{
"id": "txn_000711",
"date": "2026-04-12",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d98d88bc09295436"
},
{
"id": "txn_000712",
"date": "2026-04-12",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "c4f5a4be8644cfc9"
},
{
"id": "txn_000713",
"date": "2026-04-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "bde1d95d2e033570"
},
{
"id": "txn_000714",
"date": "2026-04-13",
"amountCents": 48000,
"description": "CHECK 1086",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "cc56a66bb7ded459"
},
{
"id": "txn_000715",
"date": "2026-04-14",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "83e1e7805bec9091"
},
{
"id": "txn_000716",
"date": "2026-04-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "9062cc0850b8ad65"
},
{
"id": "txn_000717",
"date": "2026-04-15",
"amountCents": 8500,
"description": "ZELLE FROM C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "cc793a17996e75a1"
},
{
"id": "txn_000718",
"date": "2026-04-15",
"amountCents": -10749,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "2f4580fb1ce69520"
},
{
"id": "txn_000719",
"date": "2026-04-15",
"amountCents": -7500,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e49fe054ed64c198"
},
{
"id": "txn_000720",
"date": "2026-04-16",
"amountCents": 16500,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b3c2ff5fa445a0c1"
},
{
"id": "txn_000721",
"date": "2026-04-16",
"amountCents": 32000,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "33646c33ad12e226"
},
{
"id": "txn_000722",
"date": "2026-04-16",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "be9ad33858c05162"
},
{
"id": "txn_000723",
"date": "2026-04-17",
"amountCents": 8500,
"description": "VENMO K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "419e154f7585832d"
},
{
"id": "txn_000724",
"date": "2026-04-18",
"amountCents": 32000,
"description": "ZELLE FROM K BRANHAM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b077d3d0a8f9f6b7"
},
{
"id": "txn_000725",
"date": "2026-04-18",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d6816bee581ba705"
},
{
"id": "txn_000726",
"date": "2026-04-20",
"amountCents": 8500,
"description": "VENMO B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "cd54b73929348d1b"
},
{
"id": "txn_000727",
"date": "2026-04-20",
"amountCents": 16500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e61de5ab550a308d"
},
{
"id": "txn_000728",
"date": "2026-04-20",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d9b989231454e969"
},
{
"id": "txn_000729",
"date": "2026-04-20",
"amountCents": -7300,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f08905cf4ac25f6d"
},
{
"id": "txn_000730",
"date": "2026-04-21",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "ed7682868696b1e0"
},
{
"id": "txn_000731",
"date": "2026-04-21",
"amountCents": -15189,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "21c610ab6cd79910"
},
{
"id": "txn_000732",
"date": "2026-04-22",
"amountCents": 16500,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9e5004d3c60f0483"
},
{
"id": "txn_000733",
"date": "2026-04-22",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "1b9afbac053ae66b"
},
{
"id": "txn_000734",
"date": "2026-04-22",
"amountCents": 8500,
"description": "ZELLE FROM D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "38365ae805965ff6"
},
{
"id": "txn_000735",
"date": "2026-04-23",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7dea3e2449f27de0"
},
{
"id": "txn_000736",
"date": "2026-04-24",
"amountCents": 48000,
"description": "ZELLE FROM L MOORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "a8bd67c03db1955d"
},
{
"id": "txn_000737",
"date": "2026-04-24",
"amountCents": -8300,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "08d832c22d640995"
},
{
"id": "txn_000738",
"date": "2026-04-25",
"amountCents": 8500,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "42eae1d0c200cbcd"
},
{
"id": "txn_000739",
"date": "2026-04-28",
"amountCents": 32000,
"description": "VENMO A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "596880cd61b52cc3"
},
{
"id": "txn_000740",
"date": "2026-04-29",
"amountCents": 16500,
"description": "CHECK 1087",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "df55b05bd0861aea"
},
{
"id": "txn_000741",
"date": "2026-04-29",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "cd62a2d3eb9c391a"
},
{
"id": "txn_000742",
"date": "2026-04-29",
"amountCents": 8500,
"description": "CHECK 1088",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ab414c1a6bed18ef"
},
{
"id": "txn_000743",
"date": "2026-04-30",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0b958bd1264ab32c"
},
{
"id": "txn_000744",
"date": "2026-04-30",
"amountCents": 32000,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "0a335a518c39ccc5"
},
{
"id": "txn_000745",
"date": "2026-04-30",
"amountCents": 8500,
"description": "CHECK 1089",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "968c4f7c80cd42b1"
},
{
"id": "txn_000746",
"date": "2026-04-30",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "6685e861e293791c"
},
{
"id": "txn_000747",
"date": "2026-05-01",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "924f4780af35e2e1"
},
{
"id": "txn_000748",
"date": "2026-05-01",
"amountCents": 8500,
"description": "CHECK 1090",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "36b28b2342ad13d2"
},
{
"id": "txn_000749",
"date": "2026-05-01",
"amountCents": 8500,
"description": "VENMO K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b42e75503da2aabf"
},
{
"id": "txn_000750",
"date": "2026-05-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "9114d600fbd109de"
},
{
"id": "txn_000751",
"date": "2026-05-02",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "c33dd56b0c3a05d7"
},
{
"id": "txn_000752",
"date": "2026-05-02",
"amountCents": -7100,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "69f6d1d1359212a3"
},
{
"id": "txn_000753",
"date": "2026-05-03",
"amountCents": -19799,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "0d67091e72a4c3e9"
},
{
"id": "txn_000754",
"date": "2026-05-04",
"amountCents": 16500,
"description": "CHECK 1091",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9da9f7bde49c728a"
},
{
"id": "txn_000755",
"date": "2026-05-04",
"amountCents": 48000,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ca6d4133c6ac9bcb"
},
{
"id": "txn_000756",
"date": "2026-05-05",
"amountCents": 16500,
"description": "VENMO F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f6a871127a8439ca"
},
{
"id": "txn_000757",
"date": "2026-05-05",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "769d181373ade64c"
},
{
"id": "txn_000758",
"date": "2026-05-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "00a31632ef60e9ae"
},
{
"id": "txn_000759",
"date": "2026-05-06",
"amountCents": -5800,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e4734743ec411152"
},
{
"id": "txn_000760",
"date": "2026-05-07",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "00404a664e1121e9"
},
{
"id": "txn_000761",
"date": "2026-05-08",
"amountCents": 16500,
"description": "ZELLE FROM K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "7eabef4c880ff003"
},
{
"id": "txn_000762",
"date": "2026-05-09",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c89611cf02a55750"
},
{
"id": "txn_000763",
"date": "2026-05-09",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "08088f1b11be54bc"
},
{
"id": "txn_000764",
"date": "2026-05-09",
"amountCents": 16500,
"description": "ZELLE FROM M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "07b128829d9919ef"
},
{
"id": "txn_000765",
"date": "2026-05-09",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "5eb90d11ffea2499"
},
{
"id": "txn_000766",
"date": "2026-05-09",
"amountCents": -19199,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "aca67ffdb6f15892"
},
{
"id": "txn_000767",
"date": "2026-05-10",
"amountCents": 48000,
"description": "ZELLE FROM A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "19ddc1104ee1f872"
},
{
"id": "txn_000768",
"date": "2026-05-10",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "81cbb5d0f092ca68"
},
{
"id": "txn_000769",
"date": "2026-05-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "3ecea0bda98cf9f8"
},
{
"id": "txn_000770",
"date": "2026-05-11",
"amountCents": 32000,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "431e87b63591ab0d"
},
{
"id": "txn_000771",
"date": "2026-05-11",
"amountCents": 16500,
"description": "VENMO C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4d2c53c6fd38129c"
},
{
"id": "txn_000772",
"date": "2026-05-11",
"amountCents": 16500,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "a7d25fd2bf963298"
},
{
"id": "txn_000773",
"date": "2026-05-11",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "55c4076d2d62992c"
},
{
"id": "txn_000774",
"date": "2026-05-11",
"amountCents": -8000,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f6bc5aee15921ed1"
},
{
"id": "txn_000775",
"date": "2026-05-12",
"amountCents": 8500,
"description": "VENMO N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "afdeba2cc3de5d00"
},
{
"id": "txn_000776",
"date": "2026-05-12",
"amountCents": 8500,
"description": "CHECK 1092",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "41d846428920cc22"
},
{
"id": "txn_000777",
"date": "2026-05-12",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f5ba21cc193d574e"
},
{
"id": "txn_000778",
"date": "2026-05-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "ee15dff7f9823bcf"
},
{
"id": "txn_000779",
"date": "2026-05-13",
"amountCents": 16500,
"description": "VENMO D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "150e1a44c195abfb"
},
{
"id": "txn_000780",
"date": "2026-05-13",
"amountCents": 8500,
"description": "ZELLE FROM J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d897184ce67d1680"
},
{
"id": "txn_000781",
"date": "2026-05-13",
"amountCents": 8500,
"description": "CHECK 1093",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "3f070f864accc6f3"
},
{
"id": "txn_000782",
"date": "2026-05-14",
"amountCents": 32000,
"description": "VENMO S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "3b29f4044ab8a021"
},
{
"id": "txn_000783",
"date": "2026-05-14",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "b13e82dfc0e43f99"
},
{
"id": "txn_000784",
"date": "2026-05-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "aee9bf444d2abf34"
},
{
"id": "txn_000785",
"date": "2026-05-15",
"amountCents": 16500,
"description": "VENMO B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f0c1d25a9d4a6d41"
},
{
"id": "txn_000786",
"date": "2026-05-16",
"amountCents": 16500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "30dac3f9c4df5723"
},
{
"id": "txn_000787",
"date": "2026-05-16",
"amountCents": 16500,
"description": "CHECK 1094",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dbfbfe429704f321"
},
{
"id": "txn_000788",
"date": "2026-05-16",
"amountCents": 48000,
"description": "CHECK 1095",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "312898b122e83ab7"
},
{
"id": "txn_000789",
"date": "2026-05-16",
"amountCents": 48000,
"description": "ZELLE FROM T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ccbc11e82f7be481"
},
{
"id": "txn_000790",
"date": "2026-05-16",
"amountCents": -12695,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5a4db92f951a0b71"
},
{
"id": "txn_000791",
"date": "2026-05-16",
"amountCents": -8100,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "48e97058b5685308"
},
{
"id": "txn_000792",
"date": "2026-05-17",
"amountCents": 32000,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "eb836b3a74f726ef"
},
{
"id": "txn_000793",
"date": "2026-05-19",
"amountCents": 8500,
"description": "VENMO G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "05e47fe6de57e245"
},
{
"id": "txn_000794",
"date": "2026-05-19",
"amountCents": 32000,
"description": "CHECK 1096",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "22ebad1485c92b41"
},
{
"id": "txn_000795",
"date": "2026-05-19",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d431fe8f2e46dca3"
},
{
"id": "txn_000796",
"date": "2026-05-20",
"amountCents": 16500,
"description": "ZELLE FROM H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d987be9a4d8988a2"
},
{
"id": "txn_000797",
"date": "2026-05-20",
"amountCents": 32000,
"description": "ZELLE FROM R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "d4a91e6bbb1eb87d"
},
{
"id": "txn_000798",
"date": "2026-05-20",
"amountCents": -6500,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "2cf519630fbcb03e"
},
{
"id": "txn_000799",
"date": "2026-05-21",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f3cfecd7643e065a"
},
{
"id": "txn_000800",
"date": "2026-05-21",
"amountCents": 8500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "e6a7e2799ffa9215"
},
{
"id": "txn_000801",
"date": "2026-05-22",
"amountCents": 16500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "6fe5a1296550e1b6"
},
{
"id": "txn_000802",
"date": "2026-05-22",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "dfb776482e0432f0"
},
{
"id": "txn_000803",
"date": "2026-05-22",
"amountCents": -15249,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "3bb60f277d5ea754"
},
{
"id": "txn_000804",
"date": "2026-05-23",
"amountCents": 16500,
"description": "CHECK 1097",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "e1828485c2dcd189"
},
{
"id": "txn_000805",
"date": "2026-05-23",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "179f6571e0261e43"
},
{
"id": "txn_000806",
"date": "2026-05-25",
"amountCents": 16500,
"description": "ZELLE FROM S HURLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e81d7f468311ddbf"
},
{
"id": "txn_000807",
"date": "2026-05-25",
"amountCents": 16500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "20e86016f1ce55f2"
},
{
"id": "txn_000808",
"date": "2026-05-25",
"amountCents": -7200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e352449b26b2a775"
},
{
"id": "txn_000809",
"date": "2026-05-26",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "5ed9b5b235f2befe"
},
{
"id": "txn_000810",
"date": "2026-05-26",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "913a050258bd8bda"
},
{
"id": "txn_000811",
"date": "2026-05-27",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "35906d1f587bdc7d"
},
{
"id": "txn_000812",
"date": "2026-05-27",
"amountCents": 16500,
"description": "VENMO W DAVIDSON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "684f0c463fe967ed"
},
{
"id": "txn_000813",
"date": "2026-05-27",
"amountCents": 16500,
"description": "ZELLE FROM C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "4d5a9ef4e6c83476"
},
{
"id": "txn_000814",
"date": "2026-05-27",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "666931289e5a91b6"
},
{
"id": "txn_000815",
"date": "2026-05-28",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "ee5b02b7a677bc97"
},
{
"id": "txn_000816",
"date": "2026-05-28",
"amountCents": 8500,
"description": "CHECK 1098",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5bae39706cead62d"
},
{
"id": "txn_000817",
"date": "2026-05-29",
"amountCents": 8500,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a97dca58c9aa5e71"
},
{
"id": "txn_000818",
"date": "2026-05-29",
"amountCents": 48000,
"description": "VENMO S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6670db9f5c666ff6"
},
{
"id": "txn_000819",
"date": "2026-05-30",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "f2836753a5da9138"
},
{
"id": "txn_000820",
"date": "2026-05-31",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "fbd341adeb50e289"
},
{
"id": "txn_000821",
"date": "2026-05-31",
"amountCents": 8500,
"description": "CHECK 1099",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "ac275e0ba77f5d0b"
},
{
"id": "txn_000822",
"date": "2026-06-01",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "3beb74528a366f25"
},
{
"id": "txn_000823",
"date": "2026-06-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "8b6fa914a62448d3"
},
{
"id": "txn_000824",
"date": "2026-06-02",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "939bbd39f4c12de6"
},
{
"id": "txn_000825",
"date": "2026-06-02",
"amountCents": -7000,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "9dcc94f6832d4375"
},
{
"id": "txn_000826",
"date": "2026-06-03",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0f03f36ff3c32a84"
},
{
"id": "txn_000827",
"date": "2026-06-03",
"amountCents": 8500,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "ca8d3a5403ee52bd"
},
{
"id": "txn_000828",
"date": "2026-06-03",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "a3bbe844ebab9442"
},
{
"id": "txn_000829",
"date": "2026-06-03",
"amountCents": -18879,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "8b5e480821010e64"
},
{
"id": "txn_000830",
"date": "2026-06-04",
"amountCents": 8500,
"description": "VENMO N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1d3adf5d8c34fc5b"
},
{
"id": "txn_000831",
"date": "2026-06-04",
"amountCents": 8500,
"description": "ZELLE FROM J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e4dffd93af162686"
},
{
"id": "txn_000832",
"date": "2026-06-05",
"amountCents": 8500,
"description": "CHECK 1100",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "800ae0afe617632f"
},
{
"id": "txn_000833",
"date": "2026-06-05",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "ed8258dc7c57d3d9"
},
{
"id": "txn_000834",
"date": "2026-06-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "a17133eb7a1d13a3"
},
{
"id": "txn_000835",
"date": "2026-06-05",
"amountCents": -7800,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f282c661474c1990"
},
{
"id": "txn_000836",
"date": "2026-06-06",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f129ad1290451e1f"
},
{
"id": "txn_000837",
"date": "2026-06-06",
"amountCents": 8500,
"description": "VENMO R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f9856b43e2456f52"
},
{
"id": "txn_000838",
"date": "2026-06-06",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "0b0ae8f88b63cd83"
},
{
"id": "txn_000839",
"date": "2026-06-08",
"amountCents": 8500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "edc34273bbe9903c"
},
{
"id": "txn_000840",
"date": "2026-06-08",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8d247321e74cc140"
},
{
"id": "txn_000841",
"date": "2026-06-08",
"amountCents": -11695,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "41e63aadc2f71a59"
},
{
"id": "txn_000842",
"date": "2026-06-09",
"amountCents": 8500,
"description": "CHECK 1101",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "da6e5456aba65dcb"
},
{
"id": "txn_000843",
"date": "2026-06-09",
"amountCents": 16500,
"description": "ZELLE FROM B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "34b4f6f63c6bdb16"
},
{
"id": "txn_000844",
"date": "2026-06-09",
"amountCents": -7400,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "3c6c07171d650fcf"
},
{
"id": "txn_000845",
"date": "2026-06-10",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "aac2e562d42472ae"
},
{
"id": "txn_000846",
"date": "2026-06-10",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "90c2f63d7ecc04b0"
},
{
"id": "txn_000847",
"date": "2026-06-10",
"amountCents": 16500,
"description": "VENMO A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "0c27e9d6861486df"
},
{
"id": "txn_000848",
"date": "2026-06-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "421592a268c619e3"
},
{
"id": "txn_000849",
"date": "2026-06-11",
"amountCents": 8500,
"description": "CHECK 1102",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "32fc3fdf850c36e4"
},
{
"id": "txn_000850",
"date": "2026-06-11",
"amountCents": 16500,
"description": "VENMO L MOORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1239efc6524f59ea"
},
{
"id": "txn_000851",
"date": "2026-06-11",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "08713b10af619c99"
},
{
"id": "txn_000852",
"date": "2026-06-12",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e2c7e5146730c23f"
},
{
"id": "txn_000853",
"date": "2026-06-12",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "37b9592257b5aaf0"
},
{
"id": "txn_000854",
"date": "2026-06-12",
"amountCents": 32000,
"description": "ZELLE FROM M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "04dd6c4f5f7fd8a1"
},
{
"id": "txn_000855",
"date": "2026-06-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "f489ec95b6d7fa22"
},
{
"id": "txn_000856",
"date": "2026-06-13",
"amountCents": 32000,
"description": "VENMO S HURLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "35e877941a3e540b"
},
{
"id": "txn_000857",
"date": "2026-06-13",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "86bce942ec56226f"
},
{
"id": "txn_000858",
"date": "2026-06-13",
"amountCents": -17299,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f5e1be8c823e10e1"
},
{
"id": "txn_000859",
"date": "2026-06-13",
"amountCents": -7100,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "d745ba9475d345da"
},
{
"id": "txn_000860",
"date": "2026-06-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "c9a2435c27162f33"
},
{
"id": "txn_000861",
"date": "2026-06-15",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "f2604821a849b456"
},
{
"id": "txn_000862",
"date": "2026-06-16",
"amountCents": 8500,
"description": "ZELLE FROM M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e801952ceb317c9e"
},
{
"id": "txn_000863",
"date": "2026-06-16",
"amountCents": 32000,
"description": "VENMO A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "84f64affce64509d"
},
{
"id": "txn_000864",
"date": "2026-06-16",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "de5264142be706a1"
},
{
"id": "txn_000865",
"date": "2026-06-17",
"amountCents": 16500,
"description": "ZELLE FROM T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8ad95c41909cabb9"
},
{
"id": "txn_000866",
"date": "2026-06-17",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "d3cb81d173322075"
},
{
"id": "txn_000867",
"date": "2026-06-17",
"amountCents": -6000,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "6819b76f2a73639c"
},
{
"id": "txn_000868",
"date": "2026-06-18",
"amountCents": 16500,
"description": "CHECK 1103",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bbff2aa564073c58"
},
{
"id": "txn_000869",
"date": "2026-06-18",
"amountCents": 16500,
"description": "VENMO V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "27f71f336dbdcbc3"
},
{
"id": "txn_000870",
"date": "2026-06-18",
"amountCents": 8500,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "b392511d5c1e5090"
},
{
"id": "txn_000871",
"date": "2026-06-18",
"amountCents": -18989,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "8e2da42a117f1884"
},
{
"id": "txn_000872",
"date": "2026-06-19",
"amountCents": 8500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "0095782276864b8b"
},
{
"id": "txn_000873",
"date": "2026-06-20",
"amountCents": 8500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4efedc833469bfa1"
},
{
"id": "txn_000874",
"date": "2026-06-20",
"amountCents": 8500,
"description": "CHECK 1104",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "8fc1c743169809e0"
},
{
"id": "txn_000875",
"date": "2026-06-21",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "1e2a79febd50e3c5"
},
{
"id": "txn_000876",
"date": "2026-06-21",
"amountCents": -8100,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "4db6a4d041c42b9c"
},
{
"id": "txn_000877",
"date": "2026-06-22",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "14393e54d4cb950a"
},
{
"id": "txn_000878",
"date": "2026-06-22",
"amountCents": 48000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ea960fd9a0f054f9"
},
{
"id": "txn_000879",
"date": "2026-06-22",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "d8863f072c5419e0"
},
{
"id": "txn_000880",
"date": "2026-06-23",
"amountCents": 32000,
"description": "CHECK 1105",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "501b3d9861e81ba7"
},
{
"id": "txn_000881",
"date": "2026-06-23",
"amountCents": 16500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "6dfd9d7dd56a9433"
},
{
"id": "txn_000882",
"date": "2026-06-23",
"amountCents": -15149,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "9d022e5f94028e82"
},
{
"id": "txn_000883",
"date": "2026-06-24",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "87c2a91bcc2150e1"
},
{
"id": "txn_000884",
"date": "2026-06-24",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ddaa9f439d2934d6"
},
{
"id": "txn_000885",
"date": "2026-06-25",
"amountCents": 16500,
"description": "VENMO H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "92cf1c23b80413c9"
},
{
"id": "txn_000886",
"date": "2026-06-25",
"amountCents": 16500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f8c0d8f2652148dd"
},
{
"id": "txn_000887",
"date": "2026-06-25",
"amountCents": 16500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6dfa68404204d0e8"
},
{
"id": "txn_000888",
"date": "2026-06-25",
"amountCents": -7600,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "66a6ebe277cba228"
},
{
"id": "txn_000889",
"date": "2026-06-27",
"amountCents": 48000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "abd493096f68a2bc"
},
{
"id": "txn_000890",
"date": "2026-06-28",
"amountCents": 8500,
"description": "ZELLE FROM N CORNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "05dcc26e2c037b6b"
},
{
"id": "txn_000891",
"date": "2026-06-29",
"amountCents": 16500,
"description": "CHECK 1106",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ae443bb57f620c44"
},
{
"id": "txn_000892",
"date": "2026-06-29",
"amountCents": 32000,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "39d5f6e7283c0131"
},
{
"id": "txn_000893",
"date": "2026-06-29",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "65ead638271cdbe2"
},
{
"id": "txn_000894",
"date": "2026-06-29",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "fe0018bee1b82e8d"
},
{
"id": "txn_000895",
"date": "2026-06-30",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "fa47daa3fbaf3377"
},
{
"id": "txn_000896",
"date": "2026-06-30",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "822e1c2661fc8b9d"
},
{
"id": "txn_000897",
"date": "2026-06-30",
"amountCents": 32000,
"description": "VENMO E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "66dfd9907e1f8ea4"
},
{
"id": "txn_000898",
"date": "2026-07-01",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "afa2a39ddfb357f0"
},
{
"id": "txn_000899",
"date": "2026-07-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "2d375f2a2cf7a568"
},
{
"id": "txn_000900",
"date": "2026-07-02",
"amountCents": 16500,
"description": "CHECK 1107",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "1307fe1efcea0446"
},
{
"id": "txn_000901",
"date": "2026-07-02",
"amountCents": -6600,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "0d59ca5b0a404b03"
},
{
"id": "txn_000902",
"date": "2026-07-03",
"amountCents": -14089,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "1d8c6e46b5a9bee3"
},
{
"id": "txn_000903",
"date": "2026-07-04",
"amountCents": 8500,
"description": "VENMO G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9e819290014a354d"
},
{
"id": "txn_000904",
"date": "2026-07-04",
"amountCents": 48000,
"description": "VENMO S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d7651f8bab6d59f1"
},
{
"id": "txn_000905",
"date": "2026-07-04",
"amountCents": 16500,
"description": "ZELLE FROM N SIZEMORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "38caadbc5c6ac876"
},
{
"id": "txn_000906",
"date": "2026-07-04",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "8e791ff4159c3668"
},
{
"id": "txn_000907",
"date": "2026-07-05",
"amountCents": 48000,
"description": "ZELLE FROM K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "3237c80680e7ea0b"
},
{
"id": "txn_000908",
"date": "2026-07-05",
"amountCents": 8500,
"description": "CHECK 1108",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "1db3a0b705b391dc"
},
{
"id": "txn_000909",
"date": "2026-07-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "773b5d913d5872b0"
},
{
"id": "txn_000910",
"date": "2026-07-06",
"amountCents": 32000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6b2d5ad3431ef334"
},
{
"id": "txn_000911",
"date": "2026-07-06",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "9cc397c3095b9de1"
},
{
"id": "txn_000912",
"date": "2026-07-06",
"amountCents": -7900,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f9f4c9d194a58a94"
},
{
"id": "txn_000913",
"date": "2026-07-07",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "7bb5ca7a9b6fc564"
},
{
"id": "txn_000914",
"date": "2026-07-08",
"amountCents": 16500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8ec514f314af6433"
},
{
"id": "txn_000915",
"date": "2026-07-08",
"amountCents": 16500,
"description": "ZELLE FROM D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2a465f56362f5b0e"
},
{
"id": "txn_000916",
"date": "2026-07-08",
"amountCents": 8500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "eb944ce7b7d92702"
},
{
"id": "txn_000917",
"date": "2026-07-08",
"amountCents": 48000,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "dd9ea0ba6545701f"
},
{
"id": "txn_000918",
"date": "2026-07-08",
"amountCents": -19989,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "7aaef598f8bf1bd1"
},
{
"id": "txn_000919",
"date": "2026-07-09",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "ed64ee3d8ac6ee14"
},
{
"id": "txn_000920",
"date": "2026-07-09",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "09580d2f54c9b486"
},
{
"id": "txn_000921",
"date": "2026-07-10",
"amountCents": 8500,
"description": "ZELLE FROM H ISAACS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "234e78845b26ecbe"
},
{
"id": "txn_000922",
"date": "2026-07-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "a3d3c5655444fb06"
},
{
"id": "txn_000923",
"date": "2026-07-10",
"amountCents": -8400,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e99327cab7f277f2"
},
{
"id": "txn_000924",
"date": "2026-07-12",
"amountCents": 32000,
"description": "ZELLE FROM K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a421092454d10433"
},
{
"id": "txn_000925",
"date": "2026-07-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "da06f42d7d121349"
},
{
"id": "txn_000926",
"date": "2026-07-13",
"amountCents": -11995,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "8be2c7dc1abc590a"
},
{
"id": "txn_000927",
"date": "2026-07-14",
"amountCents": 16500,
"description": "VENMO M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ab93ed4a013acfbb"
},
{
"id": "txn_000928",
"date": "2026-07-14",
"amountCents": 8500,
"description": "ZELLE FROM S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7253414b75ddca50"
},
{
"id": "txn_000929",
"date": "2026-07-14",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "e13842831c9b8f12"
},
{
"id": "txn_000930",
"date": "2026-07-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "81ebdd04d06c08b2"
},
{
"id": "txn_000931",
"date": "2026-07-14",
"amountCents": -6600,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "8d844595ca103dc2"
},
{
"id": "txn_000932",
"date": "2026-07-15",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "062b59187c6cde37"
},
{
"id": "txn_000933",
"date": "2026-07-16",
"amountCents": 8500,
"description": "CHECK 1109",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9b7e23ac338f49e8"
},
{
"id": "txn_000934",
"date": "2026-07-16",
"amountCents": 16500,
"description": "ZELLE FROM V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "accdebe1bc0e15d3"
},
{
"id": "txn_000935",
"date": "2026-07-16",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "48e392be8d9719f5"
},
{
"id": "txn_000936",
"date": "2026-07-17",
"amountCents": 16500,
"description": "ZELLE FROM D KING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ca50fbf2e885b983"
},
{
"id": "txn_000937",
"date": "2026-07-17",
"amountCents": 8500,
"description": "ZELLE FROM J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "8399d6272b8e10f9"
},
{
"id": "txn_000938",
"date": "2026-07-18",
"amountCents": 8500,
"description": "ZELLE FROM P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "2e7e7879fde992b3"
},
{
"id": "txn_000939",
"date": "2026-07-18",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "b55a438040de490c"
},
{
"id": "txn_000940",
"date": "2026-07-18",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "35e4a43415da8af5"
},
{
"id": "txn_000941",
"date": "2026-07-18",
"amountCents": -12189,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "0deb8442d8e52890"
},
{
"id": "txn_000942",
"date": "2026-07-18",
"amountCents": -8400,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "74f087b5732eb3ba"
},
{
"id": "txn_000943",
"date": "2026-07-20",
"amountCents": 32000,
"description": "ZELLE FROM L NAPIER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f8d149c46a918522"
},
{
"id": "txn_000944",
"date": "2026-07-20",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f58bd10dad5df555"
},
{
"id": "txn_000945",
"date": "2026-07-21",
"amountCents": 8500,
"description": "ZELLE FROM R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "560c39b5bd4fcd59"
},
{
"id": "txn_000946",
"date": "2026-07-22",
"amountCents": 8500,
"description": "ZELLE FROM T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8dae562a88b04449"
},
{
"id": "txn_000947",
"date": "2026-07-22",
"amountCents": 8500,
"description": "CHECK 1110",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "62661251a3307e65"
},
{
"id": "txn_000948",
"date": "2026-07-22",
"amountCents": 8500,
"description": "ZELLE FROM D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "c9122919fedf4411"
},
{
"id": "txn_000949",
"date": "2026-07-22",
"amountCents": 32000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "afeec6bd5cbf260f"
},
{
"id": "txn_000950",
"date": "2026-07-22",
"amountCents": -6900,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "05581b313a3daf80"
},
{
"id": "txn_000951",
"date": "2026-07-23",
"amountCents": 16500,
"description": "VENMO L MOORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "880ede8ee8dea412"
},
{
"id": "txn_000952",
"date": "2026-07-23",
"amountCents": -9199,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "ea89b79653fc9c8e"
},
{
"id": "txn_000953",
"date": "2026-07-24",
"amountCents": 16500,
"description": "VENMO J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "8cff60f455dfe752"
},
{
"id": "txn_000954",
"date": "2026-07-25",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "73f20d7171bc5e50"
},
{
"id": "txn_000955",
"date": "2026-07-25",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "a1e37a1d793c2b4f"
},
{
"id": "txn_000956",
"date": "2026-07-26",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "6635d4af6b5ec5ac"
},
{
"id": "txn_000957",
"date": "2026-07-26",
"amountCents": -6900,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "0cb5a511e7b8a22b"
},
{
"id": "txn_000958",
"date": "2026-07-27",
"amountCents": 48000,
"description": "VENMO J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "72757f94b0674bbf"
},
{
"id": "txn_000959",
"date": "2026-07-27",
"amountCents": 8500,
"description": "ZELLE FROM B COLLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2d9630bc0b635dd4"
},
{
"id": "txn_000960",
"date": "2026-07-27",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b6c3c8dc8aa58a23"
},
{
"id": "txn_000961",
"date": "2026-07-27",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "cf725b8234d3a82d"
},
{
"id": "txn_000962",
"date": "2026-07-28",
"amountCents": 32000,
"description": "VENMO B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "fc0c9d00e9bd1638"
},
{
"id": "txn_000963",
"date": "2026-07-29",
"amountCents": 32000,
"description": "ZELLE FROM L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ba73fa64211463f2"
},
{
"id": "txn_000964",
"date": "2026-07-29",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "b4f342fb4942edbf"
},
{
"id": "txn_000965",
"date": "2026-07-30",
"amountCents": 32000,
"description": "VENMO C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a87b26156a317372"
},
{
"id": "txn_000966",
"date": "2026-07-30",
"amountCents": 16500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e6fc5a9c0b381466"
},
{
"id": "txn_000967",
"date": "2026-07-31",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a499983c4c60b768"
},
{
"id": "txn_000968",
"date": "2026-07-31",
"amountCents": 16500,
"description": "CHECK 1111",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "889c2b7018d6c258"
},
{
"id": "txn_000969",
"date": "2026-07-31",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "4ffaeeb496b393b7"
},
{
"id": "txn_000970",
"date": "2026-07-31",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1dfee05dad8f14f8"
},
{
"id": "txn_000971",
"date": "2026-08-01",
"amountCents": 16500,
"description": "ZELLE FROM K YOUNG",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c548059f59ba0b01"
},
{
"id": "txn_000972",
"date": "2026-08-01",
"amountCents": 16500,
"description": "VENMO C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "00d1ab801e2b4994"
},
{
"id": "txn_000973",
"date": "2026-08-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "2f4f7d9e61a8d35d"
},
{
"id": "txn_000974",
"date": "2026-08-02",
"amountCents": 16500,
"description": "ZELLE FROM V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1cc83a7554932dfd"
},
{
"id": "txn_000975",
"date": "2026-08-02",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "4941787ce1fce1c8"
},
{
"id": "txn_000976",
"date": "2026-08-02",
"amountCents": -6200,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "4c393eeed8f55fa7"
},
{
"id": "txn_000977",
"date": "2026-08-03",
"amountCents": 8500,
"description": "VENMO D KING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b135227745a9c3a1"
},
{
"id": "txn_000978",
"date": "2026-08-03",
"amountCents": 32000,
"description": "ZELLE FROM T BAILEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f04655321997ea89"
},
{
"id": "txn_000979",
"date": "2026-08-03",
"amountCents": -15295,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "d7f229fbf9e99692"
},
{
"id": "txn_000980",
"date": "2026-08-04",
"amountCents": 32000,
"description": "ZELLE FROM H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d6e9dcb1370c5c24"
},
{
"id": "txn_000981",
"date": "2026-08-05",
"amountCents": 16500,
"description": "ZELLE FROM R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e4bb921dbec58a4e"
},
{
"id": "txn_000982",
"date": "2026-08-05",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "f178e33f3c9f29c5"
},
{
"id": "txn_000983",
"date": "2026-08-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "0d391a0803dba575"
},
{
"id": "txn_000984",
"date": "2026-08-06",
"amountCents": 8500,
"description": "VENMO J ADKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "980c74451a1fe8e9"
},
{
"id": "txn_000985",
"date": "2026-08-06",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "9bd5ab8087ec0f85"
},
{
"id": "txn_000986",
"date": "2026-08-06",
"amountCents": -7300,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "39567d879fbd7f40"
},
{
"id": "txn_000987",
"date": "2026-08-07",
"amountCents": 16500,
"description": "ZELLE FROM P SLONE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a8f18221a53d9df7"
},
{
"id": "txn_000988",
"date": "2026-08-07",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "316c3d4e59404e75"
},
{
"id": "txn_000989",
"date": "2026-08-07",
"amountCents": 8500,
"description": "ZELLE FROM C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "736d5cfcd522e5cc"
},
{
"id": "txn_000990",
"date": "2026-08-07",
"amountCents": 32000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "1808e5de0c29c531"
},
{
"id": "txn_000991",
"date": "2026-08-08",
"amountCents": 8500,
"description": "VENMO V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9be6603e1e1ba065"
},
{
"id": "txn_000992",
"date": "2026-08-09",
"amountCents": -11999,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "1d47367c6320d551"
},
{
"id": "txn_000993",
"date": "2026-08-10",
"amountCents": 32000,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1964f2781d16e0be"
},
{
"id": "txn_000994",
"date": "2026-08-10",
"amountCents": 16500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "56cb0ae72899961e"
},
{
"id": "txn_000995",
"date": "2026-08-10",
"amountCents": 8500,
"description": "CHECK 1112",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "65ce80831d0d4a3b"
},
{
"id": "txn_000996",
"date": "2026-08-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "671ce13d6e0adc01"
},
{
"id": "txn_000997",
"date": "2026-08-11",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "0ef7cc2f9a366d8b"
},
{
"id": "txn_000998",
"date": "2026-08-11",
"amountCents": -6700,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "eb4d438e39ff2ec9"
},
{
"id": "txn_000999",
"date": "2026-08-12",
"amountCents": 16500,
"description": "ZELLE FROM L MOORE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "43103a896a4b360c"
},
{
"id": "txn_001000",
"date": "2026-08-12",
"amountCents": 8500,
"description": "ZELLE FROM F HOWARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "29c9c67e709b75b4"
},
{
"id": "txn_001001",
"date": "2026-08-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "e4a7b927fba2617c"
},
{
"id": "txn_001002",
"date": "2026-08-14",
"amountCents": 16500,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "051225ab16851966"
},
{
"id": "txn_001003",
"date": "2026-08-14",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "de03529408a5aa92"
},
{
"id": "txn_001004",
"date": "2026-08-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "e01e93ed37f37991"
},
{
"id": "txn_001005",
"date": "2026-08-15",
"amountCents": 8500,
"description": "VENMO J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "595362950bf28f62"
},
{
"id": "txn_001006",
"date": "2026-08-15",
"amountCents": 16500,
"description": "ZELLE FROM M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "c6e2dd0e76e365b3"
},
{
"id": "txn_001007",
"date": "2026-08-16",
"amountCents": -8499,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "06a5e9cdadf632b3"
},
{
"id": "txn_001008",
"date": "2026-08-16",
"amountCents": -7300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "c280db2b5f45e027"
},
{
"id": "txn_001009",
"date": "2026-08-17",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b5c52e904e839b68"
},
{
"id": "txn_001010",
"date": "2026-08-20",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "d0a7a66f492ed3c7"
},
{
"id": "txn_001011",
"date": "2026-08-20",
"amountCents": -5800,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "f01a5980df335bf5"
},
{
"id": "txn_001012",
"date": "2026-08-21",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "a3cbf7f405240fa6"
},
{
"id": "txn_001013",
"date": "2026-08-22",
"amountCents": 16500,
"description": "VENMO G RATLIFF",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e0c266ce82a3f647"
},
{
"id": "txn_001014",
"date": "2026-08-22",
"amountCents": -13349,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "0a6c8763e6b34d3f"
},
{
"id": "txn_001015",
"date": "2026-08-24",
"amountCents": 8500,
"description": "CHECK 1113",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "b8943e1b04c0f3de"
},
{
"id": "txn_001016",
"date": "2026-08-25",
"amountCents": 8500,
"description": "ZELLE FROM R GABBARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "961c57bfef0d397a"
},
{
"id": "txn_001017",
"date": "2026-08-25",
"amountCents": 16500,
"description": "CHECK 1114",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "9b3f8c5a33d0c08a"
},
{
"id": "txn_001018",
"date": "2026-08-25",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "a77610326bafdb73"
},
{
"id": "txn_001019",
"date": "2026-08-25",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "9ed93cee09d0e648"
},
{
"id": "txn_001020",
"date": "2026-08-25",
"amountCents": -6200,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "a625be5945dffba4"
},
{
"id": "txn_001021",
"date": "2026-08-26",
"amountCents": 32000,
"description": "CHECK 1115",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9e483622f2672846"
},
{
"id": "txn_001022",
"date": "2026-08-26",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "ed34e92b586a77ec"
},
{
"id": "txn_001023",
"date": "2026-08-27",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "5a46054e8e79b540"
},
{
"id": "txn_001024",
"date": "2026-08-28",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "a4b12069c5019a98"
},
{
"id": "txn_001025",
"date": "2026-08-29",
"amountCents": 32000,
"description": "ZELLE FROM S HURLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "71d1bf4f289a03a3"
},
{
"id": "txn_001026",
"date": "2026-08-29",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "0cb343e151d3a191"
},
{
"id": "txn_001027",
"date": "2026-08-31",
"amountCents": 8500,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "88373d66e94e7a53"
},
{
"id": "txn_001028",
"date": "2026-08-31",
"amountCents": 8500,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b40853d8046410c1"
},
{
"id": "txn_001029",
"date": "2026-08-31",
"amountCents": 16500,
"description": "VENMO A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "30e2fbc59bd4557d"
},
{
"id": "txn_001030",
"date": "2026-08-31",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "75bb35d67fec48bc"
},
{
"id": "txn_001031",
"date": "2026-09-01",
"amountCents": 16500,
"description": "ZELLE FROM M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "f64e3dcabaea4792"
},
{
"id": "txn_001032",
"date": "2026-09-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "aef476a090e7a78a"
},
{
"id": "txn_001033",
"date": "2026-09-02",
"amountCents": -6100,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "2b91d91df0f6f4c2"
},
{
"id": "txn_001034",
"date": "2026-09-03",
"amountCents": 16500,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "80ee0a395023325b"
},
{
"id": "txn_001035",
"date": "2026-09-03",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "7b064f3490a43ae2"
},
{
"id": "txn_001036",
"date": "2026-09-03",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "51e355babd4dc7fc"
},
{
"id": "txn_001037",
"date": "2026-09-03",
"amountCents": -15089,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "987ef5d9a661f52f"
},
{
"id": "txn_001038",
"date": "2026-09-04",
"amountCents": 8500,
"description": "CHECK 1116",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "da3831a562c4f813"
},
{
"id": "txn_001039",
"date": "2026-09-04",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "dd5f482298a70c76"
},
{
"id": "txn_001040",
"date": "2026-09-05",
"amountCents": 8500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "2a0b18e3b7a92a75"
},
{
"id": "txn_001041",
"date": "2026-09-05",
"amountCents": 48000,
"description": "ZELLE FROM D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "b84dd73469512595"
},
{
"id": "txn_001042",
"date": "2026-09-05",
"amountCents": 8500,
"description": "VENMO M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "a0e8d5e8f25058c7"
},
{
"id": "txn_001043",
"date": "2026-09-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "720e8b4e1ec13b22"
},
{
"id": "txn_001044",
"date": "2026-09-06",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "8299aa70d569175d"
},
{
"id": "txn_001045",
"date": "2026-09-06",
"amountCents": -7300,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "bdaf5f7252d17bc5"
},
{
"id": "txn_001046",
"date": "2026-09-07",
"amountCents": 8500,
"description": "ZELLE FROM J CARTER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "56350100ca3c2acb"
},
{
"id": "txn_001047",
"date": "2026-09-08",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7432f693b139ec15"
},
{
"id": "txn_001048",
"date": "2026-09-08",
"amountCents": -17695,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f4d618c3e0d9714f"
},
{
"id": "txn_001049",
"date": "2026-09-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "2556b5e817777394"
},
{
"id": "txn_001050",
"date": "2026-09-11",
"amountCents": 8500,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "5e97b713af3448bd"
},
{
"id": "txn_001051",
"date": "2026-09-11",
"amountCents": 8500,
"description": "ZELLE FROM E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "2f61ac79682fd0f1"
},
{
"id": "txn_001052",
"date": "2026-09-11",
"amountCents": 8500,
"description": "VENMO L HENSLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d06a74b0699ca79a"
},
{
"id": "txn_001053",
"date": "2026-09-11",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "a93a8f57017f5720"
},
{
"id": "txn_001054",
"date": "2026-09-11",
"amountCents": -7300,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "e392eed4caf12d7f"
},
{
"id": "txn_001055",
"date": "2026-09-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "c6ceb66478acdf8b"
},
{
"id": "txn_001056",
"date": "2026-09-13",
"amountCents": -11179,
"description": "AUTOGEEK",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "f8a4bcf910a47ddb"
},
{
"id": "txn_001057",
"date": "2026-09-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "5213ad49a6762120"
},
{
"id": "txn_001058",
"date": "2026-09-15",
"amountCents": 16500,
"description": "VENMO P COMBS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1cf4b8d14d586ba3"
},
{
"id": "txn_001059",
"date": "2026-09-15",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "10312002ff94f4cd"
},
{
"id": "txn_001060",
"date": "2026-09-15",
"amountCents": -8400,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "c27a91bcd5472795"
},
{
"id": "txn_001061",
"date": "2026-09-16",
"amountCents": 32000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e08b119e61908818"
},
{
"id": "txn_001062",
"date": "2026-09-17",
"amountCents": 48000,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "4663c80e14bd979d"
},
{
"id": "txn_001063",
"date": "2026-09-17",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "f0a3ce5acb310786"
},
{
"id": "txn_001064",
"date": "2026-09-18",
"amountCents": -9999,
"description": "CHEMICAL GUYS",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "ae9e46e7049ab816"
},
{
"id": "txn_001065",
"date": "2026-09-19",
"amountCents": 16500,
"description": "ZELLE FROM H ARNETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0a94fb75cc1489b2"
},
{
"id": "txn_001066",
"date": "2026-09-19",
"amountCents": 16500,
"description": "ZELLE FROM J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "5f586bfa39305c8b"
},
{
"id": "txn_001067",
"date": "2026-09-19",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "3908eed87e644d47"
},
{
"id": "txn_001068",
"date": "2026-09-20",
"amountCents": 8500,
"description": "VENMO L NAPIER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "eb9e1c0a85a06539"
},
{
"id": "txn_001069",
"date": "2026-09-20",
"amountCents": -7400,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "64c90c5969829ec1"
},
{
"id": "txn_001070",
"date": "2026-09-22",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "9485d09ef456e4d7"
},
{
"id": "txn_001071",
"date": "2026-09-22",
"amountCents": 48000,
"description": "VENMO T WALKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "9ed18c9dd616f88d"
},
{
"id": "txn_001072",
"date": "2026-09-22",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "109adb68266f7397"
},
{
"id": "txn_001073",
"date": "2026-09-23",
"amountCents": 48000,
"description": "VENMO K ROBERTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "54b8a25cefe12df6"
},
{
"id": "txn_001074",
"date": "2026-09-23",
"amountCents": 16500,
"description": "ZELLE FROM G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "d71ec21d2628a0ee"
},
{
"id": "txn_001075",
"date": "2026-09-23",
"amountCents": -14099,
"description": "O'REILLY AUTO PARTS #4471",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "c0404a990c3b5f27"
},
{
"id": "txn_001076",
"date": "2026-09-24",
"amountCents": 8500,
"description": "CHECK 1117",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "49631eb8a6f6022d"
},
{
"id": "txn_001077",
"date": "2026-09-24",
"amountCents": 16500,
"description": "CHECK 1118",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "71ff2ce3b2bc6a10"
},
{
"id": "txn_001078",
"date": "2026-09-24",
"amountCents": -7800,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "348c5e386a6efeac"
},
{
"id": "txn_001079",
"date": "2026-09-25",
"amountCents": 8500,
"description": "VENMO S MORALES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b9e672eb797cbcef"
},
{
"id": "txn_001080",
"date": "2026-09-25",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "27684610e3f38f62"
},
{
"id": "txn_001081",
"date": "2026-09-26",
"amountCents": 8500,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "35dd2d7bab4dd9ff"
},
{
"id": "txn_001082",
"date": "2026-09-26",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6305c6e62fb84e6d"
},
{
"id": "txn_001083",
"date": "2026-09-27",
"amountCents": 48000,
"description": "CHECK 1119",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "22c068bbb42c5277"
},
{
"id": "txn_001084",
"date": "2026-09-28",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1447423750e6759f"
},
{
"id": "txn_001085",
"date": "2026-09-28",
"amountCents": 8500,
"description": "ZELLE FROM C LYKINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a182cdaa9bc3e8c2"
},
{
"id": "txn_001086",
"date": "2026-09-29",
"amountCents": 32000,
"description": "VENMO T BAILEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "310f75f9e437896f"
},
{
"id": "txn_001087",
"date": "2026-09-29",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "716eab230c062b70"
},
{
"id": "txn_001088",
"date": "2026-09-30",
"amountCents": 32000,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "60f55d094975280c"
},
{
"id": "txn_001089",
"date": "2026-09-30",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "3a80fc4345e4c307"
},
{
"id": "txn_001090",
"date": "2026-10-01",
"amountCents": 8500,
"description": "VENMO E MULLINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "9f928f1decaefd68"
},
{
"id": "txn_001091",
"date": "2026-10-01",
"amountCents": 16500,
"description": "VENMO D KING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "02623841a1a59b79"
},
{
"id": "txn_001092",
"date": "2026-10-01",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "adeb6ddc82b08bc4"
},
{
"id": "txn_001093",
"date": "2026-10-01",
"amountCents": 8500,
"description": "VENMO T GOINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "345b8a92a7565527"
},
{
"id": "txn_001094",
"date": "2026-10-01",
"amountCents": -3900,
"description": "SQUARE APPOINTMENTS PLAN",
"category": "expense",
"scheduleCLine": "18",
"locationId": null,
"source": "fixture",
"hash": "886ebbbac75e6b90"
},
{
"id": "txn_001095",
"date": "2026-10-02",
"amountCents": -5800,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "05d591c3f7c17dac"
},
{
"id": "txn_001096",
"date": "2026-10-03",
"amountCents": 16500,
"description": "VENMO S HURLEY",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "846b0a371e690a14"
},
{
"id": "txn_001097",
"date": "2026-10-03",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "bb24ad6170bd7c52"
},
{
"id": "txn_001098",
"date": "2026-10-03",
"amountCents": -13199,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "8fad2bdc8e87ad02"
},
{
"id": "txn_001099",
"date": "2026-10-05",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b54bd7c0d401a680"
},
{
"id": "txn_001100",
"date": "2026-10-05",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "6537a3a89871ebbe"
},
{
"id": "txn_001101",
"date": "2026-10-05",
"amountCents": -56500,
"description": "ALLY AUTO TRUCK LEASE",
"category": "expense",
"scheduleCLine": "20a",
"locationId": null,
"source": "fixture",
"hash": "7d0070e94c8a4698"
},
{
"id": "txn_001102",
"date": "2026-10-06",
"amountCents": 16500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "bfeb6b02293d47ad"
},
{
"id": "txn_001103",
"date": "2026-10-06",
"amountCents": 16500,
"description": "CHECK 1120",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "316da1ed5f351f7a"
},
{
"id": "txn_001104",
"date": "2026-10-06",
"amountCents": 8500,
"description": "CHECK 1121",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "6355fcf9158c5fbf"
},
{
"id": "txn_001105",
"date": "2026-10-06",
"amountCents": 32000,
"description": "VENMO D OKAFOR",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "47a2bff5772523f6"
},
{
"id": "txn_001106",
"date": "2026-10-06",
"amountCents": -7800,
"description": "SPEEDWAY",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "cbc73c94f94f0a02"
},
{
"id": "txn_001107",
"date": "2026-10-07",
"amountCents": 16500,
"description": "ZELLE FROM A NGUYEN",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "8460e280ff9bd456"
},
{
"id": "txn_001108",
"date": "2026-10-08",
"amountCents": 8500,
"description": "VENMO M HALL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "e7e8bc12b57a458e"
},
{
"id": "txn_001109",
"date": "2026-10-08",
"amountCents": 16500,
"description": "ZELLE FROM A PENNINGTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "84ec39420e6e9f3b"
},
{
"id": "txn_001110",
"date": "2026-10-08",
"amountCents": 32000,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "725d9ce855e37abd"
},
{
"id": "txn_001111",
"date": "2026-10-09",
"amountCents": -13599,
"description": "SAMS CLUB #8173",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "aaadec417a1f60cf"
},
{
"id": "txn_001112",
"date": "2026-10-10",
"amountCents": 32000,
"description": "ZELLE FROM R SPARKS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "b2dbf86c1b033914"
},
{
"id": "txn_001113",
"date": "2026-10-10",
"amountCents": 16500,
"description": "ZELLE FROM V TURNER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "7a5868b45e76d297"
},
{
"id": "txn_001114",
"date": "2026-10-10",
"amountCents": 32000,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "5925e1307337f68c"
},
{
"id": "txn_001115",
"date": "2026-10-10",
"amountCents": -26000,
"description": "KY FARM BUREAU INSURANCE",
"category": "expense",
"scheduleCLine": "15",
"locationId": null,
"source": "fixture",
"hash": "a97d007aca5b9afe"
},
{
"id": "txn_001116",
"date": "2026-10-11",
"amountCents": -6200,
"description": "KROGER FUEL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "7cb41e97c93f0303"
},
{
"id": "txn_001117",
"date": "2026-10-12",
"amountCents": 16500,
"description": "CHECK 1122",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "0d6aa2cdcee794b7"
},
{
"id": "txn_001118",
"date": "2026-10-12",
"amountCents": 32000,
"description": "VENMO M ESTES",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "89bf5e2bfec30c7c"
},
{
"id": "txn_001119",
"date": "2026-10-12",
"amountCents": -9500,
"description": "VERIZON WIRELESS",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "584165241fcba3e1"
},
{
"id": "txn_001120",
"date": "2026-10-13",
"amountCents": 32000,
"description": "VENMO J MAGGARD",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "c9206c8a381913df"
},
{
"id": "txn_001121",
"date": "2026-10-13",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "68c7df76e52215f9"
},
{
"id": "txn_001122",
"date": "2026-10-14",
"amountCents": 16500,
"description": "VENMO M FUGATE",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "52e58147b48b5373"
},
{
"id": "txn_001123",
"date": "2026-10-14",
"amountCents": 32000,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "2bafb915e79667ab"
},
{
"id": "txn_001124",
"date": "2026-10-14",
"amountCents": -13000,
"description": "KENTUCKY UTILITIES",
"category": "expense",
"scheduleCLine": "25",
"locationId": null,
"source": "fixture",
"hash": "05f89f44d2a5868a"
},
{
"id": "txn_001125",
"date": "2026-10-15",
"amountCents": 8500,
"description": "CHECK 1123",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "162aa5076db7391b"
},
{
"id": "txn_001126",
"date": "2026-10-16",
"amountCents": 48000,
"description": "ZELLE FROM A SEXTON",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "7a1f1bf8e0312411"
},
{
"id": "txn_001127",
"date": "2026-10-16",
"amountCents": 8500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "ed27a993c40a3dd0"
},
{
"id": "txn_001128",
"date": "2026-10-16",
"amountCents": 16500,
"description": "ZELLE FROM D HACKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "b515c8ec6035badd"
},
{
"id": "txn_001129",
"date": "2026-10-16",
"amountCents": -13895,
"description": "DETAIL KING SUPPLY",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "c1f11b95fef50663"
},
{
"id": "txn_001130",
"date": "2026-10-16",
"amountCents": -7600,
"description": "THORNTONS",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "c58e642ff7c300b0"
},
{
"id": "txn_001131",
"date": "2026-10-17",
"amountCents": 16500,
"description": "VENMO V CAUDILL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "78b558f6e1905c1f"
},
{
"id": "txn_001132",
"date": "2026-10-17",
"amountCents": 16500,
"description": "ZELLE FROM C WHITAKER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "7d708ea86453605a"
},
{
"id": "txn_001133",
"date": "2026-10-18",
"amountCents": 16500,
"description": "ZELLE FROM W HOLBROOK",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "1e59b4e0799e3f08"
},
{
"id": "txn_001134",
"date": "2026-10-18",
"amountCents": 16500,
"description": "ZELLE FROM G BOWLING",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c018e70074f469e2"
},
{
"id": "txn_001135",
"date": "2026-10-19",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "312eb01ef2067083"
},
{
"id": "txn_001136",
"date": "2026-10-19",
"amountCents": 8500,
"description": "ZELLE FROM B TACKETT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "40696ee0c6269a8b"
},
{
"id": "txn_001137",
"date": "2026-10-20",
"amountCents": 16500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "e2da9df6fbba796a"
},
{
"id": "txn_001138",
"date": "2026-10-20",
"amountCents": 16500,
"description": "ZELLE FROM BLUEGRASS FLEET SVC",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "afb94c3fbbc16d6e"
},
{
"id": "txn_001139",
"date": "2026-10-20",
"amountCents": 8500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "ededb2f5bd5892e3"
},
{
"id": "txn_001140",
"date": "2026-10-20",
"amountCents": -8300,
"description": "MARATHON",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "94ecc13957282874"
},
{
"id": "txn_001141",
"date": "2026-10-21",
"amountCents": 8500,
"description": "ZELLE FROM S BLEVINS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "e463dd0c9574c928"
},
{
"id": "txn_001142",
"date": "2026-10-22",
"amountCents": 8500,
"description": "SQUARE *MARCUS MOBILE DETAIL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "ffd1bed2f8a1f3f0"
},
{
"id": "txn_001143",
"date": "2026-10-22",
"amountCents": -11297,
"description": "AUTOZONE #1123",
"category": "expense",
"scheduleCLine": "22",
"locationId": null,
"source": "fixture",
"hash": "5a102c2fb33eb0d8"
},
{
"id": "txn_001144",
"date": "2026-10-23",
"amountCents": 48000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "c8ab8ef49a5c74c1"
},
{
"id": "txn_001145",
"date": "2026-10-24",
"amountCents": 16500,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "d356004d9b3b8dd7"
},
{
"id": "txn_001146",
"date": "2026-10-24",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "879cbccc01905f35"
},
{
"id": "txn_001147",
"date": "2026-10-25",
"amountCents": 16500,
"description": "ZELLE FROM E WATTS",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_1",
"source": "fixture",
"hash": "61d8df0df9505e49"
},
{
"id": "txn_001148",
"date": "2026-10-25",
"amountCents": -6200,
"description": "SHELL OIL",
"category": "expense",
"scheduleCLine": "9",
"locationId": null,
"source": "fixture",
"hash": "93824f80351068ee"
},
{
"id": "txn_001149",
"date": "2026-10-26",
"amountCents": 8500,
"description": "VENMO R PATEL",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "a1df36da1c452036"
},
{
"id": "txn_001150",
"date": "2026-10-27",
"amountCents": 8500,
"description": "ZELLE FROM KEENE ROAD FARM",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_4",
"source": "fixture",
"hash": "263f55406c6003c8"
},
{
"id": "txn_001151",
"date": "2026-10-27",
"amountCents": 32000,
"description": "VENMO C REED",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "04e4dcc49bfbfbf6"
},
{
"id": "txn_001152",
"date": "2026-10-27",
"amountCents": 16500,
"description": "VENMO R SADLER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_6",
"source": "fixture",
"hash": "c27697f8f9c2ef37"
},
{
"id": "txn_001153",
"date": "2026-10-28",
"amountCents": 32000,
"description": "CHECK 1124",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "bb382924b2ab9133"
},
{
"id": "txn_001154",
"date": "2026-10-31",
"amountCents": 48000,
"description": "CASH DEPOSIT",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_2",
"source": "fixture",
"hash": "0033cfdc8cbba37f"
},
{
"id": "txn_001155",
"date": "2026-10-31",
"amountCents": 16500,
"description": "ZELLE FROM F STAMPER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "da9b6b034f0311fa"
},
{
"id": "txn_001156",
"date": "2026-10-31",
"amountCents": 16500,
"description": "ZELLE FROM L NAPIER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_3",
"source": "fixture",
"hash": "bea632240791b039"
},
{
"id": "txn_001157",
"date": "2026-10-31",
"amountCents": 48000,
"description": "STRIPE TRANSFER",
"category": "income",
"scheduleCLine": "1",
"locationId": "loc_5",
"source": "fixture",
"hash": "f29593299f6c40de"
}
],
"filings": [
{
"districtId": "ky-fayette-lfucg",
"taxYear": 2025,
"status": "filed"
}
],
"taxPayments": []
};
return { DEMO_WORKSPACE };
})();
// ---- data_tier1 ----
const data_tier1 = (() => {
// Generated by tools/tier1-to-js.mjs from data/tier1.json (frozen 2026-11-04): 60 rows, 54 districts.
// Do not edit by hand; run npm run data:tier1.
const TIER1_FROZEN_ON = '2026-11-04';
const TIER1_META = {"frozenOn":"2026-11-04","rowCount":60,"districtCount":54,"droppedDistricts":["ky-london-city","ky-powell-county"],"droppedRowCount":5};
const TIER1 = [
{
"districtId": "ky-boone-county",
"name": "Boone County (Ord. 07-27 general levy)",
"kind": "county",
"parentCountyId": "ky-boone-county",
"base": "netProfit",
"ratePct": 0.8,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-18",
"supersededDate": "2024-12-31",
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 60178,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Boone County Net Profit License Tax Return (column b)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms7files.revize.com/boonecounty/Documents/Services/Occupational%20Licensing/Tax%20Rates/0207%20Tax%20Rate%20for%202024%20updated%202024.05.07.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Cap is CPI-indexed yearly: 2026 $635.95 (on $79,494 net profit); 2025 $619.20 per NFC. Three separate lines on the Boone return: general 0.8%, mental health 0.15% (cap $25), Board of Education 0.5% (no cap) — see supplemental rows. Apportionment (sales + payroll)/2. $25 annual business certificate, separate. Penalty 5%/mo max 25% min $25; 12%/yr. Cap on this row is the 2024 figure; years before 2024 are outside the tool (tax years 2024-2027).",
"informationalFees": [
{
"label": "Annual business certificate",
"cents": 2500
}
],
"sourceTitle": "Boone County Fiscal Court, 0207 Tax Rate for 2024 (Occupational Licensing tax-rate sheet)",
"secondSourceUrl": "https://codelibrary.amlegal.com/codes/boonecounty/latest/booneco_ky/0-0-0-11787",
"flags": [
"capCpiIndexedRowPerYear",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-boone-county",
"name": "Boone County (Ord. 07-27 general levy)",
"kind": "county",
"parentCountyId": "ky-boone-county",
"base": "netProfit",
"ratePct": 0.8,
"appliesBy": "taxYearStart",
"effectiveDate": "2025-01-01",
"supersededDate": "2025-12-31",
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 61920,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Boone County Net Profit License Tax Return (column b)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms7files.revize.com/boonecounty/Documents/Services/Occupational%20Licensing/Tax%20Rates/0207%20Tax%20Rate%20for%202025.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Cap is CPI-indexed yearly: 2026 $635.95 (on $79,494 net profit); 2025 $619.20 per NFC. Three separate lines on the Boone return: general 0.8%, mental health 0.15% (cap $25), Board of Education 0.5% (no cap) — see supplemental rows. Apportionment (sales + payroll)/2. $25 annual business certificate, separate. Penalty 5%/mo max 25% min $25; 12%/yr.",
"informationalFees": [
{
"label": "Annual business certificate",
"cents": 2500
}
],
"sourceTitle": "Boone County Fiscal Court, 0207 Tax Rate for 2025 (Occupational Licensing tax-rate sheet)",
"secondSourceUrl": "https://codelibrary.amlegal.com/codes/boonecounty/latest/booneco_ky/0-0-0-11787",
"flags": [
"capCpiIndexedRowPerYear",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-boone-county",
"name": "Boone County (Ord. 07-27 general levy)",
"kind": "county",
"parentCountyId": "ky-boone-county",
"base": "netProfit",
"ratePct": 0.8,
"appliesBy": "taxYearStart",
"effectiveDate": "2026-01-01",
"supersededDate": "2026-12-31",
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 63595,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Boone County Net Profit License Tax Return (column b)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms7files.revize.com/boonecounty/Documents/Services/Occupational%20Licensing/Tax%20Rates/0207%20Tax%20Rate%20for%202026.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Cap is CPI-indexed yearly: 2026 $635.95 (on $79,494 net profit); 2025 $619.20 per NFC. Three separate lines on the Boone return: general 0.8%, mental health 0.15% (cap $25), Board of Education 0.5% (no cap) — see supplemental rows. Apportionment (sales + payroll)/2. $25 annual business certificate, separate. Penalty 5%/mo max 25% min $25; 12%/yr.",
"informationalFees": [
{
"label": "Annual business certificate",
"cents": 2500
}
],
"sourceTitle": "Boone County Fiscal Court, 0207 Tax Rate for 2026 (Occupational Licensing tax-rate sheet)",
"secondSourceUrl": "https://codelibrary.amlegal.com/codes/boonecounty/latest/booneco_ky/0-0-0-11787",
"flags": [
"capCpiIndexedRowPerYear",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-boone-county",
"name": "Boone County (Ord. 07-27 general levy)",
"kind": "county",
"parentCountyId": "ky-boone-county",
"base": "netProfit",
"ratePct": 0.8,
"appliesBy": "taxYearStart",
"effectiveDate": "2027-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 65735,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Boone County Net Profit License Tax Return (column b)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms7files.revize.com/boonecounty/Documents/Services/Occupational%20Licensing/Tax%20Rates/0207%20Tax%20Rate%20for%202027.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Cap is CPI-indexed yearly: 2026 $635.95 (on $79,494 net profit); 2025 $619.20 per NFC. Three separate lines on the Boone return: general 0.8%, mental health 0.15% (cap $25), Board of Education 0.5% (no cap) — see supplemental rows. Apportionment (sales + payroll)/2. $25 annual business certificate, separate. Penalty 5%/mo max 25% min $25; 12%/yr.",
"informationalFees": [
{
"label": "Annual business certificate",
"cents": 2500
}
],
"sourceTitle": "Boone County Fiscal Court, 0207 Tax Rate for 2027 (Occupational Licensing tax-rate sheet)",
"secondSourceUrl": "https://codelibrary.amlegal.com/codes/boonecounty/latest/booneco_ky/0-0-0-11787",
"flags": [
"capCpiIndexedRowPerYear",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-boone-county-mental-health",
"name": "Boone County Mental Health / Intellectual Disability / Aging tax (Ord. 07-26)",
"kind": "county",
"parentCountyId": "ky-boone-county-mental-health",
"base": "netProfit",
"ratePct": 0.15,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-18",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 2500,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Boone County Net Profit License Tax Return (column c)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/boonecounty/latest/booneco_ky/0-0-0-11787",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Supplemental county line. 0.15% of net profit, $25 maximum per year.",
"sourceTitle": "Boone County Code § 110.27 Occupational license tax payment required (Ord. 07-26)",
"flags": [
"supplementalCountyLine",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-boone-schools",
"name": "Boone County Board of Education occupational tax",
"kind": "school",
"parentCountyId": "ky-boone-county",
"base": "netProfit",
"ratePct": 0.5,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": true,
"formId": "Boone County Net Profit License Tax Return (column a)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms7files.revize.com/boonecountyky/docs/OL/2026/General/0207%20Tax%20Rate%20for%202026.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.5% of net profit, no cap, for businesses operating in the Boone County School District; businesses entirely within the Walton-Verona district exempt. Payroll portion: employees who both work and live in the district. Net-profit residency rule not stated — flagged for professor.",
"sourceTitle": "Boone County Fiscal Court — Tax Rate for 2026",
"flags": [
"effectiveDateNotRead",
"netProfitResidencyRuleNotStated",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-bowling-green-city",
"name": "City of Bowling Green",
"kind": "city",
"parentCountyId": "ky-warren-county",
"base": "netProfit",
"ratePct": 2,
"appliesBy": "taxYearStart",
"effectiveDate": "2024-01-01",
"supersededDate": null,
"minimumFeeCents": 3000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City of Bowling Green Net Profit License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/bowlinggreen/latest/bowlinggreen_ky/0-0-0-58419",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate is the rate's effective date (2.0% for fiscal years beginning on or after 2024-01-01; 1.85% earlier). Greater-of $30 minimum. § 18-2.05 apportionment (payroll + sales)/2. § 18-2.13: 5%/mo, max 25%, min $25; 12%/yr. SPOT-CHECK 2026-11-03: § 18-2.02 read on screen: \"measured by 2.0% of ... the taxable net profit\".",
"sourceTitle": "Bowling Green Code § 18-2.02 Occupational License Fees Imposed (Ord. BG2020-23; Ord. BG2023-6)",
"flags": [
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-bullitt-county",
"name": "Bullitt County",
"kind": "county",
"parentCountyId": "ky-bullitt-county",
"base": null,
"ratePct": 0,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": false,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": null,
"interestPctPerYear": null,
"sourceUrl": "https://bullittky.com/wp-content/uploads/2021/06/Budget-2021-2022-dated-5.3.2021.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "No county occupational license tax ordinance found; no occupational tax office; budget General Fund tax revenues contain no occupational/net-profit line. Evidence of absence only. No Bullitt County school district occupational tax found. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Evidence of absence (KACo N/A plus the county's own pages) accepted as verified; shipped as a zero-levy row.",
"sourceTitle": "Bullitt County Fiscal Court FY2021-2022 Budget (General Fund revenue schedule)",
"flags": [
"no-levy",
"evidenceOfAbsenceOnly",
"budgetDocFY2022",
"noLevyApportionmentIrrelevant",
"no-levy-from-documents"
],
"custom": false
},
{
"districtId": "ky-campbell-county",
"name": "Campbell County (three county levies, combined)",
"kind": "county",
"parentCountyId": "ky-campbell-county",
"base": "netProfit",
"ratePct": 1.05,
"appliesBy": "taxYearStart",
"effectiveDate": "2023-12-31",
"supersededDate": null,
"minimumFeeCents": 7500,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": 7500,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "CC-3 Campbell County & Cities Occupational Tax & Business License Fee Annual Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/campbellcounty_ky/latest/campbellcounty_ky/0-0-0-3855",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Senior 0.05% ($3.57 min = max) + Mental Health 0.10% ($7.14) + General 0.90% ($64.29): each ordinance sets min = max, so the county net-profit tax is in substance a flat $75 regardless of net profit. Stored as one county row with ratePct 1.05 nominal, minimumFeeCents = capCents = 7500 (engine: liability = clamp(computed, 7500, 7500) = $75). Payroll: 0.05% to $50k, 0.10% and 0.90% to OASDI max. No school levy found in county code or forms. SPOT-CHECK 2026-11-03: § 110.46(A) read on screen: general line 0.9% of net profits \"or $64.29, whichever is greater\", (A)(3)(b) \"$64.29 maximum liability\" for tax years ending 12-31-2023 on; consistent with the row (0.9% + 0.10% + 0.05% lines, min = max, $75 total).",
"sourceTitle": "Campbell County Code § 110.46 Payment of tax (general); § 110.03 (senior) and § 110.22 (mental health)",
"flags": [
"flatFeeMinEqualsMax",
"rateNominal",
"2025-26RateSheetsNotLocated",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-campbellsville-city",
"name": "City of Campbellsville",
"kind": "city",
"parentCountyId": "ky-taylor-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2009-06-13",
"supersededDate": "2025-12-31",
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City of Campbellsville Net Profit form (title not confirmed)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/campbellsville/latest/campbellsville_ky/0-0-0-2742",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "§ 111.99: 5% of tax per month, max 25%, min $25; 12% per annum simple interest. § 111.04: net profit x (payroll factor + sales factor)/2; sales factor alone if no multi-district payroll. § 111.06: returns due April 15 or the 15th day of the 4th month after fiscal year-end. § 111.13 authorizes but sets no minimum or maximum. § 111.03(B): residents 65+ may exempt the first $2,000 of wages or net profits (age-conditional, so exemptionCents left null). effectiveDate is the passage date of Ord. 09-03. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. One rank-1/2 document suffices outside the demo region.",
"sourceTitle": "Campbellsville, KY Code of Ordinances § 111.02 Fee; generally (amlegal, 2025 S-10), Ord. 09-03 passed 6-13-2009",
"secondSourceUrl": "https://wvlc.com/local-news-blog/800855/occupational-tax-rate-increased-by-campbellsville-city-council",
"flags": [
"single-primary-source (amlegal code)",
"effectiveDate-is-ordinance-passage-date",
"age65-exemption-$2000-not-modeled",
"singleSourceProtocol",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-campbellsville-city",
"name": "City of Campbellsville",
"kind": "city",
"parentCountyId": "ky-taylor-county",
"base": "netProfit",
"ratePct": 1.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2026-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City of Campbellsville 2026 Net Profit form (title not confirmed)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://taylorcountyky.gov/occupational-tax",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "The rate is stated on the official collecting office's page. The page states 1.5% for net profits but gives no payroll withholding rate, so it is unconfirmed whether wages also went to 1.5%. Penalty, interest and apportionment are carried from Ch. 111 (Ord. 09-03), assuming the 2025 amendment changed only the rate. Amending ordinance number and date not found. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. One rank-1/2 document suffices outside the demo region.",
"sourceTitle": "Taylor County Occupational Tax Office page (taylorcountyky.gov/occupational-tax)",
"secondSourceUrl": "https://wvlc.com/local-news-blog/800855/occupational-tax-rate-increased-by-campbellsville-city-council",
"flags": [
"single-primary-source (tax office page)",
"amending-ordinance-not-located",
"payroll-rate-not-stated",
"penalty-interest-apportionment-assumed-unchanged-from-Ord-09-03",
"singleSourceProtocol",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-christian-county",
"name": "Christian County",
"kind": "county",
"parentCountyId": "ky-christian-county",
"base": null,
"ratePct": 0,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": false,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": null,
"interestPctPerYear": null,
"sourceUrl": "https://christiancountyky.gov/occupational-license",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "County issues flat category-based annual licenses through the Clerk (restaurants, tobacco, alcohol, vending); not a tax measured by net profits or wages. No fiscal court occupational license tax ordinance found. No school district levy found. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Evidence of absence (KACo N/A plus the county's own pages) accepted as verified; shipped as a zero-levy row.",
"sourceTitle": "Christian County, KY — Occupational License (County Clerk) page",
"flags": [
"no-levy",
"flatClerkLicenseOnly",
"noLevyApportionmentIrrelevant",
"no-levy-from-documents"
],
"custom": false
},
{
"districtId": "ky-covington-city",
"name": "City of Covington",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "netProfit",
"ratePct": 2.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2023-06-27",
"supersededDate": null,
"minimumFeeCents": 10000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": 8000000,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "OL-3 Occupational License Fee and Business License Renewal Return (Covington)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/covington/latest/covington_ky/0-0-0-22419",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "2.5% greater-of $100; $80,000 maximum on the net-profit portion. Payroll 2.45% capped at the FICA maximum. § 110.05 (payroll + sales)/2. § 110.99: 5%/mo, max 25%, min $25; 12%/yr. effectiveDate is adoption of O-09-23. OL-3 PDF robots-blocked. SPOT-CHECK 2026-11-03: § 110.03 read on screen: 2.5% of net profits or $100, whichever is greater.",
"sourceTitle": "Covington Code § 110.03 Occupational license tax payment required (2026 S-10)",
"flags": [
"effectiveDateIsAdoptionDate",
"ol3FormNotOpened",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-crittenden-county",
"name": "Crittenden County",
"kind": "county",
"parentCountyId": "ky-crittenden-county",
"base": "netProfit",
"ratePct": 1.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2025-07-01",
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profit License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.crittendencountyky.org/Net%20Profit%20Return.pdf?t=202603051239140",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Ord. 25-O-003 (amending O-12-005), effective 2025-07-01 for withholding (Q3 2025 onward). For net profits the county applies 1.5% to the entire 2025 Net Profit Return (form has a single 1.5% line, no proration), so this row starts at tax year 2025 under taxYearStart rather than the July-1/transactionDate convention. Line 6 = greater of 1.5% fee or $50 annual license fee; line 7 credits the annual business license fee paid, so the $50 minimum is creditable. Schedule A apportionment text was truncated in the readable PDF (only a 'Gross Sales or Receipts' factor visible). Form shows no credit for City of Marion tax. Ordinance text itself not located online. SPOT-CHECK 2026-11-03 (strategy seat): Net Profit Return read: \"License Fee Due (1.5% of line 3)\", \"New rate effective July 1, 2025\", annual license fee $50, greater of. Rate confirmed. OPEN: the form says the rate is effective July 1, 2025 and has no split-year line; the row applies 1.5% to all of tax year 2025 (agent reading of the county application). Call #9. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Effective date per the return: \"New rate effective July 1, 2025.\" With taxYearStart the 1.5% row governs from tax year 2026; tax year 2025 is not computed for Crittenden (the pre-change rate is not in the table). Apportionment: no added factor found, so the KRS 67.753 statutory default applies.",
"sourceTitle": "Crittenden County Fiscal Court, Net Profit License Fee Return (crittendencountyky.org, Occupational Tax Forms)",
"secondSourceUrl": "https://www.crittendencountyky.org/Application-Renewal%20Form%20with%20instructions.pdf?t=202508081504490",
"flags": [
"convention-deviation: effectiveDate 2025-01-01/taxYearStart instead of 2025-07-01/transactionDate, per county instruction that the increase applies to the 2025 Net Profit Return",
"apportionment-null: Schedule A truncated, payroll factor not confirmed",
"ordinance-25-O-003-text-not-located",
"no-city-credit-shown (Marion businesses may owe both 1.5% county and 1.5% city)",
"midYearChange-appliedFromTaxYear2026",
"apportionmentStatutoryDefault",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-daviess-county",
"name": "Daviess County",
"kind": "county",
"parentCountyId": "ky-daviess-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2022-01-01",
"supersededDate": null,
"minimumFeeCents": 0,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form NP-1 Net Profit License Fee Return (joint City of Owensboro / Daviess County)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/daviesscountyky/latest/daviesscounty_ky/0-0-0-2044",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.70% from 2020-01-01, 1% from 2022-01-01. No minimum fee. § 110.17(C) allows up to $10,000 exemption by order; none on NP-1. Penalty 5%/mo, max 25%, min $25; 12%/yr. NP-1 Part II two-factor. SPOT-CHECK 2026-11-03: § 110.17 read on screen: \"amended to 1% effective January 1, 2022\". Owensboro NP instructions Table B: Daviess 1.00% for periods ending 12/31/22 and after.",
"sourceTitle": "Daviess County Code § 110.17 Occupational License Fee Payment Required (Ord. KOC 220.33 (2020))",
"flags": [
"apportionmentSectionNotOpened",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-edgewood-city",
"name": "City of Edgewood",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "netProfit",
"ratePct": 0.75,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-10",
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee (Edgewood column, Schedule N)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/edgewood/latest/edgewood_ky/0-0-0-4796",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.75% of net profits, $50 minimum (waivable if gross receipts under $5,000 and refund requested within 30 days of year end); no maximum. § 110.32 (KRS 67.753(4)): property factor (original cost; rentals x 8; averaged) added to payroll and sales; net profits x sum of in-city factors / number of factors present. Payroll 1%. Late penalty/interest from Kenton County instructions (city § 110.99 is fines only). SPOT-CHECK 2026-11-03: § 110.31(2) read on screen: \"Three-fourths of one percent (0.75%) of the net profits ... no less than fifty dollars ($50.00)\".",
"sourceTitle": "Edgewood Code § 110.31 Rate (2026 S-31); § 110.32 Apportionment of net profits",
"flags": [
"penaltyFromCountyInstructions",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-elizabethtown-city",
"name": "City of Elizabethtown",
"kind": "city",
"parentCountyId": "ky-hardin-county",
"base": "netProfit",
"ratePct": 1.95,
"appliesBy": "taxYearStart",
"effectiveDate": "2024-01-01",
"supersededDate": null,
"minimumFeeCents": 2500,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": 5,
"maxPct": null,
"minimumCents": null
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/elizabethtownky/latest/elizabethtown_ky/0-0-0-3203",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate per city page (wages from 2024-01-01; net profits for 2024 return onward). § 110.14: minimum tax $25 on net profits due with annual application. § 110.12: 5%/mo; 25% cap and $25 min not in section text (§ 110.99 not read). 12%/yr. § 110.04 (payroll + sales)/2. SPOT-CHECK 2026-11-03: § 110.03 read on screen: \"measured by 1.95% of ... the net profit\". § 110.14 (minimum and maximum liability) did not load; $25 minimum not re-read today.",
"sourceTitle": "Elizabethtown Code § 110.03 Occupational License Tax Payment Required (Ord. 13-2023, passed 6-26-2023)",
"flags": [
"penaltyCapNotConfirmed",
"formIdNotFound",
"minimumNotReRead",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-elsmere-city",
"name": "City of Elsmere",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2015-12-15",
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": 1500000,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee (Elsmere column, Schedule N)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/elsmere/latest/elsmere_ky/0-0-0-3288",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "1% of net profits, $50 minimum (waivable), $15,000 maximum. § 110.27 (KRS 67.753(4)): property factor added; divisor = factors present. Payroll 1.25% to 6/30/2026, 1.75% from 7/1/2026 (Ord. 1854-2026, not on amlegal yet). SPOT-CHECK 2026-11-03: § 110.26(2) read on screen: \"One percent of the net profits ... no less than $50 and no more than $15,000\".",
"sourceTitle": "Elsmere Code § 110.26 Rate (2022 S-27); § 110.27 Apportionment of net profits",
"flags": [
"payrollIncrease2026OrdinanceNotOnAmlegal",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-erlanger-city",
"name": "City of Erlanger",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "grossReceipts",
"ratePct": 0.075,
"appliesBy": "taxYearStart",
"effectiveDate": "2022-04-05",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 4000000,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee (Erlanger column, Schedule G)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/erlanger/latest/erlanger_ky/0-0-0-6968",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.075% of taxable gross receipts of non-employees, max $40,000/yr, no minimum. (C): gross receipts apportioned by (payroll + sales + property factors) / number of factors present (1, 2 or 3). Payroll 1.5%. Separate $50 business regulatory license. Penalty 5%/mo max 25% min $25; 12%/yr. SPOT-CHECK 2026-11-03: § 110.04(B)(2) read on screen: 0.075% of taxable gross receipts, max $40,000 per calendar year. § 110.03(A)(1): every non-employee business also pays a $50 annual business regulatory license fee (or its share of the Kenton County multi-jurisdictional permit fee) — not modeled; see flat-fee decision.",
"informationalFees": [
{
"label": "Annual business regulatory license, § 110.03(A)(1) (or its share of the Kenton County permit fee)",
"cents": 5000
}
],
"sourceTitle": "Erlanger Code § 110.04 Business taxation (2026 S-10)",
"flags": [
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-fayette-lfucg",
"name": "Lexington-Fayette Urban County Government",
"kind": "merged",
"parentCountyId": "ky-fayette-lfucg",
"base": "netProfit",
"ratePct": 2.25,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-06",
"supersededDate": null,
"minimumFeeCents": 10000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form 228",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://library.municode.com/ky/lexington-fayette_urban/codes/code_of_ordinances/485367?nodeId=xetyj1",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate = last amendment to Sec. 13-4 (Ord. 267-2007). Same 2.25% on wages. Minimum fee Sec. 13-9: $100 annual (also initial), credited as payment of the fee for the year, never a refund; Form 228 line 7 deducts min fee paid, line 11 adds next year's $100. Age 65+: first $3,000 of wages AND net profits exempt (Sec. 13-6(b); Form 228 line 4) — exemptionCents applies only when ageExempt. Small-filer Sec. 13-6(l): gross receipts <= $4,400 owe neither minimum nor net profit fee. Penalty (Sec. 13-12 inferred): 5%/mo, max 25%, min $25; 12%/yr simple. Form 228 Worksheet 1 adds back state and local occupational taxes deducted federally. Quarterly estimates only if liability > $5,000. Latest form opened is TY2021; 2023/2024 Form 228 PDFs robots-blocked. SPOT-CHECK 2026-11-03: rate, base, $100 minimum (credited) and two-factor apportionment read from Sec. 13-4 on Municode (amlegal URL now dead) and 2025 Form 228 lines 4, 6, 7. Form: minimum license fee exemption when Schedule C/F/1099 gross receipts <= $4,400. Confirmed by Roland.",
"exemptionCondition": "age65",
"exemptionCentsIfConditionMet": 300000,
"sourceTitle": "LFUCG Code of Ordinances Ch. 13 Art. I, Sec. 13-4 (Municode, version Jul 17, 2026)",
"secondSourceUrl": "https://content.lexingtonky.gov/sites/default/files/2026-01/2025%20NP%20MASTER.pdf",
"flags": [
"penaltySectionNumberInferred",
"rateAdoptionDateNotIsolated",
"exemption3000IsAge65Only",
"ordinanceMovedAmlegalToMunicode",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-fayette-schools",
"name": "Fayette County Public Schools occupational license tax for schools",
"kind": "school",
"parentCountyId": "ky-fayette-lfucg",
"base": "netProfit",
"ratePct": 0.5,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": true,
"formId": "Form 228-S",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://resources.finalsite.net/images/v1766175508/fcpsnet/luzqqt5bxea1ykfb25o5/25net_profits.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Instructions: 'Multiply Line 3 by .005'; who must file: corporations, partnerships, sole proprietorships, estates, trusts with Fayette nexus — corporations NOT excluded. Penalty 5%/mo max 25% min $25; 12%/yr. Due April 15. Statutory basis not cited on form; KRS 160.483(4)(f) exempts non-resident individuals in 300,000+ counties but the FCPS instructions say nothing about residency. KRS 160.484(4): no new school tax from 1-1-2027 and existing rates shall never increase. SPOT-CHECK 2026-11-03: 2025 Form 228-S line 4 (Line 3 x .005), line 7 interest 1%/month, line 8 penalty 5%/month max 25% min $25; instructions: sole proprietorships with Fayette nexus must file; no residency limit stated. Read in Chrome by Claude; confirmation delegated by Roland 2026-11-03 01:21.",
"sourceTitle": "2025 Net Profits Occupational License Tax Return, Form 228-S, Board of Education of Fayette County",
"secondSourceUrl": "https://resources.finalsite.net/images/v1686316739/fcpsnet/mdx1s91wbyg8amopoiut/instructions228s.pdf",
"flags": [
"statutoryBasisNotCitedOnForm",
"nonResidentSoleProprietorTreatmentUnresolved",
"effectiveDateNotFound",
"noMinimumOrCapOnForm",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-florence-city",
"name": "City of Florence",
"kind": "city",
"parentCountyId": "ky-boone-county",
"base": "grossReceipts",
"ratePct": 0.1,
"appliesBy": "taxYearStart",
"effectiveDate": "2002-07-01",
"supersededDate": null,
"minimumFeeCents": 4000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": 1000000,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City of Florence Annual Renewal — Occupational License with Schedule A",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/florence/latest/florence_ky/0-0-0-5835",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Gross-receipts license tax, not net profits; based on the last federal return filed before the license year. Schedule A apportionment: gross receipts factor + gross compensation factor / 2 (property not used). Payroll rate not found in readable documents (commonly reported 2%; left null). SPOT-CHECK 2026-11-03: § 110.05(C) read on screen: \"0.1% of taxable gross receipts with a minimum license tax of $40 per year and maximum license tax of $10,000 per year\"; (D) computed on the last federal return filed before the license year.",
"sourceTitle": "Florence Code § 110.05 License taxes established",
"flags": [
"payrollRateNotVerified",
"apportionmentSectionNotOpened",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-fort-mitchell-city",
"name": "City of Fort Mitchell",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "grossReceipts",
"ratePct": 0.075,
"appliesBy": "taxYearStart",
"effectiveDate": "2019-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee (Fort Mitchell column, Schedule G)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/ftmitchell/latest/ftmitchell_ky/0-0-0-6842",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.075% of gross receipts, no minimum or maximum. Payroll 1.25%. § 110.27 apportionment text NOT read (amlegal error on every attempt); threeFactor inferred from the county form Schedule Y and sibling ordinances — confirm. SPOT-CHECK 2026-11-03: § 110.27 read on screen: under KRS 67.753(4) a property factor is added to the payroll and sales factors for apportioning gross receipts (threeFactor confirmed).",
"sourceTitle": "Fort Mitchell Code § 110.26 Rate",
"flags": [
"noMinOrMax",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-fort-thomas-city",
"name": "City of Fort Thomas",
"kind": "city",
"parentCountyId": "ky-campbell-county",
"base": "netProfit",
"ratePct": 1.25,
"appliesBy": "taxYearStart",
"effectiveDate": "2008-02-04",
"supersededDate": null,
"minimumFeeCents": 2500,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "CC-3 (Fort Thomas column) filed with Campbell County",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/fthomas/latest/fthomas_ky/0-0-0-10119",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "1.25% of net profits, $25 greater-of minimum, no maximum. § 113.04 (payroll + sales)/2. § 113.99 not opened; penalty/interest from CC-3 instructions. SPOT-CHECK 2026-11-03: § 113.03 read on screen: \"measured by 1.25% of ... net profits ... or a minimum tax of $25, whichever is greater\".",
"sourceTitle": "Fort Thomas Code § 113.03 Occupational license tax payment required (2024 S-26)",
"flags": [
"penaltySectionNotOpened",
"effectiveDateIsAdoptionDate",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-frankfort-city",
"name": "City of Frankfort",
"kind": "city",
"parentCountyId": "ky-franklin-county",
"base": "netProfit",
"ratePct": 1.95,
"appliesBy": "taxYearStart",
"effectiveDate": "2012-08-27",
"supersededDate": null,
"minimumFeeCents": 6000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City Net Profit (for years 2013 and after) — Net Profit License Fee Return, Form 8 / Schedules A–C",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://frankfort.ky.gov/DocumentCenter/View/567/Frankfort-Title-XI-Business-Regulations-PDF",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Greater-of ($60 or 1.95%), minimum not creditable. Wages 1.95%. § 110.26: 5%/mo, max 25%, min $25; 12%/yr. Apportionment § 110.05 payroll + sales / 2 (am. Ord. 10, 2021). effectiveDate is adoption date of Ord. 15, 2012; form labeled 'for years 2013 and after'.",
"sourceTitle": "City of Frankfort Code of Ordinances, Title XI Ch. 110 § 110.04 (Ord. 12, 2008; am. Ord. 15, 2012)",
"secondSourceUrl": "https://frankfort.ky.gov/documentcenter/view/384",
"flags": [
"effectiveDateIsAdoptionDate",
"olderInstructionsShow1.75superseded"
],
"custom": false
},
{
"districtId": "ky-franklin-county",
"name": "Franklin County",
"kind": "county",
"parentCountyId": "ky-franklin-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2008-01-01",
"supersededDate": null,
"minimumFeeCents": 4000,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": true,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Franklin County Net Profits License Fee Return (Revised 7/2016)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/franklincoky/latest/franklinco_ky/0-0-0-2952",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Greater-of ($40 or 1%), minimum not creditable. Net-profits levy applies to activity in the UNINCORPORATED area of the county (§110.03(A)(2)); Schedule C apportionment excludes City of Frankfort activity. § 110.99: 5%/mo, max 25%, min $25; 12%/yr. effectiveDate 2008-01-01 = Ord. 14-2007 (passed 1-1-2008), the ordinance that set 1% / $40. SPOT-CHECK 2026-11-03: § 110.03 read on screen; history line \"(Ord. 14-2007, passed 1-1-2008; Ord. 4-2016, passed 7-1-2016; Ord. 12-2026, passed 4-29-2026)\". Ord. 12-2026 added exemptions (G)(14) nonprofit events and (G)(15) yard sales; it did not change the rate. Row previously carried 2026-04-29, which under appliesBy taxYearStart would have dropped Franklin from tax year 2026 — corrected (date only; rate unchanged). Apportionment: Schedule C averages the gross-receipts (sales) and payroll factors, which is the KRS 67.753 method (stored as krs67753).",
"sourceTitle": "Franklin County Code of Ordinances § 110.03 Occupational license tax payment required (Ord. 14-2007; 4-2016; 12-2026)",
"flags": [
"unincorporatedAreaOnly",
"effectiveDateIsAdoptionDate",
"schoolDistrictLevyUnverified",
"effectiveDateCorrected2026-11-03",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-georgetown-city",
"name": "City of Georgetown",
"kind": "city",
"parentCountyId": "ky-scott-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form NP100 (City column)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://gscrevenue.sophicity.com/Assets/Files/Resources/REVISEDGSCRCREGULATIONS1.26.23.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Gross-receipts switch proposed in 2021 but never adopted: Ord. 2023-22 (12-11-2023) still net-profit mechanics; 2023 Regulations and 2025 FAQ still 1% net profit. City $10,000 exemption applies ONLY to sole proprietors 65+. No minimum fee found. Base ordinance 04-019; adoption date not found. Rate rests on the collecting agency's adopted Regulations plus the city's published deck, not the ordinance text (GSCRC-hosted copy robots-blocked). SPOT-CHECK 2026-11-03: NP100 column A City of Georgetown rate 1%; exemption line blank (Regulations §3.1(2)(b): $10,000 only for sole proprietors over 65).",
"sourceTitle": "Georgetown/Scott County Revenue Commission — Occupational License Tax Regulations, revised January 26, 2023 (§3.1, §4.1A)",
"secondSourceUrl": "https://www.gscrevenueky.gov/assets/files/uploads/_20250311091718766_7d3cbe10c48e4d599ae2e6f7f9201f4b.pdf",
"flags": [
"effectiveDateNotFound",
"rateFromNP100andRegulationsNotOrdinanceText",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-hardin-county",
"name": "Hardin County (unincorporated, Industrial & Commercial Taxing District)",
"kind": "county",
"parentCountyId": "ky-hardin-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2024-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": true,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.hardincountyky.gov/365/Occupational-Tax",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Applies ONLY in unincorporated Hardin County (not inside Elizabethtown, Radcliff, Vine Grove). effectiveDate = district expanded to all unincorporated county (Ord. 338, 2nd reading 2023-12-12); 1% rate first applied 2022-01-01 under Ord. 327. $25 annual license application fee (separate, not a minimum tax). Ordinance scan garbled; rate confirmed from county page. SPOT-CHECK 2026-11-03: hardincountyky.gov/365: 1% of net profit in the district (unincorporated county only); $25 annual license fee listed separately. Coordinator 270-982-8488.",
"informationalFees": [
{
"label": "Annual license application fee",
"cents": 2500
}
],
"sourceTitle": "Hardin County Government — Occupational Tax page; Ordinance No. 338, Series 2023 (amending Ord. 327, Series 2021)",
"flags": [
"unincorporatedAreaOnly",
"ordinanceScanGarbled",
"formIdNotFound",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-hopkinsville-city",
"name": "City of Hopkinsville",
"kind": "city",
"parentCountyId": "ky-christian-county",
"base": "netProfit",
"ratePct": 1.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2023-01-01",
"supersededDate": "2026-06-30",
"minimumFeeCents": 25000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profit License Fee Return (City of Hopkinsville)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/hopkinsville/latest/hopkinsville_ky/0-0-0-5463",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate = Ord. 24-2022 effective 2023-01-01. Wage rate 1.95%. Gross-receipts threshold: $25,000 or less owe no license tax. Penalty 5%/mo, max 25%, min $25; 12%/yr. Two-factor apportionment. PENDING: Ord. 09-2026 (reported) 1.3% / $100 min from 2026-07-01 — needs a second row once the ordinance text is read; appliesBy question (mid-year) is golden case 7 territory. SPOT-CHECK 2026-11-03: amlegal 2026 S-18 now codifies Ord. 32-2025 (passed 2025-11-18): (A)(2) Effective July 1, 2026, one and three-tenths percent of net profits, or $250, whichever is greater; gross receipts <= $25,000 owe none.",
"sourceTitle": "Hopkinsville Code § 110.04 Occupational License Tax Payment Required (Ord. 24-2022, passed 11-15-2022); 2026 S-18",
"flags": [
"interestWordingConflict",
"formStillShowsRepealedCap",
"midYearChange-1.3appliesFromTaxYear2027",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-hopkinsville-city",
"name": "City of Hopkinsville",
"kind": "city",
"parentCountyId": "ky-christian-county",
"base": "netProfit",
"ratePct": 1.3,
"appliesBy": "taxYearStart",
"effectiveDate": "2026-07-01",
"supersededDate": null,
"minimumFeeCents": 25000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profit License Fee Return (City of Hopkinsville)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/hopkinsville/latest/hopkinsville_ky/0-0-0-5463",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Codified 1.3% from 2026-07-01 with $250 minimum. News (WBKO 2026-04-27, WHVO 2026-05) reports Ord. 09-2026 lowering the minimum to $100 plus a $25 processing fee for receipts <= $25,000; not yet codified. Phone question pending. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Codified § 110.04 (2026 S-18, Ord. 32-2025) states 1.3% from July 1, 2026 with a $250 minimum; ordinance wins over the news reports of a $100 minimum (Ord. 09-2026 not codified). With appliesBy taxYearStart, tax year 2026 computes at 1.5% (the row in force on Jan 1, 2026, the higher rate) and 1.3% applies from tax year 2027.",
"sourceTitle": "Hopkinsville Code § 110.04 (2026 S-18), Ord. 32-2025 passed 2025-11-18",
"flags": [
"newsReports100min-codifiedOrdinance250wins",
"midYearChange-1.3appliesFromTaxYear2027",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-independence-city",
"name": "City of Independence",
"kind": "city",
"parentCountyId": "ky-kenton-county",
"base": "grossReceipts",
"ratePct": 0.075,
"appliesBy": "taxYearStart",
"effectiveDate": "2008-12-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee (Independence column, Schedule G)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/independenceky/latest/independence_ky/0-0-0-6842",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "0.075% of taxable gross receipts; no minimum or maximum. Payroll 1.25%. § 110.28 exemptions incl. 501(c)(3), owner-occupants renting one unit, farmers-market vendors. § 110.27 apportionment and § 110.99 not opened; threeFactor inferred from county Schedule Y and sibling ordinances — confirm. SPOT-CHECK 2026-11-03: § 110.27 read on screen: under KRS 67.753(4) a property factor is added to the payroll and sales factors for apportioning gross receipts (threeFactor confirmed).",
"sourceTitle": "Independence Code § 110.26 Rate",
"flags": [
"penaltySectionNotRead",
"noMinOrMax",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-jefferson-metro",
"name": "Louisville/Jefferson County Metro Government",
"kind": "merged",
"parentCountyId": "ky-jefferson-metro",
"base": "netProfit",
"ratePct": 1.45,
"appliesBy": "taxYearStart",
"effectiveDate": "2008-06-30",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form OL-3",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/louisvillemetro/latest/loukymetro/0-0-0-10402",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "ratePct 1.45 = Metro 1.25% + Mass Transit Trust Fund 0.20%, the components that apply to a non-resident sole proprietor. Stored as one merged row; the school component is its own row (ky-jefferson-schools, residents only). No minimum fee. Penalty § 110.99: 5%/mo, max 25%; $25 min from OL-3 instructions (KRS 67.790). 12%/yr. Quarterly estimates if > $5,000 (individuals exempt). TY2025 due April 15, 2026. SPOT-CHECK 2026-11-03: LMCO 110.02 re-read: (A)(2) one and one-fourth percent of net profit; (B)(2) one fifth of one percent transit. OL-3 instructions line 30: Metro and Mass Transit rate .0145; non-resident individuals enter column A only. NEW: LMRC Regulations 2026 §1.02(H) nexus thresholds for nonresident service providers (day/dollar tests) - not modelled in v1.",
"sourceTitle": "Louisville Metro Code § 110.02 Levy of Occupational License Tax; General (Am. Ord. 110-2008)",
"secondSourceUrl": "https://louisvilleky.gov/government/revenue-commission/ol-3-tax-form-instructions",
"flags": [
"effectiveDateIsLastAmendment",
"minPenaltyFromInstructionsNotCode",
"nexusThresholdsNotModelled",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-jefferson-schools",
"name": "Jefferson County Public Schools / Anchorage school boards occupational license tax",
"kind": "school",
"parentCountyId": "ky-jefferson-metro",
"base": "netProfit",
"ratePct": 0.75,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": true,
"residentsOnlyPayroll": true,
"formId": "Form OL-3 (Column B School Boards)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://louisvilleky.gov/sites/default/files/2026-01/Louisville%20Metro%20Revenue%20Commission%20Regulations%20(2026).1.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Applies to wages of RESIDENT employees, net profit of RESIDENT individuals, and net profit of ALL business entities (corporations, partnerships, LLCs). A NON-RESIDENT sole proprietor does not pay it. residentsOnly: true for individuals. Statutory basis per Regulations: KRS 160.482–160.488; 0.75% rests on KRS 160.607(2). Not in LMCO Ch. 110. SPOT-CHECK 2026-11-03: OL-3 instructions: School Boards tax rate .0075, column B; non-resident individuals column A only. Regulations 2026 §1.02(B)(2) re-read: every person except non-resident individuals, and every business entity; effective 2026-01-01.",
"sourceTitle": "Occupational License Tax Regulations of the Louisville/Jefferson County Metro Revenue Commission (effective 1-1-2026), §1.02(B)(2) School Boards",
"secondSourceUrl": "https://louisvilleky.gov/government/revenue-commission/ol-3-tax-form-instructions",
"flags": [
"noOrdinanceInstrumentInLMCO",
"effectiveDateNotFound",
"residentsOnlyForIndividuals",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-jessamine-county",
"name": "Jessamine County",
"kind": "county",
"parentCountyId": "ky-jessamine-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-04",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form JCOT 2 (joint county/Nicholasville)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/jessaminecounty/latest/jessamine_ky/0-0-0-3107",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "§ 110.04 apportionment (payroll + sales)/2, sales alone if only sales multi-district. § 110.99: 5%/mo, max 25%, min $25; 12%/yr simple. No minimum fee, no exemption amount. Inside/outside rule: income inside Nicholasville or Wilmore subject to city + county; outside only county. Checks payable separately. § 110.01 amended 11-4-2025 (definitions; not reviewed). SPOT-CHECK 2026-11-03: Ordinance 110.03 re-read in Chrome (1% of net profit, resident or nonresident). JCOT 2 line 4 License Fee Due at 1% (county column); line 7 penalty 5%/mo max 25% $25 min; line 8 interest 12%/yr.",
"sourceTitle": "Jessamine County Code § 110.03 Occupational License Tax Payment Required (Ord. 12-4-2007; Am. 7-27-2018)",
"secondSourceUrl": "https://jessamineky.gov/wp-content/uploads/2024/12/Net-Profit-Return.pdf",
"flags": [
"amendment2025DefinitionsNotReviewed",
"effectiveDateIsAdoptionDate",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-kenton-county",
"name": "Kenton County",
"kind": "county",
"parentCountyId": "ky-kenton-county",
"base": "netProfit",
"ratePct": 0,
"appliesBy": "taxYearStart",
"effectiveDate": "2024-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "threeFactor",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Kenton County and Cities Annual Return of License Fee",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/kentoncounty/latest/kentonco_ky/0-0-0-13290",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "§ 110.03(B)(3) (Ord. 226.17) exempts business entities (incl. sole proprietorships) from the county net-profit fee for business after Jan 1, 2024, subject to Fiscal Court review every two years; annual net-profit schedules must still be filed. Nominal tiered rates 0.9097%/0.1097% still printed. Payroll 0.6997% up to the OASDI maximum. County form Schedule Y is three-factor (property, payroll, sales) and is used for all Kenton cities. Penalty 5%/mo max 25% min $25; interest 12%/yr. SPOT-CHECK 2026-11-03: § 110.03(3) read on screen: businesses \"after January 1, 2024, will be exempt from paying a net profit occupational license tax (fee)\" but \"still required to prepare and submit annual net profit schedules and forms\".",
"sourceTitle": "Kenton County Code § 110.03 Occupational license tax (2025 S-27)",
"flags": [
"netProfitExemptSince2024FilingStillRequired",
"amlegalOrdinanceDate2024vsNotice2023",
"exemptionSubjectToBiannualReview"
],
"custom": false
},
{
"districtId": "ky-la-grange-city",
"name": "City of La Grange",
"kind": "city",
"parentCountyId": "ky-oldham-county",
"base": "grossReceipts",
"ratePct": 0.08,
"appliesBy": "taxYearStart",
"effectiveDate": "2016-06-06",
"supersededDate": null,
"minimumFeeCents": 5500,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "2026 Business License Application",
"latePenalty": {
"pctPerMonth": null,
"maxPct": null,
"minimumCents": 10000
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/lagrangeky/latest/lagrange_ky/0-0-0-3658",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "NO net-profits levy. Business license tax on GROSS RECEIPTS: 0.08% on first $1,000,000 and 0.05% on the balance, or $55, whichever is greater (not creditable). effectiveDate is the adoption date of Ord. 7-2016. License year April 15–April 14; 2026 license based on 2025 federal-return gross receipts. Penalty per § 110.99 is a flat fine schedule ($100/$200/$500), not % per month. SPOT-CHECK 2026-11-03: § 110.03 read on screen: gross receipts $0.0008 on the first $1,000,000 and $0.0005 above, or a $55 minimum. Tier above $1M not modeled (flagged). § 110.04 apportions by the sales factor alone; with no payroll (all v1 users) this equals krs67753, so stored as krs67753.",
"sourceTitle": "La Grange Code of Ordinances § 110.03 Business license tax payment required (Ord. 28-2007; Ord. 7-2016)",
"flags": [
"grossReceiptsBaseNotNetProfit",
"tieredRate",
"effectiveDateIsAdoptionDate",
"tieredRateAbove1MNotModeled",
"apportionmentSalesOnly_equalsKrs67753WithoutPayroll",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-laurel-county",
"name": "Laurel County",
"kind": "county",
"parentCountyId": "ky-laurel-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form NP — Laurel County Net Profit License Fee Return (Revised 12/30/2020)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://lcotax.com/wp-content/uploads/2025/08/NET-PROFIT-LICENSE-FEE-RETURN.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Form: 'no minimum or maximum'. Interest 1% per month on form (12%/yr). Line 8 senior exemption credit $20 (65+); Line 9 credit for London Privilege License Fee paid, capped at Line 7. Apportionment Section B: gross income + wages factors averaged. effectiveDate null: ordinance text unreadable; tax dates to 1994. creditAgainst removed at freeze (2026-11-04): London (city) is dropped from this version, so the London Privilege License credit on Laurel line 9 is not applied (conservative; a London location carries a custom city rate).",
"sourceTitle": "Laurel County, Kentucky Net Profit License Fee Return (Form NP)",
"flags": [
"ordinanceUnreadable",
"schoolDistrictLevyUnverified",
"londonCreditNotAppliedCityDropped"
],
"custom": false
},
{
"districtId": "ky-madison-county",
"name": "Madison County",
"kind": "county",
"parentCountyId": "ky-madison-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": true,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profit License Fee Return (online filing only)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cc.madisoncountyky.us/CountyWeb/dist/saas/Ordinances/2006-18.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "County tax applies outside Richmond and Berea city limits. Ord. 06-18 copy has blank dates; predecessor Ord. 87-3 from 1987-07-01. One-time $50 business license application fee (Ord. 2022-11). Penalty 5%/mo, max 25%, min $25; 12%/yr. Online returns only. SPOT-CHECK 2026-11-03: Ord. 2006-18 § 3(1) (PDF): \"measured by 1% of ... the net profit from business conducted in the county\"; no minimum. The ordinance text does not itself exclude Richmond or Berea — the row note \"applies outside Richmond and Berea\" has no document behind it yet (call sheet). Stored as unincorporatedOnly (Madison County's only cities are Richmond and Berea, both excluded). Berea is not in this version's table: a Berea location must be entered as \"inside a city\" with a custom rate so the county row is not applied.",
"informationalFees": [
{
"label": "One-time business license application fee (Ord. 2022-11)",
"cents": 5000
}
],
"sourceTitle": "Madison County Ordinance No. 06-18 (occupational license tax; amends and re-adopts Ord. 87-3)",
"secondSourceUrl": "https://madisoncountyky.gov/finance/occupational-tax/",
"flags": [
"ordinanceDateNotShown",
"countyOutsideCitiesOnly",
"excludesRichmondBerea",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-marion-city",
"name": "City of Marion",
"kind": "city",
"parentCountyId": "ky-crittenden-county",
"base": "netProfit",
"ratePct": 1.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2025-07-01",
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profit License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/marionky/latest/marion_ky/0-0-0-22684",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Ord. 25-08 passed 2025-05-27; the amlegal text gives no effective date. The 2025-07-01 date comes from Crittenden Press (2025-07-11) and the filename of the city's 'Quarterly-return-effective-7-1-25.pdf' (that PDF could not be read). The net-profit form shows one flat 1.5% line with no split-year proration, so it is unconfirmed whether calendar-2025 net profits are prorated (0.75%/1.5%) or taxed entirely at 1.5%. Schedule B averages a business-receipts factor and a wages factor (KRS 67.753 style). Public service, bank, alcohol (gross receipts excluded) and other § 110.22(B) exemptions apply; no dollar exemption. SPOT-CHECK 2026-11-03: city Net Profit Return line 7 \"Marion License fee at 1.5%\"; $50 minimum paid is credited (line 11). DISAGREEMENT on late charges: code § 110 says 5%/month max 25% and 12%/yr; the form says \"Penalty 15% of the amount of the unpaid License Fee\" and \"Interest 2/3 of 1% per month\" (8%/yr). Row keeps the code figures. Call #10. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Ordinance wins: late charges from city code (5%/mo, max 25%, 12%/yr), not the form. With taxYearStart the 1.5% row governs from tax year 2026; tax year 2025 is not computed for Marion.",
"sourceTitle": "Marion, KY Code of Ordinances § 110.22 Occupational License Tax Payment Required (amlegal), Ord. 09-10, am. Ord. 25-08 passed 5-27-25",
"secondSourceUrl": "https://marionky.gov/wp-content/uploads/sites/141/2025/08/NETPROFIT.pdf",
"flags": [
"effectiveDate-from-news-and-form-filename-only",
"proration-of-2025-net-profits-unconfirmed",
"conflict-penalty-interest: form 15% flat + 8%/yr vs ordinance 5%/mo max 25% min $25 + 12%/yr",
"penaltyFormDiffers-codeWins",
"midYearChange-appliedFromTaxYear2026",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-mccracken-county",
"name": "McCracken County",
"kind": "county",
"parentCountyId": "ky-mccracken-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2018-08-13",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": "ky-paducah-city",
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "NETP1 / NETP2 (Rev. 03/2026) — Net Profit License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://mccrackencountyky.gov/wp-content/uploads/2026/03/Net-Profit-License-Fee-Return-1.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate is adoption date of Ord. 2018-05. Ordinance div. (E) exempts businesses whose prior-year net profit did not exceed $2,500; form Line 22: 'if less than $2,500 - ENTER ZERO' (threshold, not prorated exemption). Credit for City of Paducah license fee paid (Line 24, non-refundable). Interest 12%/yr (form says 1%/month). Apportionment payroll + sales averaged (Worksheet Y). SPOT-CHECK 2026-11-03: Net Profit License Fee Return Rev. 03/2026: \"McCracken County License Fee (Line 22 X 1 %)\"; line 24 credit for City of Paducah business license paid (not refundable).",
"sourceTitle": "McCracken County Net Profit License Fee Return NETP1 (Rev. 03/2026)",
"flags": [
"schoolDistrictLevyUnverified",
"effectiveDateIsAdoptionDate",
"thresholdExemption2500",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-newport-city",
"name": "City of Newport",
"kind": "city",
"parentCountyId": "ky-campbell-county",
"base": "grossReceipts",
"ratePct": 0.35,
"appliesBy": "taxYearStart",
"effectiveDate": "2025-07-01",
"supersededDate": null,
"minimumFeeCents": 7500,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": 3310000,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "CN-16 Renewal of Occupational License with CN-12 apportionment",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.newportky.gov/DocumentCenter/View/449/Occupational-License-Handout-2026-2027-An-overview-and-companion-to-CN-2-and-CN-16-pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Gross-receipts license fee 0.35% of prior-year Newport receipts; min $75; max $33,100 for the 2025-26 license year, CPI-adjusted annually and rounded up to the next $100. License year July 1–June 30. CN-12 apportionment: sales + payroll / 2. Ordinance section imposing the fee could not be opened on amlegal; verified from the official handout and form. SPOT-CHECK 2026-11-03: 2026-27 handout: rate .0035 on Newport gross receipts, minimum $75; the $33,100 maximum shown is for the 2025-26 license year; 2026-27 maximum not stated (call sheet). The 2026-27 maximum is not published; the 2025-26 $33,100 maximum is carried.",
"sourceTitle": "City of Newport Occupational License Handout 2026-2027 (companion to CN-2 and CN-16)",
"flags": [
"ordinanceSectionNotOpened",
"capIsCpiIndexedYearly",
"2026-27CapNotStated",
"cap2025-26FigureCarried",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-nicholasville-city",
"name": "City of Nicholasville",
"kind": "city",
"parentCountyId": "ky-jessamine-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2009-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form JCOT 2 (joint; city column)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.nicholasville.org/wp-content/uploads/2020/07/NetProfitsOrdinance.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Ordinance PDF is unnumbered/unsigned copy; effective-date sentence 'shall become effective January 1, 2009'. Payroll 1.5%; net profits 1%. Penalty § 12: 5%/mo, cap 25%, $25 min; 12%/yr. No minimum fee. SPOT-CHECK 2026-11-03: City tax-office page: tax of one percent (1%) of the net profits from business conducted in the City. JCOT 2 line 4 at 1% in the City of Nicholasville column. Ordinance PDF pages not navigable in viewer; city page + form used.",
"sourceTitle": "City of Nicholasville — Ordinance Relating to the Imposition and Administration of an Occupational License Requirement (effective January 1, 2009)",
"secondSourceUrl": "https://jessamineky.gov/wp-content/uploads/2024/12/Net-Profit-Return.pdf",
"flags": [
"ordinanceCopyUnnumbered",
"collectionSplitCountyOfficeCityPayee",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-oldham-county",
"name": "Oldham County",
"kind": "county",
"parentCountyId": "ky-oldham-county",
"base": null,
"ratePct": 0,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": false,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": null,
"maxPct": null,
"minimumCents": null
},
"interestPctPerYear": null,
"sourceUrl": "https://www.lagrangeky.gov/codeenforcement",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "No occupational tax chapter located in the Oldham County Code (amlegal TOC pages errored); county finance page lists no occupational tax forms. Only primary-ish statement is the La Grange city FAQ. School district: no evidence of a KRS 160.605 levy. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Evidence of absence (KACo N/A plus the county's own pages) accepted as verified; shipped as a zero-levy row.",
"sourceTitle": "City of La Grange — Code Enforcement: Business License & Compensation Tax FAQ",
"flags": [
"no-levy",
"primaryCountyDocumentNotLocated",
"schoolDistrictLevyUnverified",
"noLevyApportionmentIrrelevant",
"no-levy-from-documents"
],
"custom": false
},
{
"districtId": "ky-owensboro-city",
"name": "City of Owensboro",
"kind": "city",
"parentCountyId": "ky-daviess-county",
"base": "netProfit",
"ratePct": 1.78,
"appliesBy": "taxYearStart",
"effectiveDate": "2017-07-01",
"supersededDate": null,
"minimumFeeCents": 7500,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form NP-1 Net Profit License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://cms2.revize.com/revize/owensboroky/Documents/Departments/Finance/Occupational%20Net%20Profit%20License%20Fee%20Forms/Net-Profit-Instructions-7-1-2024.pdf?t=202503211005250",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "1.39% → 1.78% on 2017-07-01. $75 greater-of minimum, creditable. Penalty 5%/mo, max 25%, min $25; 12%/yr. Two-factor apportionment. SPOT-CHECK 2026-11-03: NP instructions 7-1-2024 Table A: \"6/30/18 & after 1.78\"; line 8 \"$75 Minimum Annual License Fee Due\".",
"sourceTitle": "City of Owensboro Form NP-1 Instructions (7-1-2024); City License Fee Regulations (2023-04-04) Sec. 3.1",
"flags": [
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-paducah-city",
"name": "City of Paducah",
"kind": "city",
"parentCountyId": "ky-mccracken-county",
"base": "grossReceipts",
"ratePct": null,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "2026 Annual License Tax Application (Business License Form FY2026)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://library.municode.com/ky/paducah/codes/code_of_ordinances?nodeId=COOR_CH106TA_ARTIIIGRRELITA",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "NO net-profits tax. Business license tax on GROSS RECEIPTS with six profitability classes: A .00045 to F .005; city page does not say how classes are assigned. 2026 application: gross receipts up to $5,130,000 × class rate, excess × .00005; minimum fee blank. Threshold: gross receipts over $600/yr must be licensed. Payroll rate 2.0%. ratePct null because rate varies by class and ordinance text could not be opened. SPOT-CHECK 2026-11-03 (Municode in Chrome): Sec. 106-101 rate Schedules A (0.00045) through F (0.005) on taxable gross receipts up to a phased-in threshold (from $3,500,000 rising to $11,650,000), 0.00005 above; schedule depends on business classification (Secs. 106-102 onward, one section per business type); minimum annual license tax $50 per classification, credited against the tax. v1 cannot pick the classification: the row needs requiresUserRate. Apportionment stored as krs67753 (payroll + sales per the 2026 application); the rate itself comes from the user (requiresUserRate).",
"requiresUserRate": true,
"sourceTitle": "Paducah Code Ch. 106 Art. III Gross Receipts License Tax, Sec. 106-101 (amended through Ord. 2025-09-8855)",
"flags": [
"grossReceiptsBaseNotNetProfit",
"rateVariesByClass",
"classifiedScheduleRequiresUserRate",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-pike-county",
"name": "Pike County",
"kind": "county",
"parentCountyId": "ky-pike-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2026-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Pike County Net Profits License Tax Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.pikeky.gov/wp-content/uploads/2026/06/NET-PROFIT-FORMS.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Rate 1.00% on net profits per the 2026 Form NETP1 line 24 (Roland decision 2026-11-03: net-profit line, so 1.00% from tax year 2026). SUPERSEDED FIGURE: 0.50% on net profits per the 12/2019 instructions (Ordinance 06.30.15.002); the date the rate changed from 0.50% to 1.00% is unknown, so the engine applies 1.00% from 2026-01-01 and the table carries no earlier row. Penalty line 27: 5%/month, max 25%, minimum $25; interest 12%/yr. Apportionment Worksheet Y payroll + sales.",
"sourceTitle": "Pike County Tax Administrator Form NETP1, Net Profit License Fee Return (2026 forms, pikeky.gov)",
"secondSourceUrl": "https://www.pikecountyky.gov/wp-content/uploads/2019/12/Pike-County-Net-Profit-License-Instructions.pdf",
"flags": [
"effectiveDateAssumedTaxYear2026",
"priorRateChangeDateUnknown",
"schoolDistrictLevyUnverified",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-pikeville-city",
"name": "City of Pikeville",
"kind": "city",
"parentCountyId": "ky-pike-county",
"base": "netProfit",
"ratePct": 2,
"appliesBy": "taxYearStart",
"effectiveDate": "2021-10-11",
"supersededDate": null,
"minimumFeeCents": 5000,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/pikeville/latest/pikeville_ky/0-0-0-3709",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "2% on both wages and net profits. § 115.13 minimum liability $50 per year, creditable against the tax for that year. § 115.99: 5%/mo, max 25%, min $25; interest 12%/yr. effectiveDate is adoption date of Ord. O-2021-22; base ordinance 0-2008-002 (1-14-2008). Apportionment § 115.04 payroll + sales / 2. Filing via online portal, no posted NP form. SPOT-CHECK 2026-11-03: § 115.03 read on screen: two percent (2%) of net profit from business conducted in the city.",
"sourceTitle": "Pikeville Code of Ordinances § 115.03 Occupational license tax payment required (Ord. 0-2008-002; am. through O-2021-22)",
"flags": [
"effectiveDateIsAdoptionDate",
"noPostedNPForm",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-pulaski-county",
"name": "Pulaski County",
"kind": "county",
"parentCountyId": "ky-pulaski-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "1987-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": {
"ky-somerset-city": 0.8
},
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "NP100 Net Profit License Fee Return (dated 1/13/2016)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://tax.pulaskigov.com/wp-content/uploads/2017/08/Application-NP100.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "County rate 1.0%, but for business inside Somerset city limits the county applies a reduced 0.8% (form Line 24b; reduced 4-1-2015 to 0.9% and 7-1-2015 to 0.8%; ordinance for the reduction not located). effectiveDate 1987-01-01 is the rate effective date stated on the county website. $2,000 net-profit exemption for persons 65+ (Form ERC65). NP100 form dated 2016. SPOT-CHECK 2026-11-03: NP100: line 24a Line 23 × 1% for work in Pulaski County; 24b × .8% for work in Somerset City.",
"sourceTitle": "Pulaski County Form NP100 Net Profit License Fee Return",
"flags": [
"splitRateInsideSomerset0.8",
"formDated2016",
"schoolDistrictLevyUnverified",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-richmond-city",
"name": "City of Richmond",
"kind": "city",
"parentCountyId": "ky-madison-county",
"base": "netProfit",
"ratePct": 2,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-14",
"supersededDate": null,
"minimumFeeCents": 2500,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "City of Richmond Net Profit License Fee Return (OL-S accepted)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://codelibrary.amlegal.com/codes/richmond/latest/richmond_ky/0-0-0-19512",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate is adoption of base Ord. 07-40; rate effective date uncertain. $25 greater-of minimum. § 110.12: 5%/mo, max 25%, min $25; 12%/yr. § 110.04 apportionment not opened. SPOT-CHECK 2026-11-03: § 110.03 read on screen: \"measured by 2% of ... the net profit ... never be less than the sum of $25\". Apportionment: no added factor found in the city code, so the KRS 67.753 statutory default (payroll + sales) applies.",
"sourceTitle": "Richmond Code Ch. 110 Occupational License Tax — payment required (Ord. 07-40, 12-14-07; Am. Ord. 12-30, 9-11-12)",
"flags": [
"apportionmentSectionNotRead",
"effectiveDateIsAdoptionDate",
"apportionmentStatutoryDefault",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-scott-county",
"name": "Scott County",
"kind": "county",
"parentCountyId": "ky-scott-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2004-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": 1000000,
"exemptionProrated": false,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Form NP100 (combined City/County/School columns)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://scottky.gov/wp-content/uploads/2020/04/book2-3400-0-business-regulations-430-3.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Ord. 04-05 Art. II(1)(b): net profit excludes the first $10,000. No proration language found anywhere — exemptionProrated set false (Phase B assumed prorated; corrected). $10,000 exemption applies in the COUNTY column only; City column exemption only for sole proprietors 65+; School column none. Penalty 5%/mo, max 25%, $25 min per jurisdiction; 12%/yr. Quarterly estimates if > $5,000. effectiveDate from predecessor Ord. #0308 applying to tax years from 1-1-2004. No minimum license fee in the ordinance. SPOT-CHECK 2026-11-03: Current NP100 (opened in Chrome, internal file title 2019 booklet, posted 2025-03-11): column B Scott County rate 1%, net profit exemption $10,000 preprinted in column B only. GSCRC Regulations §3.2/§4.1B agree.",
"sourceTitle": "Scott County Ordinance #04-05 — An Ordinance Relating to License Taxes Upon All Persons and Business Entities Within the County of Scott",
"secondSourceUrl": "https://www.gscrevenueky.gov/assets/files/uploads/_20250311091718766_7d3cbe10c48e4d599ae2e6f7f9201f4b.pdf",
"flags": [
"prorationNotInAnyDocument",
"ordinanceNumberingGarbled",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-scott-schools",
"name": "Scott County Schools occupational license tax",
"kind": "school",
"parentCountyId": "ky-scott-county",
"base": "netProfit",
"ratePct": 0.5,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": false,
"residentsOnlyPayroll": true,
"formId": "Form NP100 (School column)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.scott.kyschools.us/departments/business-finance/tax-collection",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Net-profit component reaches NON-RESIDENT business entities (Regulations §4.1C); payroll component residents only. Levy instrument: Board resolution 8-10-2004 (not opened). No exemption in the school column. Statutory basis KRS 160.605 inferred from wording. RESOLVED 2026-11-02 from GSCRC Regulations §3.3(2)(a) and §4.1(C): net-profit tax applies to resident and non-resident business entities including independent contractors; wage portion residents only; no exemption in the school column. SPOT-CHECK 2026-11-03: NP100 column C Scott County Schools rate 0.50%; exemption line blacked out (no exemption). Regulations §3.3(2)(a) and §4.1(C): applies to resident and non-resident business entities incl. independent contractors.",
"sourceTitle": "Scott County Schools — Business & Finance: Tax Collection",
"secondSourceUrl": "https://www.gscrevenueky.gov/assets/files/uploads/_20250311091718766_7d3cbe10c48e4d599ae2e6f7f9201f4b.pdf",
"flags": [
"boardResolutionNotOpened",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-shelby-county",
"name": "Shelby County",
"kind": "county",
"parentCountyId": "ky-shelby-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-12-04",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": 1500000,
"exemptionCents": 1000000,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": true,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profits License Fee Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://shelbycounty.ky.gov/departments/Occupational%20Licensing/Ordinance%20CH%20112%20BUS%20OCCUP%20LIC%20FEES.pdf",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "SCOPE: the county office says the net-profit fee applies to activity in the UNINCORPORATED area. § 112.01 defines the county as including Shelbyville and Simpsonville, but § 112.03(E)(8) lets persons who pay a city license fee credit it against the county fee. With Shelbyville at 1% net profit, county net-profit tax on in-city business is effectively offset. § 112.04: net profit x (payroll + sales factors)/2. Max $15,000 per business per year. Fee CONFLICT: the ordinance says initial fee $25; the county page and 'Updated OL Fee' notice say $75 registration and $75 annual renewal (modeled as flatLicenseFee; not stated whether it is creditable). Return due April 15 / 15th day of 4th month. effectiveDate is the passage date of the current codified ordinance; original ordinance dated 1990-03-22. Nonprofits exempt from the net-profit fee. SPOT-CHECK 2026-11-03: Net Profits License Fee Return: \"The Net Profits License Fee tax rate is 1%\"; \"The first $10,000 of business and farm income is exempt\"; tax limited to activity \"in the unincorporated area of Shelby County\". Business license fee: ordinance $25 vs county page $75 (flat-fee decision).",
"informationalFees": [
{
"label": "Business license fee (ordinance $25; county page says $75 — ordinance wins)",
"cents": 2500
}
],
"sourceTitle": "Shelby County Code Ch. 112 Business and Occupation License Fees (Ord. 12-04-09, passed 12-4-2007), posted on shelbycounty.ky.gov",
"secondSourceUrl": "https://shelbycounty.ky.gov:443/departments/Occupational%20Licensing/Net%20Profits%20License%20Fee%20Return.pdf",
"flags": [
"effectiveDate-is-ordinance-passage-date",
"exemptionProrated-unknown",
"conflict-license-fee: ordinance $25 vs county page $75",
"county-net-profit-applies-to-unincorporated-area / city-fee credit (§112.03(E)(8))",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-shelbyville-city",
"name": "City of Shelbyville",
"kind": "city",
"parentCountyId": "ky-shelby-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2025-08-07",
"supersededDate": null,
"minimumFeeCents": 7500,
"minimumFeeCreditable": true,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": null,
"maxPct": null,
"minimumCents": null
},
"interestPctPerYear": null,
"sourceUrl": "https://codelibrary.amlegal.com/codes/shelbyvilleky/latest/shelbyville_ky/0-0-0-14209",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Split rates: 1.5% on wages (withholding), 1% on business net profit. Per § 60.003(C) the $75 minimum 'shall be credited upon the payment of the annual license fee' (creditable). § 60.003 was amended by Ord. 2025-08-07(B), passed 2025-08-07; what that amendment changed (wage or net-profit rate) and its effective date are unknown, so a 2025 transition row may be needed. Penalty (Ord. 2011-11-17(A) amended the failure-to-file penalty), interest and apportionment sections were not retrieved. Rule of 2026-11-04 (Roland): settled from published documents only, no calls; flat license fees informational only. Effective date unknown, so the adoption date of the latest amendment (Ord. 2025-08-07(B), passed 2025-08-07) is used; with taxYearStart the row governs from tax year 2026 and tax year 2025 is not computed for Shelbyville. Apportionment: no added factor found, so the KRS 67.753 statutory default applies.",
"sourceTitle": "Shelbyville, KY Code of Ordinances § 60.003 Occupational License Tax Payment Required (amlegal, 2026 S-29); Ord. 2008-06-05(B), am. 2010-04-15, am. 2025-08-07(B)",
"secondSourceUrl": null,
"flags": [
"single-primary-source",
"effectiveDate-unknown",
"2025-amendment-content-unknown (possible transition row)",
"penalty-interest-unconfirmed",
"apportionment-unconfirmed",
"formId-unknown",
"singleSourceProtocol",
"effectiveDate-isAdoptionDateOfLatestAmendment",
"apportionmentStatutoryDefault",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-shepherdsville-city",
"name": "City of Shepherdsville",
"kind": "city",
"parentCountyId": "ky-bullitt-county",
"base": null,
"ratePct": 0,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": false,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": null,
"interestPctPerYear": null,
"sourceUrl": "https://codelibrary.amlegal.com/codes/shepherdsville/latest/shepherdsville_ky/0-0-0-3222",
"verifiedOn": "2026-11-03",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Code section imposes the tax ONLY on wages (2% payroll). No net-profit measure or return found; flat $100/yr business license. Other Ch. 111 sections unreadable (amlegal client errors), so a net-profit provision elsewhere cannot be fully excluded. SPOT-CHECK 2026-11-03 (Chrome, full ch. 111 and ch. 110 read): no net-profit or gross-receipts measure anywhere in ch. 111; the tax is 2% of employee compensation only. DISAGREEMENT: the row carries no flat fee, but § 110.04(B)(4) charges every other business a $100 annual license fee (prorated monthly). Under the Wilmore precedent that is flatLicenseFeeCents 10000. Row left unchanged pending Roland. Also: § 111.06(A) says \"All business entity returns ... shall be made by April 15\", so a return may be required at zero payroll (filingRequired unclear). Option B: $100 fee informational. Whether a no-payroll business must still file under § 111.06 is not settled by the documents, so filingRequired is false.",
"informationalFees": [
{
"label": "Annual business license, § 110.04(B)(4), prorated by month",
"cents": 10000
}
],
"sourceTitle": "Shepherdsville Code § 111.03 Occupational License Tax Payment Required (Ord. 014-171; Ord. 022-052)",
"secondSourceUrl": "https://codelibrary.amlegal.com/codes/shepherdsville/latest/shepherdsville_ky/0-0-0-3107",
"flags": [
"payrollOnly2pct",
"filingRequirementUnresolved",
"noLevyApportionmentIrrelevant",
"flatFeeInformationalOnly"
],
"custom": false
},
{
"districtId": "ky-somerset-city",
"name": "City of Somerset",
"kind": "city",
"parentCountyId": "ky-pulaski-county",
"base": "netProfit",
"ratePct": 0.6,
"appliesBy": "taxYearStart",
"effectiveDate": "2013-01-01",
"supersededDate": "2025-12-31",
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profits Tax Return (Form 1, Revised 9/28/15)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.cityofsomerset.com/wp-content/uploads/2025/06/Ordinance-25-14-Occupational-Tax.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Transition row: prior rate per Ord. 13-02 as amended by Ord. 25-14 (2)(a). effectiveDate 2013-01-01 is a placeholder for the Ord. 13-02 era; only the supersededDate matters for tax years 2025 and later.",
"sourceTitle": "City of Somerset Ordinance 25-14 (first reading 2025-05-12, second reading 2025-05-29), amending Ord. 13-02",
"flags": [
"transitionRow",
"priorEffectiveDatePlaceholder",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-somerset-city",
"name": "City of Somerset",
"kind": "city",
"parentCountyId": "ky-pulaski-county",
"base": "netProfit",
"ratePct": 1.2,
"appliesBy": "taxYearStart",
"effectiveDate": "2026-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Net Profits Tax Return (Form 1, Revised 9/28/15)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.cityofsomerset.com/wp-content/uploads/2025/06/Ordinance-25-14-Occupational-Tax.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "RATE UNDER TRANSITION. Prior rate 0.6% net profits per Ordinance 13-02; current quarterly payroll form (3/2026) shows 1.2%. The 1.2% NET PROFITS rate comes from news reports of Ord. 25-14. Penalty 5%/mo, 25% max, $25 min; 12%/yr. One-time $25 registration fee. County applies reduced 0.8% inside Somerset. RESOLVED 2026-11-03 from Ord. 25-14 read in Chrome: net profit 0.6% prior to 2026-01-01; 1.2% on or after 2026-01-01 (business conducted). Payroll 0.6% to 2025-06-30, 0.9% to 2025-12-31, 1.2% from 2026-01-01.",
"sourceTitle": "City of Somerset Ordinance 25-14 (first reading 2025-05-12, second reading 2025-05-29), amending Ord. 13-02",
"flags": [
"postedNPFormShows0.6",
"rateChange2026",
"postedNPFormStale0.6",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-taylor-county",
"name": "Taylor County",
"kind": "county",
"parentCountyId": "ky-taylor-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": null,
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": null,
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": null,
"interestPctPerYear": null,
"sourceUrl": "https://taylorcountyky.gov/occupational-tax",
"verifiedOn": "2026-11-04",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Added at freeze (2026-11-04) because the Campbellsville rows need their county in the table. Rate from the county collecting office page (rank 2), one document under the protocol. The page does not say whether the county 1% also applies inside Campbellsville; the statewide default (county and city levies stack unless an ordinance excludes the city) is applied, as with Jessamine/Nicholasville and Scott/Georgetown. \"No company that pays a franchise tax to the county shall be required to pay a license fee on net profits\" (not modeled; sole proprietors pay no county franchise tax). Late penalty and interest not stated (null).",
"sourceTitle": "Taylor County Occupational Tax Office page",
"flags": [
"singleSourceProtocol",
"countywideScope-stackingDefault",
"effectiveDate-unknown",
"penaltyInterestNotStated",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-warren-county",
"name": "Warren County",
"kind": "county",
"parentCountyId": "ky-warren-county",
"base": "netProfit",
"ratePct": 1,
"appliesBy": "taxYearStart",
"effectiveDate": "2007-07-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": false,
"excludedWithinCityIds": [
"ky-bowling-green-city"
],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": "Occupational Business License - Net Profit Return (2026)",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://www.warrencountyky.gov/wp-content/uploads/2026/09/2026-Net-Profit-Return-Form-2.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "effectiveDate is the ordinance's stated effective date (2007-07-01). County levy applies outside Bowling Green city limits (county and city do not both tax the same dollar). Ordinance §3(3) lets Fiscal Court set up to a $10,000 exemption by order; none on the 2026 form. Two-factor apportionment on form. Due April 15. SPOT-CHECK 2026-11-03: 2026 Net Profit Return: \"License Fee 1.000% of Line 9\"; no minimum.",
"sourceTitle": "Warren County Occupational Business License - Net Profit Return (2026 form); Warren County Fiscal Court Occupational Tax Ordinance (2007)",
"flags": [
"ordinanceCopyUnsignedDraft",
"possibleExemptionByOrderUnconfirmed",
"countyOutsideCityOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-warren-schools",
"name": "Warren County Public Schools occupational license tax",
"kind": "school",
"parentCountyId": "ky-warren-county",
"base": "netProfit",
"ratePct": 0.5,
"appliesBy": "taxYearStart",
"effectiveDate": "2008-01-01",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": null,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [
"ky-bowling-green-city"
],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": true,
"residentsOnlyPayroll": true,
"formId": "Warren County Schools Net Profit Tax Return",
"latePenalty": {
"pctPerMonth": 5,
"maxPct": 25,
"minimumCents": 2500
},
"interestPctPerYear": 12,
"sourceUrl": "https://resources.finalsite.net/images/v1693491485/warrencountyschoolsorg/uinhkmm0z7rtbo43uwuu/OccupationalTaxOrdinanceeffectiveasof01-01-2008.pdf",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "Net profits of resident business entities conducted in the Warren County School District; Bowling Green Independent SD is separate (no BGISD tax found). Wage rate 0.5% for Warren County residents working in the county. residentsOnly: true. Penalty 5%/mo, max 25%, min $25; 12%/yr. SPOT-CHECK 2026-11-03: Ordinance (eff. 1-1-2008) § 3(1)(b): one-half of one percent of \"the net profit from business conducted in the school district by a resident business entity\". Stored with excludedWithinCityIds [ky-bowling-green-city]: Bowling Green Independent is a separate school district with no occupational tax, and its territory is approximated by the Bowling Green city limits.",
"sourceTitle": "School District of Warren County Ordinance No. 46 (effective 01-01-2008); WCPS Net Profit Tax Return and Instructions",
"flags": [
"residentsOnly",
"confirmApplicabilityInsideBowlingGreen",
"bgIndependentApproximatedByCityLimits",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
},
{
"districtId": "ky-wilmore-city",
"name": "City of Wilmore",
"kind": "city",
"parentCountyId": "ky-jessamine-county",
"base": "netProfit",
"ratePct": 2,
"appliesBy": "taxYearStart",
"effectiveDate": "2017-11-20",
"supersededDate": null,
"minimumFeeCents": null,
"minimumFeeCreditable": false,
"flatLicenseFeeCents": null,
"capCents": null,
"exemptionCents": null,
"exemptionProrated": null,
"apportionment": "krs67753",
"unincorporatedOnly": null,
"excludedWithinCityIds": [],
"rateInsideCity": null,
"creditAgainst": null,
"filingRequired": true,
"residentsOnlyNetProfit": null,
"residentsOnlyPayroll": null,
"formId": null,
"latePenalty": {
"pctPerMonth": null,
"maxPct": null,
"minimumCents": 2500
},
"interestPctPerYear": null,
"sourceUrl": "https://codelibrary.amlegal.com/codes/wilmoreky/latest/wilmore_ky/0-0-0-3098",
"verifiedOn": "2026-11-02",
"verified": true,
"spotChecked": true,
"stub": false,
"notes": "2% on wages and net profit. Separate $50 annual business license in addition to the 2% (not creditable), $25 for new businesses after July 1. Penalty %, interest, apportionment are in other Ch. 111 sections not opened. Wilmore is NOT on the joint JCOT 2. Combined inside Wilmore: 3% on net profit. SPOT-CHECK 2026-11-03: Ordinance 111.17 re-read: 2% of net profit; $50 license in addition. City Hall page: net profit license fee 2%; business license $50/yr, or $5/day for 10 days or fewer in city limits; prorated $25 after June 30. Phone 859-858-4411. NEW: $5/day short-term license option relevant to mobile service providers (not modelled in v1). Apportionment: no added factor found in the city code, so the KRS 67.753 statutory default (payroll + sales) applies. Flat fee moved to informationalFees (option B, 2026-11-04); not computed.",
"informationalFees": [
{
"label": "Annual business license (in addition to the 2%; $25 for new businesses after July 1)",
"cents": 5000
}
],
"sourceTitle": "Wilmore Code of Ordinances § 111.17 Occupational License Tax Payment Required (Ord. 10-17, passed 11-20-2017)",
"secondSourceUrl": "https://wilmore.org/city-hall/",
"flags": [
"dailyLicenseOptionNotModelled",
"apportionmentStatutoryDefault",
"flatFeeInformationalOnly",
"filingRequired-modelOrdinanceDefault"
],
"custom": false
}
];
return { TIER1_FROZEN_ON, TIER1_META, TIER1 };
})();
// ---- data_zip_candidates ----
const data_zip_candidates = (() => {
// Generated by tools/zip-candidates.mjs on 2026-11-04 from the Census Bureau 2020 relationship files:
// ZCTA-to-County: tab20_zcta520_county20_natl.txt
// ZCTA-to-Place: tab20_zcta520_place20_natl.txt
// A ZIP never decides a jurisdiction; it only narrows the choice. counties are ordered by land-area share
// (a county is kept above a 5% share, or when it is the largest of all); cities lists the mapped cities the ZIP
// touches; outside marks a ZIP with more than 5% of its land in counties that are not in the table.
// ZIP_STUB stays exported (false) because earlier modules and tests import it.
const ZIP_STUB = false;
const ZIP_CANDIDATES = {
'40003': { counties: ['ky-shelby-county', 'ky-franklin-county'], cities: [] },
'40009': { counties: ['ky-taylor-county'], cities: [], outside: true },
'40010': { counties: ['ky-oldham-county'], cities: [] },
'40013': { counties: ['ky-bullitt-county'], cities: [], outside: true },
'40014': { counties: ['ky-oldham-county'], cities: [] },
'40019': { counties: ['ky-shelby-county'], cities: [], outside: true },
'40022': { counties: ['ky-shelby-county'], cities: [] },
'40023': { counties: ['ky-jefferson-metro', 'ky-shelby-county'], cities: [], outside: true },
'40025': { counties: ['ky-jefferson-metro'], cities: [] },
'40026': { counties: ['ky-oldham-county'], cities: [] },
'40031': { counties: ['ky-oldham-county'], cities: ['ky-la-grange-city'], outside: true },
'40041': { counties: ['ky-jefferson-metro'], cities: [] },
'40046': { counties: ['ky-shelby-county'], cities: [], outside: true },
'40047': { counties: ['ky-bullitt-county'], cities: [] },
'40055': { counties: ['ky-oldham-county'], cities: [], outside: true },
'40056': { counties: ['ky-oldham-county'], cities: [] },
'40057': { counties: ['ky-shelby-county'], cities: [], outside: true },
'40059': { counties: ['ky-oldham-county', 'ky-jefferson-metro'], cities: [] },
'40065': { counties: ['ky-shelby-county'], cities: ['ky-shelbyville-city'] },
'40067': { counties: ['ky-shelby-county'], cities: [] },
'40068': { counties: ['ky-shelby-county', 'ky-oldham-county'], cities: [], outside: true },
'40071': { counties: ['ky-bullitt-county'], cities: [], outside: true },
'40076': { counties: ['ky-shelby-county'], cities: [], outside: true },
'40077': { counties: ['ky-oldham-county'], cities: [] },
'40109': { counties: ['ky-bullitt-county'], cities: [] },
'40110': { counties: ['ky-bullitt-county'], cities: ['ky-shepherdsville-city'] },
'40118': { counties: ['ky-jefferson-metro'], cities: [] },
'40121': { counties: ['ky-hardin-county'], cities: [], outside: true },
'40150': { counties: ['ky-bullitt-county'], cities: ['ky-shepherdsville-city'] },
'40160': { counties: ['ky-hardin-county'], cities: [] },
'40162': { counties: ['ky-hardin-county'], cities: [] },
'40165': { counties: ['ky-bullitt-county'], cities: ['ky-shepherdsville-city'] },
'40175': { counties: ['ky-hardin-county'], cities: [], outside: true },
'40177': { counties: ['ky-bullitt-county', 'ky-hardin-county', 'ky-jefferson-metro'], cities: [] },
'40202': { counties: ['ky-jefferson-metro'], cities: [] },
'40203': { counties: ['ky-jefferson-metro'], cities: [] },
'40204': { counties: ['ky-jefferson-metro'], cities: [] },
'40205': { counties: ['ky-jefferson-metro'], cities: [] },
'40206': { counties: ['ky-jefferson-metro'], cities: [] },
'40207': { counties: ['ky-jefferson-metro'], cities: [] },
'40208': { counties: ['ky-jefferson-metro'], cities: [] },
'40209': { counties: ['ky-jefferson-metro'], cities: [] },
'40210': { counties: ['ky-jefferson-metro'], cities: [] },
'40211': { counties: ['ky-jefferson-metro'], cities: [] },
'40212': { counties: ['ky-jefferson-metro'], cities: [] },
'40213': { counties: ['ky-jefferson-metro'], cities: [] },
'40214': { counties: ['ky-jefferson-metro'], cities: [] },
'40215': { counties: ['ky-jefferson-metro'], cities: [] },
'40216': { counties: ['ky-jefferson-metro'], cities: [] },
'40217': { counties: ['ky-jefferson-metro'], cities: [] },
'40218': { counties: ['ky-jefferson-metro'], cities: [] },
'40219': { counties: ['ky-jefferson-metro'], cities: [] },
'40220': { counties: ['ky-jefferson-metro'], cities: [] },
'40221': { counties: ['ky-jefferson-metro'], cities: [] },
'40222': { counties: ['ky-jefferson-metro'], cities: [] },
'40223': { counties: ['ky-jefferson-metro'], cities: [] },
'40228': { counties: ['ky-jefferson-metro'], cities: [] },
'40229': { counties: ['ky-jefferson-metro', 'ky-bullitt-county'], cities: [] },
'40231': { counties: ['ky-jefferson-metro'], cities: [] },
'40241': { counties: ['ky-jefferson-metro'], cities: [] },
'40242': { counties: ['ky-jefferson-metro'], cities: [] },
'40243': { counties: ['ky-jefferson-metro'], cities: [] },
'40245': { counties: ['ky-jefferson-metro', 'ky-shelby-county'], cities: [] },
'40258': { counties: ['ky-jefferson-metro'], cities: [] },
'40272': { counties: ['ky-jefferson-metro'], cities: [] },
'40280': { counties: ['ky-jefferson-metro'], cities: [] },
'40291': { counties: ['ky-jefferson-metro'], cities: [] },
'40299': { counties: ['ky-jefferson-metro'], cities: [] },
'40324': { counties: ['ky-scott-county'], cities: ['ky-georgetown-city'] },
'40339': { counties: ['ky-jessamine-county'], cities: [] },
'40347': { counties: ['ky-franklin-county', 'ky-scott-county'], cities: [], outside: true },
'40356': { counties: ['ky-jessamine-county'], cities: ['ky-nicholasville-city', 'ky-wilmore-city'] },
'40370': { counties: ['ky-scott-county'], cities: [], outside: true },
'40379': { counties: ['ky-scott-county', 'ky-franklin-county'], cities: [] },
'40385': { counties: ['ky-madison-county'], cities: [] },
'40390': { counties: ['ky-jessamine-county'], cities: ['ky-wilmore-city'] },
'40403': { counties: ['ky-madison-county'], cities: ['ky-richmond-city'], outside: true },
'40404': { counties: ['ky-madison-county'], cities: [] },
'40419': { counties: ['ky-pulaski-county'], cities: [], outside: true },
'40461': { counties: ['ky-madison-county'], cities: [], outside: true },
'40475': { counties: ['ky-madison-county'], cities: ['ky-richmond-city'] },
'40502': { counties: ['ky-fayette-lfucg'], cities: [] },
'40503': { counties: ['ky-fayette-lfucg'], cities: [] },
'40504': { counties: ['ky-fayette-lfucg'], cities: [] },
'40505': { counties: ['ky-fayette-lfucg'], cities: [] },
'40507': { counties: ['ky-fayette-lfucg'], cities: [] },
'40508': { counties: ['ky-fayette-lfucg'], cities: [] },
'40509': { counties: ['ky-fayette-lfucg'], cities: [], outside: true },
'40510': { counties: ['ky-fayette-lfucg'], cities: [] },
'40511': { counties: ['ky-fayette-lfucg'], cities: [] },
'40513': { counties: ['ky-fayette-lfucg'], cities: [] },
'40514': { counties: ['ky-fayette-lfucg'], cities: [] },
'40515': { counties: ['ky-fayette-lfucg', 'ky-jessamine-county'], cities: [], outside: true },
'40516': { counties: ['ky-fayette-lfucg'], cities: [], outside: true },
'40517': { counties: ['ky-fayette-lfucg'], cities: [] },
'40526': { counties: ['ky-fayette-lfucg'], cities: [] },
'40536': { counties: ['ky-fayette-lfucg'], cities: [] },
'40601': { counties: ['ky-franklin-county'], cities: ['ky-frankfort-city'], outside: true },
'40701': { counties: ['ky-laurel-county'], cities: [], outside: true },
'40729': { counties: ['ky-laurel-county'], cities: [] },
'40737': { counties: ['ky-laurel-county'], cities: [] },
'40740': { counties: ['ky-laurel-county'], cities: [] },
'40741': { counties: ['ky-laurel-county'], cities: [] },
'40744': { counties: ['ky-laurel-county'], cities: [] },
'41001': { counties: ['ky-campbell-county'], cities: [] },
'41005': { counties: ['ky-boone-county'], cities: [] },
'41006': { counties: ['ky-campbell-county'], cities: [], outside: true },
'41007': { counties: ['ky-campbell-county'], cities: [], outside: true },
'41011': { counties: ['ky-kenton-county'], cities: ['ky-covington-city', 'ky-fort-mitchell-city'] },
'41014': { counties: ['ky-kenton-county'], cities: ['ky-covington-city'] },
'41015': { counties: ['ky-kenton-county'], cities: ['ky-covington-city', 'ky-independence-city'] },
'41016': { counties: ['ky-kenton-county'], cities: ['ky-covington-city'] },
'41017': { counties: ['ky-kenton-county'], cities: ['ky-edgewood-city', 'ky-covington-city', 'ky-fort-mitchell-city', 'ky-erlanger-city'] },
'41018': { counties: ['ky-kenton-county', 'ky-boone-county'], cities: ['ky-erlanger-city', 'ky-elsmere-city', 'ky-florence-city', 'ky-independence-city', 'ky-edgewood-city'] },
'41030': { counties: ['ky-kenton-county', 'ky-boone-county'], cities: [], outside: true },
'41033': { counties: ['ky-kenton-county'], cities: [], outside: true },
'41042': { counties: ['ky-boone-county', 'ky-kenton-county'], cities: ['ky-florence-city', 'ky-elsmere-city', 'ky-independence-city', 'ky-erlanger-city'] },
'41048': { counties: ['ky-boone-county'], cities: [] },
'41051': { counties: ['ky-kenton-county'], cities: ['ky-independence-city', 'ky-erlanger-city', 'ky-covington-city', 'ky-edgewood-city'] },
'41059': { counties: ['ky-campbell-county'], cities: [] },
'41063': { counties: ['ky-kenton-county'], cities: [] },
'41071': { counties: ['ky-campbell-county'], cities: ['ky-newport-city', 'ky-fort-thomas-city'] },
'41073': { counties: ['ky-campbell-county'], cities: [] },
'41074': { counties: ['ky-campbell-county'], cities: ['ky-fort-thomas-city'] },
'41075': { counties: ['ky-campbell-county'], cities: ['ky-fort-thomas-city', 'ky-newport-city'] },
'41076': { counties: ['ky-campbell-county'], cities: ['ky-fort-thomas-city'] },
'41080': { counties: ['ky-boone-county'], cities: [] },
'41085': { counties: ['ky-campbell-county'], cities: [] },
'41091': { counties: ['ky-boone-county'], cities: ['ky-florence-city'] },
'41092': { counties: ['ky-boone-county'], cities: [], outside: true },
'41094': { counties: ['ky-boone-county', 'ky-kenton-county'], cities: ['ky-independence-city'] },
'41501': { counties: ['ky-pike-county'], cities: ['ky-pikeville-city'] },
'41503': { counties: ['ky-pike-county'], cities: [] },
'41512': { counties: ['ky-pike-county'], cities: [] },
'41513': { counties: ['ky-pike-county'], cities: [] },
'41514': { counties: ['ky-pike-county'], cities: [] },
'41519': { counties: ['ky-pike-county'], cities: [] },
'41522': { counties: ['ky-pike-county'], cities: [] },
'41524': { counties: ['ky-pike-county'], cities: [] },
'41526': { counties: ['ky-pike-county'], cities: [] },
'41527': { counties: ['ky-pike-county'], cities: [] },
'41528': { counties: ['ky-pike-county'], cities: [] },
'41531': { counties: ['ky-pike-county'], cities: [] },
'41534': { counties: ['ky-pike-county'], cities: [] },
'41535': { counties: ['ky-pike-county'], cities: [] },
'41537': { counties: ['ky-pike-county'], cities: [], outside: true },
'41538': { counties: ['ky-pike-county'], cities: [] },
'41539': { counties: ['ky-pike-county'], cities: [] },
'41540': { counties: ['ky-pike-county'], cities: [] },
'41543': { counties: ['ky-pike-county'], cities: [] },
'41544': { counties: ['ky-pike-county'], cities: [] },
'41547': { counties: ['ky-pike-county'], cities: [] },
'41548': { counties: ['ky-pike-county'], cities: [] },
'41553': { counties: ['ky-pike-county'], cities: [] },
'41554': { counties: ['ky-pike-county'], cities: [] },
'41555': { counties: ['ky-pike-county'], cities: [] },
'41557': { counties: ['ky-pike-county'], cities: [] },
'41558': { counties: ['ky-pike-county'], cities: [] },
'41559': { counties: ['ky-pike-county'], cities: [] },
'41560': { counties: ['ky-pike-county'], cities: [] },
'41562': { counties: ['ky-pike-county'], cities: [] },
'41563': { counties: ['ky-pike-county'], cities: [] },
'41564': { counties: ['ky-pike-county'], cities: [] },
'41566': { counties: ['ky-pike-county'], cities: [] },
'41567': { counties: ['ky-pike-county'], cities: [] },
'41568': { counties: ['ky-pike-county'], cities: [] },
'41571': { counties: ['ky-pike-county'], cities: [] },
'41572': { counties: ['ky-pike-county'], cities: [] },
'41605': { counties: ['ky-pike-county'], cities: [], outside: true },
'41659': { counties: ['ky-pike-county'], cities: [], outside: true },
'42001': { counties: ['ky-mccracken-county'], cities: ['ky-paducah-city'] },
'42003': { counties: ['ky-mccracken-county'], cities: ['ky-paducah-city'] },
'42027': { counties: ['ky-mccracken-county'], cities: [], outside: true },
'42037': { counties: ['ky-crittenden-county'], cities: [] },
'42053': { counties: ['ky-mccracken-county'], cities: [], outside: true },
'42064': { counties: ['ky-crittenden-county'], cities: ['ky-marion-city'] },
'42069': { counties: ['ky-mccracken-county'], cities: [], outside: true },
'42078': { counties: ['ky-crittenden-county'], cities: [], outside: true },
'42082': { counties: ['ky-mccracken-county'], cities: [], outside: true },
'42086': { counties: ['ky-mccracken-county'], cities: [] },
'42101': { counties: ['ky-warren-county'], cities: ['ky-bowling-green-city'], outside: true },
'42103': { counties: ['ky-warren-county'], cities: ['ky-bowling-green-city'] },
'42104': { counties: ['ky-warren-county'], cities: ['ky-bowling-green-city'], outside: true },
'42122': { counties: ['ky-warren-county'], cities: ['ky-bowling-green-city'], outside: true },
'42159': { counties: ['ky-warren-county'], cities: [] },
'42170': { counties: ['ky-warren-county'], cities: [], outside: true },
'42171': { counties: ['ky-warren-county'], cities: [], outside: true },
'42215': { counties: ['ky-christian-county'], cities: [], outside: true },
'42217': { counties: ['ky-christian-county'], cities: [] },
'42223': { counties: ['ky-christian-county'], cities: [], outside: true },
'42232': { counties: ['ky-christian-county'], cities: [], outside: true },
'42236': { counties: ['ky-christian-county'], cities: [], outside: true },
'42240': { counties: ['ky-christian-county'], cities: ['ky-hopkinsville-city'] },
'42254': { counties: ['ky-christian-county'], cities: [] },
'42262': { counties: ['ky-christian-county'], cities: ['ky-hopkinsville-city'] },
'42266': { counties: ['ky-christian-county'], cities: ['ky-hopkinsville-city'], outside: true },
'42274': { counties: ['ky-warren-county'], cities: [], outside: true },
'42286': { counties: ['ky-christian-county'], cities: [], outside: true },
'42301': { counties: ['ky-daviess-county'], cities: ['ky-owensboro-city'] },
'42303': { counties: ['ky-daviess-county'], cities: ['ky-owensboro-city'] },
'42348': { counties: ['ky-daviess-county'], cities: [], outside: true },
'42351': { counties: ['ky-daviess-county'], cities: [], outside: true },
'42355': { counties: ['ky-daviess-county'], cities: [] },
'42356': { counties: ['ky-daviess-county'], cities: [] },
'42366': { counties: ['ky-daviess-county'], cities: [], outside: true },
'42376': { counties: ['ky-daviess-county'], cities: [], outside: true },
'42378': { counties: ['ky-daviess-county'], cities: [], outside: true },
'42408': { counties: ['ky-christian-county'], cities: [], outside: true },
'42411': { counties: ['ky-crittenden-county'], cities: [], outside: true },
'42450': { counties: ['ky-crittenden-county'], cities: [], outside: true },
'42453': { counties: ['ky-christian-county'], cities: [], outside: true },
'42459': { counties: ['ky-crittenden-county'], cities: [], outside: true },
'42464': { counties: ['ky-christian-county'], cities: [], outside: true },
'42501': { counties: ['ky-pulaski-county'], cities: ['ky-somerset-city'] },
'42503': { counties: ['ky-pulaski-county'], cities: ['ky-somerset-city'] },
'42518': { counties: ['ky-pulaski-county'], cities: [], outside: true },
'42519': { counties: ['ky-pulaski-county'], cities: [] },
'42533': { counties: ['ky-pulaski-county'], cities: ['ky-somerset-city'] },
'42544': { counties: ['ky-pulaski-county'], cities: [], outside: true },
'42553': { counties: ['ky-pulaski-county'], cities: ['ky-somerset-city'] },
'42567': { counties: ['ky-pulaski-county'], cities: [], outside: true },
'42701': { counties: ['ky-hardin-county'], cities: ['ky-elizabethtown-city'] },
'42712': { counties: ['ky-hardin-county'], cities: [], outside: true },
'42716': { counties: ['ky-taylor-county'], cities: [], outside: true },
'42718': { counties: ['ky-taylor-county'], cities: ['ky-campbellsville-city'], outside: true },
'42724': { counties: ['ky-hardin-county'], cities: ['ky-elizabethtown-city'] },
'42732': { counties: ['ky-hardin-county'], cities: [] },
'42733': { counties: ['ky-taylor-county'], cities: [], outside: true },
'42740': { counties: ['ky-hardin-county'], cities: [] },
'42758': { counties: ['ky-taylor-county'], cities: [] },
'42776': { counties: ['ky-hardin-county'], cities: [], outside: true },
'42784': { counties: ['ky-hardin-county'], cities: [], outside: true },
'42788': { counties: ['ky-hardin-county'], cities: [] }
};
return { ZIP_STUB, ZIP_CANDIDATES };
})();
// ---- io ----
const io = (() => {
const { SCHEDULE_C_LINES, INCOME_LINES, txnHash, parseMoney, isIsoDate, normalizeDescription } = book;
// io.js — layer 3. Save-file serialize, parse/validate and migrate. Pure: returns codes, never sentences.
const FORMAT = 'ky-local-tax-ledger';
// WO-11 J3: schema 2 adds name, taxPayments and settings.setAsideBalanceCents. Version 1 files still open (migrate).
const CURRENT_SCHEMA_VERSION = 2;
const MAX_FILE_BYTES = 20 * 1024 * 1024;
// R19: .kyledger.json / application/json (settled 2026-11-03)
const SAVE_EXTENSION = '.kyledger.json';
const SAVE_MIME = 'application/json';
const ERROR_CODES = ['json', 'tooLarge', 'format', 'tooNew', 'required', 'unknownKey', 'type', 'enum',
'pattern', 'range', 'date', 'duplicateId', 'refMissing', 'hashMismatch', 'sign', 'lineCategory', 'tooMany'];
// Key orders of every object in the save file. serialize writes these orders; parse accepts exactly these keys.
const TOP_KEYS = ['format', 'schemaVersion', 'appVersion', 'savedAt', 'seed', 'name', 'settings', 'locations',
'customRates', 'transactions', 'filings', 'taxPayments'];
const SETTINGS_KEYS = ['taxYear', 'filingStatus', 'itemizedOverrideCents', 'priorYearTaxCents', 'priorYearAgiCents',
'setAsideBalanceCents', 'residentCountyId', 'setAsideConfidence', 'bootstrapDraws', 'csvMappings'];
const PAYMENT_KEYS = ['id', 'date', 'amountCents', 'office', 'taxYear'];
const PAYMENT_OFFICES = ['federal', 'ky'];
const MAPPING_KEYS = ['signature', 'shape', 'columns'];
const COLUMN_KEYS = ['date', 'description', 'amount', 'debit', 'credit', 'type', 'inflowValue'];
const LOCATION_KEYS = ['id', 'name', 'zip', 'districtIds', 'insideCityLimits', 'confirmedBy'];
const CUSTOM_RATE_KEYS = ['districtId', 'name', 'kind', 'base', 'ratePct', 'effectiveDate'];
const TXN_KEYS = ['id', 'date', 'amountCents', 'description', 'category', 'scheduleCLine', 'locationId', 'source', 'hash'];
const FILING_KEYS = ['districtId', 'taxYear', 'status'];
const REQUIRED_COLUMNS = {
signed: ['date', 'description', 'amount'],
debitCredit: ['date', 'description', 'debit', 'credit'],
typed: ['date', 'description', 'amount', 'type', 'inflowValue']
};
const SAVED_AT_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{3})?Z$/;
const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
const DISTRICT_ID_RE = /^(ky-[a-z0-9-]+|custom_[0-9a-z]+)$/;
function pick(obj, keys) {
const out = {};
for (const k of keys) out[k] = obj[k];
return out;
}
function ordered(w) {
const doc = pick(w, TOP_KEYS);
const settings = pick(w.settings, SETTINGS_KEYS);
settings.csvMappings = w.settings.csvMappings.map((m) => {
const mapping = pick(m, MAPPING_KEYS);
mapping.columns = pick(m.columns, COLUMN_KEYS);
return mapping;
});
doc.settings = settings;
doc.locations = w.locations.map((l) => {
const loc = pick(l, LOCATION_KEYS);
loc.districtIds = l.districtIds.slice();
return loc;
});
doc.customRates = w.customRates.map((r) => pick(r, CUSTOM_RATE_KEYS));
doc.transactions = w.transactions.map((t) => pick(t, TXN_KEYS));
doc.filings = w.filings.map((f) => pick(f, FILING_KEYS));
doc.taxPayments = w.taxPayments.map((p) => pick(p, PAYMENT_KEYS));
return doc;
}
function serialize(workspace, savedAtIso) {
const doc = ordered(workspace);
doc.savedAt = savedAtIso;
return JSON.stringify(doc, null, 2) + '\n';
}
// Schema steps, then the line fix: files written by 0.1.0 and 1.0.0 used '27b' for other expenses, which is line
// 27a on the form, so their '27b' lines become '27a'. txnHash doesn't use the line. Returns a copy when it changes.
const OTHER_AS_27B_VERSIONS = ['0.1.0', '1.0.0'];
// 1 -> 2 (WO-11 J3): an empty name, no payments, and no savings balance entered. Nothing else is touched.
function toVersion2(d) {
d.schemaVersion = 2;
if (!Object.prototype.hasOwnProperty.call(d, 'name')) d.name = '';
if (!Object.prototype.hasOwnProperty.call(d, 'taxPayments')) d.taxPayments = [];
if (isObject(d.settings) && !Object.prototype.hasOwnProperty.call(d.settings, 'setAsideBalanceCents')) d.settings.setAsideBalanceCents = null;
return d;
}
function migrate(doc) {
const steps = { 1: toVersion2 };
let out = doc;
while (out.schemaVersion < CURRENT_SCHEMA_VERSION) out = steps[out.schemaVersion](structuredClone(out));
if (OTHER_AS_27B_VERSIONS.includes(out.appVersion) && Array.isArray(out.transactions) &&
out.transactions.some((t) => isObject(t) && t.scheduleCLine === '27b')) {
out = structuredClone(out);
for (const t of out.transactions) if (isObject(t) && t.scheduleCLine === '27b') t.scheduleCLine = '27a';
}
return out;
}
function suggestedFileName(localDateIso) {
return `ky-local-tax-${localDateIso}${SAVE_EXTENSION}`;
}
// ---- validation helpers: each throws { field, code } on the first failure ----
function fail(field, code) {
throw { field, code };
}
function isObject(v) {
return v !== null && typeof v === 'object' && !Array.isArray(v);
}
function isRealDate(y, m, d) {
if (m < 1 || m > 12 || d < 1) return false;
const leap = (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0;
const days = [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
return d <= days[m - 1];
}
function join(path, key) {
return path ? `${path}.${key}` : key;
}
function checkObject(v, keys, path) {
if (!isObject(v)) fail(path || '(file)', 'type');
for (const k of Object.keys(v)) if (!keys.includes(k)) fail(join(path, k), 'unknownKey');
for (const k of keys) if (!Object.prototype.hasOwnProperty.call(v, k)) fail(join(path, k), 'required');
}
function checkArray(v, max, path) {
if (!Array.isArray(v)) fail(path, 'type');
if (v.length > max) fail(path, 'tooMany');
}
function checkInt(v, min, max, path) {
if (!Number.isInteger(v)) fail(path, 'type');
if (v < min || v > max) fail(path, 'range');
}
function checkNumber(v, min, max, path) {
if (typeof v !== 'number' || !Number.isFinite(v)) fail(path, 'type');
if (v < min || v > max) fail(path, 'range');
}
function checkString(v, min, max, path) {
if (typeof v !== 'string') fail(path, 'type');
if (v.length < min || v.length > max) fail(path, 'range');
}
function checkPattern(v, re, path) {
if (typeof v !== 'string') fail(path, 'type');
if (!re.test(v)) fail(path, 'pattern');
}
function checkEnum(v, values, path) {
if (!values.includes(v)) fail(path, 'enum');
}
function checkBoolean(v, path) {
if (typeof v !== 'boolean') fail(path, 'type');
}
function checkDate(v, path) {
checkPattern(v, DATE_RE, path);
const m = DATE_RE.exec(v);
if (!isRealDate(Number(m[1]), Number(m[2]), Number(m[3]))) fail(path, 'date');
}
function checkSavedAt(v, path) {
checkPattern(v, SAVED_AT_RE, path);
const m = SAVED_AT_RE.exec(v);
const ok = isRealDate(Number(m[1]), Number(m[2]), Number(m[3])) &&
Number(m[4]) <= 23 && Number(m[5]) <= 59 && Number(m[6]) <= 59;
if (!ok) fail(path, 'date');
}
function checkNullableCents(v, path) {
if (v === null) return;
checkInt(v, 0, Number.MAX_SAFE_INTEGER, path);
}
function checkSettings(s) {
const p = 'settings';
checkObject(s, SETTINGS_KEYS, p);
checkInt(s.taxYear, 2024, 2027, `${p}.taxYear`);
checkEnum(s.filingStatus, ['single', 'mfj', 'mfs', 'hoh'], `${p}.filingStatus`);
checkNullableCents(s.itemizedOverrideCents, `${p}.itemizedOverrideCents`);
checkNullableCents(s.priorYearTaxCents, `${p}.priorYearTaxCents`);
checkNullableCents(s.priorYearAgiCents, `${p}.priorYearAgiCents`);
checkNullableCents(s.setAsideBalanceCents, `${p}.setAsideBalanceCents`);
if (s.residentCountyId !== null) checkPattern(s.residentCountyId, /^ky-[a-z0-9-]+$/, `${p}.residentCountyId`);
checkNumber(s.setAsideConfidence, 0.5, 0.99, `${p}.setAsideConfidence`);
checkInt(s.bootstrapDraws, 100, 20000, `${p}.bootstrapDraws`);
checkArray(s.csvMappings, 50, `${p}.csvMappings`);
s.csvMappings.forEach((m, i) => {
const mp = `${p}.csvMappings[${i}]`;
checkObject(m, MAPPING_KEYS, mp);
checkString(m.signature, 0, 2000, `${mp}.signature`);
checkEnum(m.shape, ['signed', 'debitCredit', 'typed'], `${mp}.shape`);
checkObject(m.columns, COLUMN_KEYS, `${mp}.columns`);
for (const k of COLUMN_KEYS) {
const v = m.columns[k];
if (v !== null && typeof v !== 'string') fail(`${mp}.columns.${k}`, 'type');
}
for (const k of REQUIRED_COLUMNS[m.shape]) if (m.columns[k] === null) fail(`${mp}.columns.${k}`, 'required');
});
}
function checkLocations(locations, customIds) {
checkArray(locations, 500, 'locations');
const seen = new Set();
locations.forEach((l, i) => {
const p = `locations[${i}]`;
checkObject(l, LOCATION_KEYS, p);
checkPattern(l.id, /^loc_[0-9a-z]+$/, `${p}.id`);
if (seen.has(l.id)) fail(`${p}.id`, 'duplicateId');
seen.add(l.id);
checkString(l.name, 1, 120, `${p}.name`);
if (l.zip !== null) checkPattern(l.zip, /^\d{5}$/, `${p}.zip`);
checkArray(l.districtIds, 6, `${p}.districtIds`);
const ids = new Set();
l.districtIds.forEach((d, j) => {
const dp = `${p}.districtIds[${j}]`;
checkPattern(d, DISTRICT_ID_RE, dp);
if (ids.has(d)) fail(dp, 'duplicateId');
ids.add(d);
if (d.startsWith('custom_') && !customIds.has(d)) fail(dp, 'refMissing');
});
checkBoolean(l.insideCityLimits, `${p}.insideCityLimits`);
checkEnum(l.confirmedBy, ['user', 'user-manual', 'fixture'], `${p}.confirmedBy`);
});
return seen;
}
function checkCustomRates(rates) {
checkArray(rates, 100, 'customRates');
const seen = new Set();
rates.forEach((r, i) => {
const p = `customRates[${i}]`;
checkObject(r, CUSTOM_RATE_KEYS, p);
checkPattern(r.districtId, /^custom_[0-9a-z]+$/, `${p}.districtId`);
if (seen.has(r.districtId)) fail(`${p}.districtId`, 'duplicateId');
seen.add(r.districtId);
checkString(r.name, 1, 120, `${p}.name`);
checkEnum(r.kind, ['county', 'city', 'school'], `${p}.kind`);
checkEnum(r.base, ['netProfit', 'grossReceipts'], `${p}.base`);
checkNumber(r.ratePct, 0, 5, `${p}.ratePct`);
checkDate(r.effectiveDate, `${p}.effectiveDate`);
});
}
function checkTransactions(txns, locationIds) {
checkArray(txns, 50000, 'transactions');
const seen = new Set();
txns.forEach((t, i) => {
const p = `transactions[${i}]`;
checkObject(t, TXN_KEYS, p);
checkPattern(t.id, /^txn_\d{6,}$/, `${p}.id`);
if (seen.has(t.id)) fail(`${p}.id`, 'duplicateId');
seen.add(t.id);
checkDate(t.date, `${p}.date`);
if (!Number.isInteger(t.amountCents)) fail(`${p}.amountCents`, 'type');
if (t.amountCents === 0 || Math.abs(t.amountCents) > 100000000000) fail(`${p}.amountCents`, 'range');
checkString(t.description, 0, 500, `${p}.description`);
checkEnum(t.category, ['income', 'expense'], `${p}.category`);
const income = t.category === 'income';
if (income ? t.amountCents <= 0 : t.amountCents >= 0) fail(`${p}.category`, 'sign');
checkEnum(t.scheduleCLine, SCHEDULE_C_LINES, `${p}.scheduleCLine`);
if (INCOME_LINES.includes(t.scheduleCLine) !== income) fail(`${p}.scheduleCLine`, 'lineCategory');
if (income) {
if (t.locationId === null) fail(`${p}.locationId`, 'required');
if (typeof t.locationId !== 'string') fail(`${p}.locationId`, 'type');
if (!locationIds.has(t.locationId)) fail(`${p}.locationId`, 'refMissing');
} else if (t.locationId !== null) {
fail(`${p}.locationId`, 'type');
}
checkEnum(t.source, ['manual', 'csv', 'fixture'], `${p}.source`);
checkPattern(t.hash, /^[0-9a-f]{16}$/, `${p}.hash`);
if (t.hash !== txnHash(t)) fail(`${p}.hash`, 'hashMismatch');
});
}
function checkFilings(filings) {
checkArray(filings, 1000, 'filings');
const seen = new Set();
filings.forEach((f, i) => {
const p = `filings[${i}]`;
checkObject(f, FILING_KEYS, p);
checkPattern(f.districtId, DISTRICT_ID_RE, `${p}.districtId`);
checkInt(f.taxYear, 2020, 2027, `${p}.taxYear`);
checkEnum(f.status, ['filed', 'unfiled', 'unknown'], `${p}.status`);
const pair = `${f.districtId}|${f.taxYear}`;
if (seen.has(pair)) fail(p, 'duplicateId');
seen.add(pair);
});
}
// J3: payments made. office is 'federal', 'ky' or a district id; a custom district has to be one of the file's own.
function checkPayments(payments, customIds) {
checkArray(payments, 2000, 'taxPayments');
const seen = new Set();
payments.forEach((pay, i) => {
const p = `taxPayments[${i}]`;
checkObject(pay, PAYMENT_KEYS, p);
checkPattern(pay.id, /^pay_\d{6}$/, `${p}.id`);
if (seen.has(pay.id)) fail(`${p}.id`, 'duplicateId');
seen.add(pay.id);
checkDate(pay.date, `${p}.date`);
if (!Number.isInteger(pay.amountCents)) fail(`${p}.amountCents`, 'type');
if (pay.amountCents <= 0 || pay.amountCents > 100000000000) fail(`${p}.amountCents`, 'range');
if (typeof pay.office !== 'string') fail(`${p}.office`, 'type');
if (!PAYMENT_OFFICES.includes(pay.office)) {
if (!DISTRICT_ID_RE.test(pay.office)) fail(`${p}.office`, 'enum');
if (pay.office.startsWith('custom_') && !customIds.has(pay.office)) fail(`${p}.office`, 'refMissing');
}
checkInt(pay.taxYear, 2020, 2027, `${p}.taxYear`);
});
}
function validate(doc) {
if (!isObject(doc)) fail('(file)', 'type');
// Identity first, so opening some other JSON file reports "format" rather than its first unknown key.
if (doc.format !== FORMAT) fail('format', 'format');
if (!Number.isInteger(doc.schemaVersion)) fail('schemaVersion', 'type');
if (doc.schemaVersion > CURRENT_SCHEMA_VERSION) fail('schemaVersion', 'tooNew');
if (doc.schemaVersion < 1) fail('schemaVersion', 'range');
doc = migrate(doc);
checkObject(doc, TOP_KEYS, '');
checkPattern(doc.appVersion, /^\d+\.\d+\.\d+$/, 'appVersion');
checkSavedAt(doc.savedAt, 'savedAt');
if (!Number.isInteger(doc.seed)) fail('seed', 'type');
if (doc.seed < 0 || doc.seed >= 4294967296) fail('seed', 'range');
checkString(doc.name, 0, 80, 'name');
checkSettings(doc.settings);
const customIds = new Set();
if (Array.isArray(doc.customRates)) {
for (const r of doc.customRates) if (isObject(r) && typeof r.districtId === 'string') customIds.add(r.districtId);
}
const locationIds = checkLocations(doc.locations, customIds);
checkCustomRates(doc.customRates);
checkTransactions(doc.transactions, locationIds);
checkFilings(doc.filings);
checkPayments(doc.taxPayments, customIds);
return doc;
}
function parse(text) {
if (typeof text !== 'string' || text.length > MAX_FILE_BYTES) return { ok: false, field: '(file)', code: 'tooLarge' };
let doc;
try {
doc = JSON.parse(text);
} catch (e) {
return { ok: false, field: '(file)', code: 'json' };
}
try {
const valid = validate(doc);
return { ok: true, workspace: ordered(valid) };
} catch (e) {
if (e && typeof e.field === 'string' && ERROR_CODES.includes(e.code)) return { ok: false, field: e.field, code: e.code };
throw e;
}
}
// ---- F2: bank CSV import ----
// Single-pass state machine. Quoted fields may hold commas, quotes ("") and line breaks; \n, \r\n and a lone \r
// end a row; fully empty lines are skipped; a leading BOM is stripped; the first row is the header row.
function parseCsv(text) {
const s = text.charCodeAt(0) === 0xfeff ? text.slice(1) : text;
const parsed = [];
const errors = [];
let field = '';
let row = [];
let quoted = false;
let inQuotes = false;
let line = 1;
let rowLine = 1;
const endRow = () => {
row.push(field);
if (!(row.length === 1 && row[0] === '' && !quoted)) parsed.push({ fields: row, line: rowLine });
field = '';
row = [];
quoted = false;
};
for (let i = 0; i < s.length; i++) {
const ch = s[i];
if (inQuotes) {
if (ch === '"' && s[i + 1] === '"') {
field += '"';
i++;
} else if (ch === '"') {
inQuotes = false;
} else {
if (ch === '\n' || (ch === '\r' && s[i + 1] !== '\n')) line++;
field += ch;
}
} else if (ch === '"' && field === '') {
inQuotes = true;
quoted = true;
} else if (ch === ',') {
row.push(field);
field = '';
} else if (ch === '\n' || ch === '\r') {
if (ch === '\r' && s[i + 1] === '\n') i++;
endRow();
line++;
rowLine = line;
} else {
field += ch;
}
}
if (inQuotes) errors.push({ line: rowLine, code: 'unterminatedQuote' });
else if (field !== '' || row.length > 0 || quoted) endRow();
const headers = parsed.length ? parsed[0].fields : [];
const rows = [];
for (const r of parsed.slice(1)) {
if (r.fields.length === headers.length) rows.push(r.fields);
else errors.push({ line: r.line, code: 'fieldCount' });
}
errors.sort((a, b) => a.line - b.line);
return { headers, rows, errors };
}
function headerSignature(headers) {
return headers.map((h) => h.trim().toLowerCase()).join('|');
}
const HEADER_NAMES = {
date: ['date', 'posted', 'posting date', 'transaction date'],
description: ['description', 'memo', 'payee', 'name', 'details'],
amount: ['amount'],
debit: ['debit', 'withdrawal', 'withdrawals'],
credit: ['credit', 'deposit', 'deposits'],
type: ['type', 'transaction type']
};
const SHAPE_COLUMNS = {
signed: ['date', 'description', 'amount'],
debitCredit: ['date', 'description', 'debit', 'credit'],
typed: ['date', 'description', 'amount', 'type', 'inflowValue']
};
function columnIndex(headers, name) {
if (name === null || name === undefined) return -1;
const want = name.trim().toLowerCase();
return headers.findIndex((h) => h.trim().toLowerCase() === want);
}
// Best-guess mapping, same shape as settings.csvMappings[].columns. Columns the shape does not use are null.
function detectMapping(headers, sampleRows) {
const found = {};
for (const key of Object.keys(HEADER_NAMES)) {
const h = headers.find((x) => HEADER_NAMES[key].includes(x.trim().toLowerCase()));
found[key] = h === undefined ? null : h;
}
const amountAt = columnIndex(headers, found.amount);
const unsigned = amountAt >= 0 && sampleRows.every((r) => {
const cents = parseMoney(r[amountAt] || '');
return cents === null || cents >= 0;
});
let shape = 'signed';
if (found.debit !== null && found.credit !== null) shape = 'debitCredit';
else if (found.type !== null && found.amount !== null && unsigned) shape = 'typed';
found.inflowValue = null;
if (shape === 'typed') {
const typeAt = columnIndex(headers, found.type);
const descAt = columnIndex(headers, found.description);
const inflow = sampleRows.find((r) => /DEPOSIT|ZELLE FROM/.test(normalizeDescription(descAt >= 0 ? r[descAt] || '' : '')));
if (inflow && typeAt >= 0 && inflow[typeAt].trim() !== '') found.inflowValue = inflow[typeAt].trim();
}
const columns = {};
for (const key of ['date', 'description', 'amount', 'debit', 'credit', 'type', 'inflowValue']) {
columns[key] = SHAPE_COLUMNS[shape].includes(key) ? found[key] : null;
}
return { shape, columns };
}
const MONTHS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
// order 'us': slash dates are month/day. order 'iso': only YYYY-MM-DD and DD-MMM-YYYY. -> 'YYYY-MM-DD' or null.
function parseBankDate(text, order) {
const t = String(text).trim();
const pad = (n) => String(n).padStart(2, '0');
let y;
let m;
let d;
let match;
if ((match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t))) {
[y, m, d] = [Number(match[1]), Number(match[2]), Number(match[3])];
} else if ((match = /^(\d{1,2})-([A-Za-z]{3})-(\d{4})$/.exec(t))) {
m = MONTHS.indexOf(match[2].toLowerCase()) + 1;
[y, d] = [Number(match[3]), Number(match[1])];
if (m === 0) return null;
} else if (order === 'us' && (match = /^(\d{1,2})\/(\d{1,2})\/(\d{4}|\d{2})$/.exec(t))) {
[m, d] = [Number(match[1]), Number(match[2])];
y = match[3].length === 2 ? 2000 + Number(match[3]) : Number(match[3]);
} else {
return null;
}
const iso = `${String(y).padStart(4, '0')}-${pad(m)}-${pad(d)}`;
return isIsoDate(iso) ? iso : null;
}
// mapping = { shape, columns, dateOrder }. Inflows -> income on line 1; outflows -> expense on line 27a.
function mapColumns(headers, rows, mapping) {
const at = {};
for (const key of ['date', 'description', 'amount', 'debit', 'credit', 'type']) at[key] = columnIndex(headers, mapping.columns[key]);
const cell = (r, key) => (at[key] >= 0 ? r[at[key]] : '');
const inflowValue = (mapping.columns.inflowValue || '').trim().toLowerCase();
const txns = [];
const errors = [];
rows.forEach((r, row) => {
const date = parseBankDate(cell(r, 'date'), mapping.dateOrder || 'us');
if (date === null) return errors.push({ row, code: 'date' });
let cents;
if (mapping.shape === 'debitCredit') {
const debit = cell(r, 'debit').trim();
const credit = cell(r, 'credit').trim();
if ((debit === '') === (credit === '')) return errors.push({ row, code: 'debitCredit' });
const value = parseMoney(debit || credit);
cents = value === null ? null : debit ? -Math.abs(value) : Math.abs(value);
} else if (mapping.shape === 'typed') {
const value = parseMoney(cell(r, 'amount'));
const inflow = cell(r, 'type').trim().toLowerCase() === inflowValue;
cents = value === null ? null : inflow ? Math.abs(value) : -Math.abs(value);
} else {
cents = parseMoney(cell(r, 'amount'));
}
if (cents === null || Math.abs(cents) > 100000000000) return errors.push({ row, code: 'amount' });
if (cents === 0) return errors.push({ row, code: 'zero' });
const income = cents > 0;
txns.push({
date,
amountCents: cents,
description: cell(r, 'description').trim().slice(0, 500),
category: income ? 'income' : 'expense',
scheduleCLine: income ? '1' : '27a',
locationId: null,
source: 'csv'
});
});
return { txns, errors };
}
return { FORMAT, CURRENT_SCHEMA_VERSION, MAX_FILE_BYTES, SAVE_EXTENSION, SAVE_MIME, ERROR_CODES, PAYMENT_OFFICES, serialize, migrate, suggestedFileName, parse, parseCsv, headerSignature, detectMapping, parseBankDate, mapColumns };
})();
// ---- jurisdictions ----
const jurisdictions = (() => {
const { TIER1, TIER1_FROZEN_ON, TIER1_META } = data_tier1;
const { ZIP_CANDIDATES } = data_zip_candidates;
// jurisdictions.js — layer 1. Rate-row lookup and location district sets. Pure; imports only from src/data/.
const RATE_ROWS = TIER1; // re-exported data, so ui can pass it to tax and quant
const RATE_TABLE_FROZEN_ON = TIER1_FROZEN_ON; // the frozen table's date, printed on the CPA packet cover
const RATE_TABLE_META = TIER1_META; // frozenOn, rowCount, districtCount, droppedDistricts, droppedRowCount
const ROW_FIELDS = ['districtId', 'name', 'kind', 'parentCountyId', 'base', 'ratePct', 'appliesBy', 'effectiveDate',
'supersededDate', 'minimumFeeCents', 'minimumFeeCreditable', 'flatLicenseFeeCents', 'capCents', 'exemptionCents',
'exemptionProrated', 'apportionment', 'unincorporatedOnly', 'excludedWithinCityIds', 'rateInsideCity',
'creditAgainst', 'filingRequired', 'residentsOnlyNetProfit', 'residentsOnlyPayroll', 'formId', 'latePenalty',
'interestPctPerYear', 'sourceUrl', 'verifiedOn', 'verified', 'spotChecked', 'stub', 'notes'];
const KINDS = ['county', 'city', 'school', 'merged'];
const BASES = ['netProfit', 'grossReceipts', 'payroll', null];
const APPLIES_BY = ['taxYearStart', 'transactionDate'];
const APPORTIONMENT = ['krs67753', 'threeFactor'];
const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
const OPTIONAL_STRINGS = ['sourceTitle', 'secondSourceUrl', 'exemptionCondition'];
// supersededDate is the last day a row is in force (inclusive): a row superseded 2026-06-30 is followed by one
// effective 2026-07-01, and rowOnDate returns the old row on 2026-06-30.
// A null effectiveDate means "in force since before 2024; exact date unknown", so the row is in force from the
// start of every supported tax year (2024-2027) until its supersededDate.
function inForceOn(row, isoDate) {
return (row.effectiveDate === null || row.effectiveDate <= isoDate) &&
(row.supersededDate === null || row.supersededDate >= isoDate);
}
// Rows in force for the year: the row in force on January 1 governs the whole tax year, so a mid-year change
// applies from the next tax year. Every row is applied this way, 'transactionDate' rows included (none exist).
function rowsForTaxYear(rows, taxYear) {
const jan1 = `${taxYear}-01-01`;
return rows.filter((r) => inForceOn(r, jan1));
}
function rateRow(rows, districtId, taxYear) {
const found = rowsForTaxYear(rows, taxYear).filter((r) => r.districtId === districtId);
return found.length ? found[0] : null;
}
function rowOnDate(rows, districtId, isoDate) {
const found = rows.filter((r) => r.districtId === districtId && inForceOn(r, isoDate));
return found.length ? found[0] : null;
}
// A ZIP never decides a jurisdiction; it only narrows the choice. outside: part of the ZIP lies in a county that
// is not in the table, so "another county" stays a choice.
function candidatesForZip(zip) {
if (!Object.prototype.hasOwnProperty.call(ZIP_CANDIDATES, zip)) return null;
const c = ZIP_CANDIDATES[zip];
return { counties: c.counties.slice(), cities: c.cities.slice(), outside: c.outside === true };
}
function schoolRowsForCounty(rows, countyId, taxYear) {
return rowsForTaxYear(rows, taxYear).filter((r) => r.kind === 'school' && r.parentCountyId === countyId);
}
// A supplemental county line (flag 'supplementalCountyLine', e.g. ky-boone-county-mental-health) is a separate
// county-kind row on the same county return; it goes with every location in that county.
function supplementalCountyRows(rows, countyId) {
return rows.filter((r) => r.kind === 'county' && r.districtId.startsWith(`${countyId}-`) &&
Array.isArray(r.flags) && r.flags.includes('supplementalCountyLine'));
}
function isSupplementalCountyRow(row) {
return row.kind === 'county' && Array.isArray(row.flags) && row.flags.includes('supplementalCountyLine');
}
// A merged city-county government (Lexington-Fayette, Louisville-Jefferson): one row is both the city and the county.
function isMergedCounty(rows, countyId) {
return rows.some((r) => r.districtId === countyId && r.kind === 'merged');
}
// [countyId, ...supplementalCountyIds, cityId?, ...schoolIds] in that order. School rows are always included;
// residency applies later. A merged government has no city inside it to add, so cityId is ignored there.
function buildDistrictIds(rows, taxYear, countyId, cityId) {
const ids = [countyId];
for (const r of supplementalCountyRows(rowsForTaxYear(rows, taxYear), countyId)) if (!ids.includes(r.districtId)) ids.push(r.districtId);
if (cityId && !isMergedCounty(rows, countyId)) ids.push(cityId);
for (const r of schoolRowsForCounty(rows, countyId, taxYear)) if (!ids.includes(r.districtId)) ids.push(r.districtId);
return ids;
}
// The city ids a location is inside: its districtIds that name a city row (in the table or custom).
function locationCityIds(location, rows) {
return location.districtIds.filter((id) => rows.some((r) => r.districtId === id && r.kind === 'city'));
}
// Rows that apply to a location for the year, after residency and the special county rules:
// - unincorporatedOnly: the row applies only to a location inside no city (a listed, custom or unentered one);
// - excludedWithinCityIds: the row is skipped for a location inside a listed city.
// rateInsideCity is applied by tax.localLiability. cityIds is the location's cities, for that split.
function effectiveDistricts(location, rows, taxYear, residentCountyId) {
const inForce = rowsForTaxYear(rows, taxYear);
const cityIds = locationCityIds(location, rows);
const insideCity = cityIds.length > 0 || location.insideCityLimits === true;
const out = [];
const missing = [];
for (const id of location.districtIds) {
const row = inForce.find((r) => r.districtId === id);
if (!row) {
missing.push(id);
continue;
}
if (row.kind === 'school' && row.residentsOnlyNetProfit === true && residentCountyId !== row.parentCountyId) continue;
if (row.unincorporatedOnly === true && insideCity) continue;
if (Array.isArray(row.excludedWithinCityIds) && row.excludedWithinCityIds.some((c) => cityIds.includes(c))) continue;
out.push(row);
}
return { rows: out, missing, cityIds };
}
function validateRows(rows) {
const problems = [];
const add = (districtId, problem) => problems.push({ districtId, problem });
for (const r of rows) {
const id = r && typeof r.districtId === 'string' ? r.districtId : '(unknown)';
const absent = ROW_FIELDS.filter((f) => !Object.prototype.hasOwnProperty.call(r, f));
if (absent.length) add(id, `missing fields: ${absent.join(', ')}`);
if (!/^ky-[a-z0-9-]+$/.test(id)) add(id, 'districtId is not a ky- id');
if (!KINDS.includes(r.kind)) add(id, `kind '${r.kind}' is not one of ${KINDS.join(', ')}`);
if (!BASES.includes(r.base)) add(id, `base '${r.base}' is not allowed`);
if (!APPLIES_BY.includes(r.appliesBy)) add(id, `appliesBy '${r.appliesBy}' is not allowed`);
if (!APPORTIONMENT.includes(r.apportionment)) add(id, `apportionment '${r.apportionment}' is not allowed`);
const userRate = r.requiresUserRate === true && r.ratePct === null;
if (!userRate && (typeof r.ratePct !== 'number' || r.ratePct < 0)) add(id, 'ratePct is not a non-negative number');
if (r.effectiveDate !== null && !DATE_RE.test(r.effectiveDate)) add(id, 'effectiveDate is not YYYY-MM-DD or null');
if (r.supersededDate !== null && !(DATE_RE.test(r.supersededDate) && (r.effectiveDate === null || r.supersededDate >= r.effectiveDate))) {
add(id, 'supersededDate is not a YYYY-MM-DD date on or after effectiveDate');
}
for (const p of optionalFieldProblems(r)) add(id, p);
for (const p of cityRuleProblems(r, rows)) add(id, p);
if (r.kind === 'school' && !r.parentCountyId) add(id, 'school row without parentCountyId');
if (r.kind === 'merged' && r.parentCountyId !== r.districtId) add(id, "merged row's parentCountyId is not itself");
if (r.parentCountyId && !rows.some((p) => p.districtId === r.parentCountyId && (p.kind === 'county' || p.kind === 'merged'))) {
add(id, `parentCountyId '${r.parentCountyId}' is not a county or merged row`);
}
}
const byId = {};
for (const r of rows) (byId[r.districtId] = byId[r.districtId] || []).push(r);
for (const id of Object.keys(byId)) {
const list = byId[id].slice().sort((a, b) => ((a.effectiveDate || '') < (b.effectiveDate || '') ? -1 : 1));
for (let i = 1; i < list.length; i++) {
const prev = list[i - 1];
if (prev.supersededDate === null || list[i].effectiveDate === null || prev.supersededDate >= list[i].effectiveDate) {
add(id, `effective dates overlap (${prev.effectiveDate} and ${list[i].effectiveDate})`);
}
}
}
for (const m of rows.filter((r) => r.kind === 'merged')) {
for (const s of rows) {
if (s !== m && s.parentCountyId === m.districtId && (s.kind === 'county' || s.kind === 'city')) {
add(m.districtId, `merged row has a sibling ${s.kind} row ${s.districtId}`);
}
}
}
return problems;
}
// F4 optional fields: informationalFees (shown, never computed), requiresUserRate, exemptionCondition and
// exemptionCentsIfConditionMet (stored only), and provenance strings.
function optionalFieldProblems(r) {
const problems = [];
const has = (k) => Object.prototype.hasOwnProperty.call(r, k) && r[k] !== undefined;
if (has('informationalFees')) {
const ok = Array.isArray(r.informationalFees) && r.informationalFees.every((f) => f && typeof f.label === 'string' &&
f.label.length > 0 && Number.isInteger(f.cents) && f.cents >= 0);
if (!ok) problems.push('informationalFees is not a list of { label, cents }');
}
if (has('requiresUserRate') && typeof r.requiresUserRate !== 'boolean') problems.push('requiresUserRate is not a boolean');
if (has('exemptionCentsIfConditionMet') && !(Number.isInteger(r.exemptionCentsIfConditionMet) && r.exemptionCentsIfConditionMet >= 0)) {
problems.push('exemptionCentsIfConditionMet is not a non-negative integer');
}
for (const k of OPTIONAL_STRINGS) if (has(k) && r[k] !== null && typeof r[k] !== 'string') problems.push(`${k} is not a string`);
if (has('notes') && typeof r.notes !== 'string') problems.push('notes is not a string');
if (has('flags') && !(Array.isArray(r.flags) && r.flags.every((f) => typeof f === 'string'))) problems.push('flags is not a list of strings');
return problems;
}
// unincorporatedOnly, excludedWithinCityIds and rateInsideCity: city ids must be city rows in the same county, on a
// county or school row; a row may not be both unincorporatedOnly and excluding named cities.
function cityRuleProblems(r, rows) {
const problems = [];
// The frozen table writes null for "no such rule" on unincorporatedOnly and excludedWithinCityIds.
const excluded = Array.isArray(r.excludedWithinCityIds) ? r.excludedWithinCityIds : null;
if (!excluded && r.excludedWithinCityIds !== null) problems.push('excludedWithinCityIds is not a list or null');
const inside = r.rateInsideCity;
if (inside !== null && (typeof inside !== 'object' || Array.isArray(inside))) problems.push('rateInsideCity is not an object or null');
if (![true, false, null].includes(r.unincorporatedOnly)) problems.push('unincorporatedOnly is not a boolean or null');
const insideIds = inside && typeof inside === 'object' && !Array.isArray(inside) ? Object.keys(inside) : [];
const named = (excluded || []).concat(insideIds);
if (named.length && r.kind !== 'county' && r.kind !== 'school') problems.push('excludedWithinCityIds or rateInsideCity on a row that is not a county or school row');
for (const c of named) {
if (!rows.some((p) => p.districtId === c && p.kind === 'city' && p.parentCountyId === r.parentCountyId)) {
problems.push(`'${c}' is not a city row in ${r.parentCountyId}`);
}
}
for (const c of insideIds) if (typeof inside[c] !== 'number' || inside[c] < 0) problems.push(`rateInsideCity '${c}' is not a non-negative number`);
if (r.unincorporatedOnly === true && excluded && excluded.length) problems.push('unincorporatedOnly together with excludedWithinCityIds');
// The engine splits a rateInsideCity line into portions; an exemption has no stated split, so it is not accepted.
if (insideIds.length && r.exemptionCents !== null && r.exemptionCents !== undefined) problems.push('rateInsideCity together with exemptionCents');
return problems;
}
// A workspace customRates entry -> RateRow with verified:false, custom:true, stub:false.
function fallbackRow(customRate) {
return {
districtId: customRate.districtId,
name: customRate.name,
kind: customRate.kind,
parentCountyId: customRate.districtId,
base: customRate.base,
ratePct: customRate.ratePct,
appliesBy: 'taxYearStart',
effectiveDate: customRate.effectiveDate,
supersededDate: null,
minimumFeeCents: null,
minimumFeeCreditable: null,
flatLicenseFeeCents: null,
capCents: null,
exemptionCents: null,
exemptionProrated: false,
apportionment: 'krs67753',
unincorporatedOnly: false,
excludedWithinCityIds: [],
rateInsideCity: null,
creditAgainst: null,
filingRequired: true,
residentsOnlyNetProfit: null,
residentsOnlyPayroll: null,
formId: null,
latePenalty: { pctPerMonth: null, maxPct: null, minimumCents: null },
interestPctPerYear: null,
sourceUrl: null,
verifiedOn: null,
verified: false,
spotChecked: false,
stub: false,
notes: '',
sourceTitle: null,
flags: [],
custom: true
};
}
return { RATE_ROWS, RATE_TABLE_FROZEN_ON, RATE_TABLE_META, rowsForTaxYear, rateRow, rowOnDate, candidatesForZip, schoolRowsForCounty, isSupplementalCountyRow, isMergedCounty, buildDistrictIds, locationCityIds, effectiveDistricts, validateRows, fallbackRow };
})();
// ---- tax ----
const tax = (() => {
const { scheduleC, salesByLocation } = book;
const { effectiveDistricts, fallbackRow } = jurisdictions;
// tax.js — layer 2. Self-employment, federal, Kentucky and local occupational license tax. Pure.
// Constants arrive as the argument `c` and rate rows as `rows`; neither is imported here, so tests can inject them.
// All money is integer cents, and every named step rounds with Math.round.
const SUPPORTED_STATUSES = ['single', 'mfj'];
// IRC 1402(b)(2): net earnings from self-employment under $400 are not self-employment income (not indexed).
const SE_FLOOR_CENTS = 40000;
function val(c, key) {
if (!c || !Object.prototype.hasOwnProperty.call(c, key)) throw new Error('missingConstant:' + key);
return c[key].value;
}
function requireSupported(filingStatus) {
if (!SUPPORTED_STATUSES.includes(filingStatus)) throw new Error('unsupportedFilingStatus');
}
// round(a * b / d) for non-negative integers, exactly (BigInt), halves rounded up like Math.round.
function mulDivRound(a, b, d) {
const num = BigInt(a) * BigInt(b);
const den = BigInt(d);
return Number((num * 2n + den) / (den * 2n));
}
function round4(x) {
return Math.round(x * 10000) / 10000;
}
function selfEmploymentTax(netProfitCents, filingStatus, c) {
requireSupported(filingStatus);
if (netProfitCents <= 0) {
return { netEarningsCents: 0, oasdiCents: 0, medicareCents: 0, additionalMedicareCents: 0, totalCents: 0, deductibleHalfCents: 0 };
}
const netEarningsCents = Math.round(netProfitCents * val(c, 'fed.se.netEarningsFactor'));
// Below the $400 floor every SE field is 0, the deductible half and additional Medicare included; at $400 the tax applies.
if (netEarningsCents < SE_FLOOR_CENTS) {
return { netEarningsCents: 0, oasdiCents: 0, medicareCents: 0, additionalMedicareCents: 0, totalCents: 0, deductibleHalfCents: 0 };
}
const oasdiCents = Math.round(Math.min(netEarningsCents, val(c, 'fed.se.wageBaseCents')) * val(c, 'fed.se.rate.oasdi'));
const medicareCents = Math.round(netEarningsCents * val(c, 'fed.se.rate.medicare'));
const threshold = val(c, `fed.se.additionalMedicareThresholdCents.${filingStatus}`);
const additionalMedicareCents = Math.round(Math.max(0, netEarningsCents - threshold) * val(c, 'fed.se.rate.additionalMedicare'));
return {
netEarningsCents,
oasdiCents,
medicareCents,
additionalMedicareCents,
totalCents: oasdiCents + medicareCents + additionalMedicareCents,
deductibleHalfCents: Math.round((oasdiCents + medicareCents) / 2)
};
}
function bracketTax(taxableCents, brackets) {
const out = [];
let from = 0;
let total = 0;
for (const [upper, rate] of brackets) {
if (taxableCents <= from) break;
const to = upper === null ? taxableCents : Math.min(taxableCents, upper);
const taxCents = Math.round((to - from) * rate);
out.push({ rate, fromCents: from, toCents: to, taxCents });
total += taxCents;
if (upper === null) break;
from = upper;
}
return { taxCents: total, brackets: out };
}
// inputs = { netProfitCents, deductibleHalfSeCents, filingStatus, itemizedOverrideCents }
function federalIncomeTax(inputs, c) {
const status = inputs.filingStatus;
requireSupported(status);
const std = val(c, `fed.stdDeductionCents.${status}`);
const itemized = inputs.itemizedOverrideCents;
const deductionCents = itemized !== null && itemized !== undefined && itemized > std ? itemized : std;
if (inputs.netProfitCents <= 0) {
return { agiCents: 0, deductionCents, taxableBeforeQbiCents: 0, qbiCents: 0, qbiDeductionCents: 0, qbiAboveThreshold: false,
taxableIncomeCents: 0, taxCents: 0, brackets: [] };
}
const agiCents = inputs.netProfitCents - inputs.deductibleHalfSeCents;
const taxableBeforeQbiCents = Math.max(0, agiCents - deductionCents);
const qbiCents = inputs.netProfitCents - inputs.deductibleHalfSeCents;
const qbiRate = val(c, 'fed.qbi.rate');
const qbiDeductionCents = Math.max(0, Math.min(Math.round(qbiRate * qbiCents), Math.round(qbiRate * taxableBeforeQbiCents)));
const qbiAboveThreshold = taxableBeforeQbiCents > val(c, `fed.qbi.thresholdCents.${status}`);
const taxableIncomeCents = taxableBeforeQbiCents - qbiDeductionCents;
const walk = bracketTax(taxableIncomeCents, val(c, `fed.brackets.${status}`));
return { agiCents, deductionCents, taxableBeforeQbiCents, qbiCents, qbiDeductionCents, qbiAboveThreshold,
taxableIncomeCents, taxCents: walk.taxCents, brackets: walk.brackets };
}
// inputs = { federalAgiCents }. KY AGI = federal AGI (no QBI deduction, no local-tax deduction).
function kentuckyIncomeTax(inputs, c) {
const kyAgiCents = Math.max(0, inputs.federalAgiCents);
const deductionCents = val(c, 'ky.stdDeductionCents');
const taxableCents = Math.max(0, kyAgiCents - deductionCents);
return { kyAgiCents, deductionCents, taxableCents, taxCents: Math.round(taxableCents * val(c, 'ky.incomeTax.rate')) };
}
const FACTORS = [['payroll', 'payrollIn', 'payrollEverywhere'], ['sales', 'salesIn', 'salesEverywhere'],
['property', 'propertyIn', 'propertyEverywhere']];
// The factors a method uses, each { name, inCents, everywhereCents }, present when everywhere > 0.
function presentFactors(f, method) {
const names = method === 'threeFactor' ? ['payroll', 'sales', 'property'] : ['payroll', 'sales'];
return FACTORS.filter(([name]) => names.includes(name))
.map(([name, inKey, allKey]) => ({ name, inCents: f[inKey] || 0, everywhereCents: f[allKey] || 0 }))
.filter((x) => x.everywhereCents > 0);
}
// krs67753: (payroll + sales) / 2 when both are present, the single present factor otherwise.
// threeFactor: the sum of the present factors over their count. No factor present -> factor 0.
function apportion(f, method) {
const present = presentFactors(f, method);
const sum = present.reduce((acc, x) => acc + x.inCents / x.everywhereCents, 0);
return { factor: present.length ? sum / present.length : 0, method, factorsPresent: present.map((x) => x.name) };
}
// The apportioned base in cents, computed exactly: round(base * in / everywhere) for one factor,
// round(base * (in1/all1 + in2/all2 + ...) / n) as one rational for several.
function apportionBase(baseCents, f, method) {
const present = presentFactors(f, method);
if (present.length === 0 || baseCents <= 0) return 0;
if (present.length === 1) return mulDivRound(baseCents, present[0].inCents, present[0].everywhereCents);
let num = 0n;
let den = 1n;
for (const x of present) {
num = num * BigInt(x.everywhereCents) + BigInt(x.inCents) * den;
den *= BigInt(x.everywhereCents);
}
den *= BigInt(present.length);
const total = BigInt(baseCents) * num;
return Number((total * 2n + den) / (den * 2n));
}
function levies(row) {
return (row.base === 'netProfit' || row.base === 'grossReceipts') && typeof row.ratePct === 'number' && row.ratePct > 0;
}
const NO_LIABILITY = { exemptionCents: 0, taxableCents: 0, computedCents: 0, afterCapCents: 0, afterMinimumCents: 0,
flatLicenseFeeCents: 0, liabilityCents: 0 };
// Steps after apportionment: exemption, rate, cap, minimum, flat fee (the credit is applied in localLiability).
function liabilityFromApportioned(row, apportionedCents) {
if (!levies(row)) return Object.assign({}, NO_LIABILITY);
const exemptionCents = Math.min(apportionedCents, row.exemptionCents || 0);
const taxableCents = Math.max(0, apportionedCents - exemptionCents);
const computedCents = Math.round(taxableCents * row.ratePct / 100);
return Object.assign({ exemptionCents, taxableCents }, afterComputed(row, computedCents));
}
// Cap, minimum and flat fee on a line's computed tax.
function afterComputed(row, computedCents) {
const afterCapCents = row.capCents !== null && row.capCents !== undefined ? Math.min(computedCents, row.capCents) : computedCents;
const afterMinimumCents = row.minimumFeeCents !== null && row.minimumFeeCents !== undefined
? Math.max(afterCapCents, row.minimumFeeCents) : afterCapCents;
const flatLicenseFeeCents = row.flatLicenseFeeCents || 0;
return { computedCents, afterCapCents, afterMinimumCents, flatLicenseFeeCents,
liabilityCents: afterMinimumCents + flatLicenseFeeCents };
}
// The portion a location's sales fall in on this row: the location's city when the row has a rate inside it
// (rateInsideCity), otherwise null (the row's own rate).
function portionKey(row, cityIds) {
if (!row.rateInsideCity) return null;
const c = cityIds.find((id) => Object.prototype.hasOwnProperty.call(row.rateInsideCity, id));
return c === undefined ? null : c;
}
// rateInsideCity: each portion is apportioned and taxed at its own rate, each portion's tax rounded, then summed;
// cap and minimum apply to the summed line. (validateRows keeps exemptions off such rows.)
// Every other row is one portion { cityId: null } at the row's rate.
function lineSteps(row, baseCents, portionSales, salesEverywhere) {
const method = row.apportionment;
const keys = Object.keys(portionSales).filter((k) => k !== '').sort();
if (Object.prototype.hasOwnProperty.call(portionSales, '')) keys.push('');
if (!row.rateInsideCity) {
const apportionedCents = apportionBase(baseCents, { salesIn: portionSales[''] || 0, salesEverywhere }, method);
const steps = liabilityFromApportioned(row, apportionedCents);
return Object.assign({ apportionedCents, portions: [{ cityId: null, apportionedCents, ratePct: row.ratePct,
computedCents: steps.computedCents }] }, steps);
}
const portions = keys.map((k) => {
const ratePct = k === '' ? row.ratePct : row.rateInsideCity[k];
const apportionedCents = apportionBase(baseCents, { salesIn: portionSales[k], salesEverywhere }, method);
const computedCents = levies(row) ? Math.round(apportionedCents * ratePct / 100) : 0;
return { cityId: k === '' ? null : k, apportionedCents, ratePct, computedCents };
});
const apportionedCents = portions.reduce((a, p) => a + p.apportionedCents, 0);
if (!levies(row)) return Object.assign({ apportionedCents, portions }, NO_LIABILITY);
const computedCents = portions.reduce((a, p) => a + p.computedCents, 0);
return Object.assign({ apportionedCents, portions, exemptionCents: 0, taxableCents: apportionedCents },
afterComputed(row, computedCents));
}
// One LocalLine per district in any location's effective set, sorted by districtId. A row that needs the user's
// rate (requiresUserRate, ratePct null) gives no line; the user's rate arrives as a custom row instead.
function localLiability(workspace, taxYear, rows) {
const sc = scheduleC(workspace, taxYear);
const netBase = Math.max(0, sc.netProfitCents);
const grossBase = Math.max(0, sc.grossReceiptsCents);
const salesEverywhere = sc.grossReceiptsCents + sc.otherIncomeCents;
const allRows = rows.concat(workspace.customRates.map(fallbackRow));
const sales = salesByLocation(workspace, taxYear);
const districts = {};
for (const loc of workspace.locations) {
const eff = effectiveDistricts(loc, allRows, taxYear, workspace.settings.residentCountyId);
for (const row of eff.rows) {
if (row.ratePct === null) continue;
const d = districts[row.districtId] || (districts[row.districtId] = { row, salesIn: 0, portionSales: {} });
const key = portionKey(row, eff.cityIds) || '';
d.salesIn += sales[loc.id] || 0;
d.portionSales[key] = (d.portionSales[key] || 0) + (sales[loc.id] || 0);
}
}
const lines = Object.keys(districts).sort().map((id) => {
const { row, salesIn, portionSales } = districts[id];
const f = { salesIn, salesEverywhere };
const method = row.apportionment;
const baseCents = row.base === 'netProfit' ? netBase : row.base === 'grossReceipts' ? grossBase : 0;
const steps = lineSteps(row, baseCents, portionSales, salesEverywhere);
const apportionedCents = steps.apportionedCents;
return {
districtId: row.districtId,
name: row.name,
kind: row.kind,
base: row.base,
baseCents,
factor: apportion(f, method).factor,
apportionedCents,
exemptionCents: steps.exemptionCents,
taxableCents: steps.taxableCents,
ratePct: row.ratePct,
computedCents: steps.computedCents,
afterCapCents: steps.afterCapCents,
afterMinimumCents: steps.afterMinimumCents,
flatLicenseFeeCents: steps.flatLicenseFeeCents,
creditCents: 0,
liabilityCents: steps.liabilityCents,
portions: steps.portions,
filingRequired: row.filingRequired === true,
formId: row.formId === undefined ? null : row.formId,
custom: row.custom === true,
creditAgainst: row.creditAgainst || null
};
}).filter((l) => l.liabilityCents > 0 || l.filingRequired);
// A row with creditAgainst X is reduced by X's liability (before X's own credit), limited to its own, floored at 0.
const before = {};
for (const l of lines) before[l.districtId] = l.liabilityCents;
for (const l of lines) {
if (l.creditAgainst && Object.prototype.hasOwnProperty.call(before, l.creditAgainst)) {
l.creditCents = Math.min(before[l.creditAgainst], l.liabilityCents);
l.liabilityCents = Math.max(0, l.liabilityCents - l.creditCents);
}
delete l.creditAgainst;
}
return lines;
}
// ---- F6: return-line worksheet and due-date calendar ----
// A per-district worksheet in the engine's computation order. Labels come from ui (COPY.returnLine[key]).
// A line split by rateInsideCity gets one portion:<cityId | 'outside'> line per portion after 'apportioned'.
function returnLines(localLine) {
const l = localLine;
const lines = [];
const add = (key, value, kind) => lines.push({ key, value, kind });
add('base', l.baseCents, 'cents');
add('factor', Math.round(l.factor * 1e6) / 1e6, 'factor');
add('apportioned', l.apportionedCents, 'cents');
if (Array.isArray(l.portions) && l.portions.length > 1) {
for (const p of l.portions) {
lines.push({ key: `portion:${p.cityId === null ? 'outside' : p.cityId}`, value: p.apportionedCents, kind: 'cents',
ratePct: p.ratePct, computedCents: p.computedCents });
}
}
add('exemption', l.exemptionCents || 0, 'cents');
add('taxable', l.taxableCents, 'cents');
add('rate', l.ratePct, 'pct');
add('computed', l.computedCents, 'cents');
add('afterCap', l.afterCapCents, 'cents');
add('afterMinimum', l.afterMinimumCents, 'cents');
add('flatFee', l.flatLicenseFeeCents || 0, 'cents');
add('credit', l.creditCents || 0, 'cents');
add('liability', l.liabilityCents, 'cents');
return { districtId: l.districtId, name: l.name, formId: l.formId === undefined ? null : l.formId, base: l.base,
custom: l.custom === true, lines };
}
// Federal and Kentucky estimated-tax due dates as ISO strings; a year with no record throws missingConstant:<key>.
function quarterlyCalendar(taxYear, c) {
return {
taxYear,
federal: val(c, `fed.est.dueDates.${taxYear}`).slice(),
ky: val(c, `ky.est.dueDates.${taxYear}`).slice()
};
}
function combined(workspace, taxYear, rows, c) {
const status = workspace.settings.filingStatus;
const sc = scheduleC(workspace, taxYear);
const se = selfEmploymentTax(sc.netProfitCents, status, c);
const federal = federalIncomeTax({
netProfitCents: sc.netProfitCents,
deductibleHalfSeCents: se.deductibleHalfCents,
filingStatus: status,
itemizedOverrideCents: workspace.settings.itemizedOverrideCents
}, c);
const ky = kentuckyIncomeTax({ federalAgiCents: federal.agiCents }, c);
const local = localLiability(workspace, taxYear, rows);
const localTotalCents = local.reduce((acc, l) => acc + l.liabilityCents, 0);
const totalCents = federal.taxCents + se.totalCents + ky.taxCents + localTotalCents;
return {
scheduleC: sc,
se,
federal,
ky,
local,
localTotalCents,
totalCents,
setAsideShareOfGross: sc.grossReceiptsCents > 0 ? round4(totalCents / sc.grossReceiptsCents) : null,
setAsideShareOfNet: sc.netProfitCents > 0 ? round4(totalCents / sc.netProfitCents) : null
};
}
return { selfEmploymentTax, federalIncomeTax, kentuckyIncomeTax, apportion, apportionBase, liabilityFromApportioned, localLiability, returnLines, quarterlyCalendar, combined };
})();
// ---- quant ----
const quant = (() => {
const { scheduleC, isQuickSummary } = book;
const { rateRow, fallbackRow } = jurisdictions;
const { combined, quarterlyCalendar, localLiability, selfEmploymentTax, federalIncomeTax, kentuckyIncomeTax } = tax;
// quant.js — layer 3. What-if computations over the tax engine. Pure: no DOM, clock or storage; constants arrive as
// `c` and rate rows as `rows`; every date arrives as an ISO argument from ui.
// ---- Q1: marginal rate by location ----
// A new workspace with one synthetic income transaction appended; the input is never mutated.
function withExtraIncome(workspace, taxYear, locationId, cents) {
const txn = { id: 'txn_999999999', date: `${taxYear}-12-31`, amountCents: cents, description: 'WHAT IF', category: 'income',
scheduleCLine: '1', locationId, source: 'manual', hash: '0000000000000000' };
return Object.assign({}, workspace, { transactions: workspace.transactions.concat([txn]) });
}
// For each location: how much each tax rises if the next stepCents of gross receipts is earned there. Every figure
// recomputes the whole year, because new income at one location shifts every district's apportionment factor.
function marginalRates(workspace, taxYear, rows, c, stepCents = 100000) {
const base = combined(workspace, taxYear, rows, c);
return workspace.locations.map((loc) => {
const next = combined(withExtraIncome(workspace, taxYear, loc.id, stepCents), taxYear, rows, c);
const seCents = next.se.totalCents - base.se.totalCents;
const federalCents = next.federal.taxCents - base.federal.taxCents;
const kyCents = next.ky.taxCents - base.ky.taxCents;
const localCents = next.localTotalCents - base.localTotalCents;
const totalCents = seCents + federalCents + kyCents + localCents;
return { locationId: loc.id, name: loc.name, districtIds: loc.districtIds.slice(), seCents, federalCents, kyCents, localCents,
totalCents, keptCents: stepCents - totalCents, ratePct: stepCents === 0 ? 0 : Math.round(totalCents / stepCents * 10000) / 100 };
});
}
// ---- Q2: quote adjuster ----
// What a quote of q cents at a location leaves after every tax: q minus the rise in the year's combined total.
function netOf(workspace, taxYear, rows, c, baseTotal, locationId, q) {
return q - (combined(withExtraIncome(workspace, taxYear, locationId, q), taxYear, rows, c).totalCents - baseTotal);
}
// The smallest quote at toLocationId, in [0, 4 x quoteCents], that nets at least what quoteCents nets at fromLocationId
// (the same location returns the quote itself). netOf does not decrease in q (each tax rises by less than the income does), so a binary search finds it.
function quoteToNet(workspace, taxYear, rows, c, fromLocationId, toLocationId, quoteCents) {
const baseTotal = combined(workspace, taxYear, rows, c).totalCents;
const net = (loc, q) => netOf(workspace, taxYear, rows, c, baseTotal, loc, q);
const netCents = net(fromLocationId, quoteCents);
// Owner ruling (Q2, 2026-11-04): a quote is its own equivalent at the same location. A lower quote that nets the same
// there is a rounding tie, not a cheaper price, so no search runs.
if (fromLocationId === toLocationId) {
return { fromLocationId, toLocationId, quoteCents, netCents, equivalentQuoteCents: quoteCents, equivalentNetCents: netCents };
}
let lo = 0;
let hi = 4 * quoteCents;
let equivalentQuoteCents = null;
if (net(toLocationId, hi) >= netCents) {
while (lo < hi) {
const mid = Math.floor((lo + hi) / 2);
if (net(toLocationId, mid) >= netCents) hi = mid;
else lo = mid + 1;
}
equivalentQuoteCents = lo;
}
return { fromLocationId, toLocationId, quoteCents, netCents, equivalentQuoteCents,
equivalentNetCents: equivalentQuoteCents === null ? null : net(toLocationId, equivalentQuoteCents) };
}
// ---- Q5: seeded bootstrap set-aside ----
// The only random source in the repo: a seeded 32-bit generator returning floats in [0, 1).
function mulberry32(seed) {
let a = seed | 0;
return function () {
a = (a + 0x6D2B79F5) | 0;
let t = Math.imul(a ^ (a >>> 15), 1 | a);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
const monthOf = (iso) => Number(iso.slice(5, 7));
const pad2 = (n) => String(n).padStart(2, '0');
// Nearest-rank quantile of an ascending list: k = ceil(q x n), value = sorted[k - 1].
function nearestRank(sorted, q) {
const k = Math.max(1, Math.ceil(q * sorted.length));
return sorted[k - 1];
}
// Fills the rest of the year by resampling whole past months, draws times, and reads the year-end total each time.
// -> { asOfMonth, historyMonths, draws, confidence, setAsideShare, p10TotalCents, p50TotalCents, p90TotalCents,
// actualGrossCents, paths, grossPaths, drawTotalsCents, drawGrossCents, drawPicks }
// paths / grossPaths: for the first 60 draws, the cumulative tax total / gross receipts at the end of each month.
function bootstrapSetAside(workspace, taxYear, rows, c, seed, { draws, confidence }) {
const prefix = `${taxYear}-`;
const inYear = workspace.transactions.filter((t) => t.date.startsWith(prefix));
const asOfMonth = inYear.reduce((m, t) => Math.max(m, monthOf(t.date)), 0);
const cutoff = `${taxYear}-${pad2(asOfMonth)}`;
const byMonth = {};
// J9: a quick-estimate entry is a whole year in one line, so it is never a month to resample.
for (const t of workspace.transactions) {
const ym = t.date.slice(0, 7);
if (ym < cutoff && !isQuickSummary(t)) (byMonth[ym] = byMonth[ym] || []).push(t);
}
const history = Object.keys(byMonth).sort().map((ym) => byMonth[ym]);
const actual = inYear.filter((t) => monthOf(t.date) <= asOfMonth);
const actualGrossCents = scheduleC(workspace, taxYear).grossReceiptsCents;
const result = { asOfMonth, historyMonths: history.length, draws, confidence, setAsideShare: null, p10TotalCents: null,
p50TotalCents: null, p90TotalCents: null, actualGrossCents, paths: [], grossPaths: [], drawTotalsCents: [], drawGrossCents: [], drawPicks: [] };
if (history.length === 0) return result;
const rng = mulberry32(seed);
const H = history.length;
const ratios = [];
let n = 0;
for (let d = 1; d <= draws; d++) {
const txns = actual.slice();
const picks = [];
for (let m = asOfMonth + 1; m <= 12; m++) {
const i = Math.floor(rng() * H);
picks.push(i);
for (const t of history[i]) {
n++;
txns.push(Object.assign({}, t, { id: `txn_q5_${n}`, date: `${taxYear}-${pad2(m)}-01` }));
}
}
const synthetic = Object.assign({}, workspace, { transactions: txns });
const r = combined(synthetic, taxYear, rows, c);
const gross = r.scheduleC.grossReceiptsCents;
result.drawTotalsCents.push(r.totalCents);
result.drawGrossCents.push(gross);
result.drawPicks.push(picks);
ratios.push(gross === 0 ? 0 : r.totalCents / gross);
if (d <= Math.min(60, draws)) {
const path = [];
const grossPath = [];
for (let m = 1; m <= 12; m++) {
const upTo = `${taxYear}-${pad2(m)}`;
const part = Object.assign({}, workspace, { transactions: txns.filter((t) => t.date.slice(0, 7) <= upTo) });
const at = m === 12 ? r : combined(part, taxYear, rows, c);
path.push(at.totalCents);
grossPath.push(at.scheduleC.grossReceiptsCents);
}
result.paths.push(path);
result.grossPaths.push(grossPath);
}
}
const sortedRatios = ratios.slice().sort((a, b) => a - b);
const sortedTotals = result.drawTotalsCents.slice().sort((a, b) => a - b);
result.setAsideShare = Math.round(nearestRank(sortedRatios, confidence) * 10000) / 10000;
result.p10TotalCents = nearestRank(sortedTotals, 0.1);
result.p50TotalCents = nearestRank(sortedTotals, 0.5);
result.p90TotalCents = nearestRank(sortedTotals, 0.9);
return result;
}
// ---- WO-11 J7: plan next year ----
// Q5 for taxYear + 1 with no actual months: all twelve are resampled from every month the ledger holds before that
// year, and taxed with the rate rows in force for it (entries already dated in that year are left out). The federal
// and Kentucky figures are the ones in c; figuresYear is the year they took effect, and usesEarlierFigures says they
// are standing in for a year whose own figures are not in c yet.
// -> bootstrapSetAside's result for taxYear + 1 (asOfMonth 0), plus { taxYear, figuresYear, usesEarlierFigures }
function planNextYear(workspace, taxYear, rows, c, seed, { draws, confidence }) {
const year = taxYear + 1;
if (!c || !Object.prototype.hasOwnProperty.call(c, 'fed.brackets.single')) throw new Error('missingConstant:fed.brackets.single');
const figuresYear = Number(c['fed.brackets.single'].effectiveDate.slice(0, 4));
const before = Object.assign({}, workspace, { transactions: workspace.transactions.filter((t) => t.date < `${year}-`) });
const r = bootstrapSetAside(before, year, rows, c, seed, { draws, confidence });
return Object.assign(r, { taxYear: year, figuresYear, usesEarlierFigures: figuresYear < year });
}
// ---- Q3: safe-harbor installments and skip cost ----
const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const isLeap = (y) => (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0;
const daysIn = (y, m) => (m === 2 && isLeap(y) ? 29 : DAYS_IN_MONTH[m - 1]);
// The calendar day after an ISO date (no clock, no Date object).
function nextDay(iso) {
let y = Number(iso.slice(0, 4));
let m = Number(iso.slice(5, 7));
let d = Number(iso.slice(8, 10)) + 1;
if (d > daysIn(y, m)) {
d = 1;
m += 1;
if (m > 12) {
m = 1;
y += 1;
}
}
return `${y}-${pad2(m)}-${pad2(d)}`;
}
// The rate record for the period containing isoDate: quarter keys '<YYYY>Q<n>' under 'fed.underpaymentRate', year keys
// '<YYYY>' under 'ky.interestRate'. With no record for that period, the latest earlier one carries forward.
function rateOn(c, prefix, isoDate) {
const year = isoDate.slice(0, 4);
const period = prefix === 'fed.underpaymentRate' ? `${year}Q${Math.ceil(Number(isoDate.slice(5, 7)) / 3)}` : year;
const own = `${prefix}.${period}`;
if (Object.prototype.hasOwnProperty.call(c, own)) return { rate: c[own].value, key: period, carried: false };
const earlier = Object.keys(c).filter((k) => k.startsWith(`${prefix}.`) && c[k].effectiveDate <= isoDate)
.sort((a, b) => (c[a].effectiveDate < c[b].effectiveDate ? -1 : 1));
if (earlier.length === 0) throw new Error(`missingConstant:${own}`);
const last = earlier[earlier.length - 1];
return { rate: c[last].value, key: last.slice(prefix.length + 1), carried: true };
}
// Simple daily accrual: the sum over each day d with due < d <= paid of rateOn(d) / 365, times the amount, rounded once.
function penaltyDays(amountCents, dueIso, paidIso, c, prefix) {
let days = 0;
let factor = 0;
let carried = false;
for (let d = nextDay(dueIso); d <= paidIso; d = nextDay(d)) {
const r = rateOn(c, prefix, d);
factor += r.rate / 365;
carried = carried || r.carried;
days++;
}
return { days, penaltyCents: Math.round(amountCents * factor), carried };
}
// Four installments q, q, q, R - 3q (q = round(R / 4)) on the due dates, each with the penalty if it is skipped and
// paid with the return on the next April 15.
function installments(R, dueDates, filingIso, c, prefix) {
const q = Math.round(R / 4);
return [q, q, q, R - 3 * q].map((amountCents, i) => {
const p = amountCents > 0 ? penaltyDays(amountCents, dueDates[i], filingIso, c, prefix)
: { days: penaltyDays(0, dueDates[i], filingIso, c, prefix).days, penaltyCents: 0, carried: false };
return { dueIso: dueDates[i], amountCents, skipCostCents: p.penaltyCents, skipDays: p.days, carried: p.carried };
});
}
const val = (c, key) => {
if (!c || !Object.prototype.hasOwnProperty.call(c, key)) throw new Error('missingConstant:' + key);
return c[key].value;
};
function safeHarbor(workspace, taxYear, rows, c) {
const r = combined(workspace, taxYear, rows, c);
const s = workspace.settings;
const cal = quarterlyCalendar(taxYear, c);
const filingIso = `${taxYear + 1}-04-15`;
const fedCurrent = r.federal.taxCents + r.se.totalCents;
const priorTax = s.priorYearTaxCents === undefined ? null : s.priorYearTaxCents;
let fedBasis;
let fedRequired;
let priorPct = null;
if (fedCurrent < val(c, 'fed.est.minimumOwedCents')) {
fedBasis = 'belowThreshold';
fedRequired = 0;
} else if (priorTax === 0) {
fedBasis = 'noPriorLiability';
fedRequired = 0;
} else {
const cur = Math.round(val(c, 'fed.est.safeHarbor.currentPct') * fedCurrent);
if (priorTax === null) {
fedBasis = 'current90';
fedRequired = cur;
} else {
const high = s.priorYearAgiCents !== null && s.priorYearAgiCents > val(c, 'fed.est.safeHarbor.highAgiThresholdCents');
priorPct = high ? val(c, 'fed.est.safeHarbor.priorPctHighAgi') : val(c, 'fed.est.safeHarbor.priorPct');
const prior = Math.round(priorPct * priorTax);
// The smaller amount sets the basis; a tie goes to current90.
if (prior < cur) {
fedBasis = high ? 'prior110' : 'prior100';
fedRequired = prior;
} else {
fedBasis = 'current90';
fedRequired = cur;
}
}
}
const kyCurrent = r.ky.taxCents;
const kyBelow = kyCurrent <= val(c, 'ky.est.thresholdCents');
const kyRequired = kyBelow ? 0 : Math.round(val(c, 'ky.est.safeHarbor.currentPct') * kyCurrent);
return {
federal: { currentYearTaxCents: fedCurrent, priorYearTaxCents: priorTax, priorPct, requiredAnnualCents: fedRequired, basis: fedBasis,
installments: installments(fedRequired, cal.federal, filingIso, c, 'fed.underpaymentRate') },
ky: { currentYearTaxCents: kyCurrent, requiredAnnualCents: kyRequired, basis: kyBelow ? 'belowThreshold' : 'current90',
installments: installments(kyRequired, cal.ky, filingIso, c, 'ky.interestRate') }
};
}
// ---- Q6: back-filing exposure (local returns only) ----
// Whole months late: 0 on or before the due date; otherwise the month difference plus one when the day of the month
// has passed the due day (a part month counts as a full month).
function monthsLate(asOfIso, dueIso) {
if (asOfIso <= dueIso) return 0;
const [ay, am, ad] = asOfIso.split('-').map(Number);
const [dy, dm, dd] = dueIso.split('-').map(Number);
return (ay - dy) * 12 + (am - dm) + (ad > dd ? 1 : 0);
}
// asOf + k months, same day, clamped to the month's end.
function addMonths(iso, k) {
const y0 = Number(iso.slice(0, 4));
const m0 = Number(iso.slice(5, 7));
const d0 = Number(iso.slice(8, 10));
const total = (m0 - 1) + k;
const y = y0 + Math.floor(total / 12);
const m = (total % 12) + 1;
return `${y}-${pad2(m)}-${pad2(Math.min(d0, daysIn(y, m)))}`;
}
function filed(workspace, districtId, taxYear) {
return workspace.filings.some((f) => f.districtId === districtId && f.taxYear === taxYear && f.status === 'filed');
}
// The rate row behind a line, for its late-penalty and interest terms (a custom row has neither).
function termsRow(workspace, rows, districtId, taxYear) {
const custom = workspace.customRates.find((r) => r.districtId === districtId);
return custom ? fallbackRow(custom) : rateRow(rows, districtId, taxYear);
}
function lateLine(workspace, rows, line, taxYear, asOfIso) {
const dueIso = `${taxYear + 1}-04-15`;
const m = monthsLate(asOfIso, dueIso);
const row = termsRow(workspace, rows, line.districtId, taxYear) || {};
const lp = row.latePenalty || { pctPerMonth: null, maxPct: null, minimumCents: null };
const tax = line.liabilityCents;
let penaltyCents = 0;
let interestCents = 0;
if (m >= 1) {
const pctPart = lp.pctPerMonth !== null && lp.maxPct !== null ? Math.round(tax * Math.min(lp.pctPerMonth * m, lp.maxPct) / 100) : 0;
penaltyCents = Math.max(pctPart, lp.minimumCents === null || lp.minimumCents === undefined ? 0 : lp.minimumCents);
interestCents = row.interestPctPerYear === null || row.interestPctPerYear === undefined ? 0
: Math.round(tax * row.interestPctPerYear / 100 * m / 12);
}
return { districtId: line.districtId, name: line.name, taxYear, status: m === 0 ? 'accruing' : 'late', dueIso, taxCents: tax,
monthsLate: m, penaltyCents, interestCents, totalCents: tax + penaltyCents + interestCents,
penaltyKnown: lp.pctPerMonth !== null && lp.pctPerMonth !== undefined,
interestKnown: row.interestPctPerYear !== null && row.interestPctPerYear !== undefined };
}
function exposureAt(workspace, taxYear, rows, asOfIso) {
const years = [...new Set(workspace.transactions.map((t) => Number(t.date.slice(0, 4))))].filter((y) => y < taxYear).sort();
const lines = [];
const blindSpots = new Set();
for (const y of years) {
for (const l of localLiability(workspace, y, rows)) {
if (!(l.liabilityCents > 0 || l.filingRequired) || filed(workspace, l.districtId, y)) continue;
lines.push(lateLine(workspace, rows, l, y, asOfIso));
blindSpots.add(l.districtId);
}
}
// Current-year accrual for every blind-spot district: tax only until its due date passes, then late like the rest.
for (const l of localLiability(workspace, taxYear, rows)) {
if (blindSpots.has(l.districtId) && !filed(workspace, l.districtId, taxYear)) lines.push(lateLine(workspace, rows, l, taxYear, asOfIso));
}
const lateTotalCents = lines.filter((l) => l.status === 'late').reduce((a, l) => a + l.totalCents, 0);
const accruedCents = lines.filter((l) => l.status === 'accruing').reduce((a, l) => a + l.taxCents, 0);
return { lines, lateTotalCents, accruedCents, exposureCents: lateTotalCents + accruedCents };
}
function backFilingExposure(workspace, taxYear, rows, c, asOfIso) {
const now = exposureAt(workspace, taxYear, rows, asOfIso);
const curve = [];
for (let k = 0; k <= 12; k++) {
const dateIso = addMonths(asOfIso, k);
curve.push({ dateIso, exposureCents: k === 0 ? now.exposureCents : exposureAt(workspace, taxYear, rows, dateIso).exposureCents });
}
return { asOfIso, lines: now.lines, lateTotalCents: now.lateTotalCents, accruedCents: now.accruedCents,
exposureCents: now.exposureCents, perMonthCents: curve[1].exposureCents - curve[0].exposureCents, curve };
}
// ---- WO-12 J9: how far into the year the ledger runs ----
// The last month of taxYear with an entry (1-12), or 0 when the year has none. Year-to-date figures are "through" it.
function lastLedgerMonth(workspace, taxYear) {
const prefix = `${taxYear}-`;
return workspace.transactions.reduce((m, t) => (t.date.startsWith(prefix) ? Math.max(m, Number(t.date.slice(5, 7))) : m), 0);
}
// ---- WO-13 V4: months elapsed ----
// How much of taxYear the ledger covers. L is the latest entry dated in the year;
// monthsElapsed = (month(L) - 1) + day(L) / daysInMonth(L): exactly 10 for a ledger that ends on Oct 31, 10 + 16/30
// for one that ends on Nov 16. monthEnd: L is the last day of its month. null when the year has no entry.
// It feeds the monthly keep figure and the "(through …)" labels. The set-aside run (bootstrapSetAside) still counts
// whole months through lastLedgerMonth: giving it the part month changes the draws of golden case Q5-1, whose ledger
// ends on Mar 20, and no golden figure may move.
// -> { lastIso, month, day, daysInMonth, monthEnd, monthsElapsed } | null
function ledgerPeriod(workspace, taxYear) {
const prefix = `${taxYear}-`;
let lastIso = null;
for (const t of workspace.transactions) if (t.date.startsWith(prefix) && (lastIso === null || t.date > lastIso)) lastIso = t.date;
if (lastIso === null) return null;
const month = Number(lastIso.slice(5, 7));
const day = Number(lastIso.slice(8, 10));
const daysInMonth = daysIn(taxYear, month);
return { lastIso, month, day, daysInMonth, monthEnd: day === daysInMonth, monthsElapsed: (month - 1) + day / daysInMonth };
}
// ---- WO-11 J1: where every $100 invoiced goes ----
// Business costs, taxes and what is kept out of each $100 of gross: whole cents that total exactly 10,000 (largest
// remainders first; costs, then taxes, then kept on a tie). null when there is no gross, or when costs and taxes
// together are more than it.
function everyHundred(grossCents, expenseCents, taxCents) {
const keptCents = grossCents - expenseCents - taxCents;
if (!(grossCents > 0) || expenseCents < 0 || taxCents < 0 || keptCents < 0) return null;
const parts = [expenseCents, taxCents, keptCents].map((x, i) => ({ i, whole: Math.floor(x * 10000 / grossCents), rest: (x * 10000) % grossCents }));
let left = 10000 - parts.reduce((a, p) => a + p.whole, 0);
for (const p of parts.slice().sort((a, b) => b.rest - a.rest || a.i - b.i)) {
if (left <= 0) break;
p.whole++;
left--;
}
return { costsCents: parts[0].whole, taxesCents: parts[1].whole, keptCents: parts[2].whole };
}
// ---- WO-11 J2: the typical job ----
// The most common amount among the year's line 1 income entries (the smaller amount on a tie), when at least five
// entries share it; otherwise null. On the demo it is the $165 full detail.
function typicalJobCents(workspace, taxYear) {
const counts = {};
for (const t of workspace.transactions) {
if (t.category === 'income' && t.scheduleCLine === '1' && t.date.startsWith(`${taxYear}-`)) counts[t.amountCents] = (counts[t.amountCents] || 0) + 1;
}
let best = null;
for (const key of Object.keys(counts)) {
const cents = Number(key);
if (best === null || counts[key] > counts[best] || (counts[key] === counts[best] && cents < best)) best = cents;
}
return best !== null && counts[best] >= 5 ? best : null;
}
// ---- WO-10 D2: the tax offices the year's total goes to ----
// One office for the federal total (income tax plus self-employment tax), one for Kentucky, and one per local line
// (every district with a liability or a required return). status:
// 'neverFiled' an earlier year's return for the district is unfiled, or this year's is already late;
// 'filed' an earlier year is marked filed and none is unfiled;
// 'notDue' nothing earlier is on record; this year's return is not due yet. For federal and Kentucky, whose
// filings this page does not track, it means no quarterly installment that has come due went unpaid;
// otherwise theirs is 'paymentsMissed' or 'paymentsShort' (J9), with missedCount and shortCount.
// -> { totalCents, localTotalCents, offices: [{ key, kind, name, districtId, owedCents, status }], unfiledCount,
// combined, backFiling }
function taxOffices(workspace, taxYear, rows, c, asOfIso) {
const r = combined(workspace, taxYear, rows, c);
const back = backFilingExposure(workspace, taxYear, rows, c, asOfIso);
// J9: the IRS and Kentucky cards say what the tax jar says. Of the quarterly installments that have come due, how
// many had nothing paid toward them (missed) and how many were part paid (short); none when the year has no calendar.
let pastDue = [];
try {
pastDue = taxJar(workspace, taxYear, rows, c, 0, asOfIso).pastDue.filter((p) => p.requiredCents > 0);
} catch (e) {
if (!(e && /^missingConstant:/.test(e.message))) throw e;
}
const quarterly = (office) => {
const mine = pastDue.filter((p) => p.office === office);
const missedCount = mine.filter((p) => p.paidCents === 0).length;
const shortCount = mine.filter((p) => p.paidCents > 0 && p.shortCents > 0).length;
return { missedCount, shortCount, status: missedCount > 0 ? 'paymentsMissed' : shortCount > 0 ? 'paymentsShort' : 'notDue' };
};
const offices = [
Object.assign({ key: 'irs', kind: 'federal', name: null, districtId: null, owedCents: r.federal.taxCents + r.se.totalCents }, quarterly('federal')),
Object.assign({ key: 'kydor', kind: 'state', name: null, districtId: null, owedCents: r.ky.taxCents }, quarterly('ky'))
];
for (const l of r.local) {
const unfiled = back.lines.some((b) => b.districtId === l.districtId && (b.taxYear < taxYear || b.status === 'late'));
const earlierFiled = workspace.filings.some((f) => f.districtId === l.districtId && f.taxYear < taxYear && f.status === 'filed');
offices.push({ key: l.districtId, kind: l.custom ? 'custom' : l.kind, name: l.name, districtId: l.districtId,
owedCents: l.liabilityCents, status: unfiled ? 'neverFiled' : earlierFiled ? 'filed' : 'notDue' });
}
return { totalCents: r.totalCents, localTotalCents: r.localTotalCents, offices,
unfiledCount: offices.filter((o) => o.status === 'neverFiled').length, combined: r, backFiling: back };
}
// ---- WO-11 J3: the tax jar ----
// What has been set aside and paid against what the set-aside share says is needed by today.
// share: the set-aside share in use (Q5's, passed in by ui).
// grossToDateCents: gross receipts (line 1) dated in the tax year, on or before today.
// shouldHaveCents = round(share x grossToDate); paidCents = the tax year's payments; balanceCents = the savings balance
// (0 when not entered); coveredCents = paid + balance; gapCents = shouldHave - covered (negative means ahead).
// pastDue: every federal and Kentucky installment (Q3's) due before today, with what was paid toward it by its due
// date. Payments to that office count in date order and fill the earliest installment first.
// nextDue: the first due date on or after today, with that date's federal and Kentucky amounts; null after the last.
// -> { grossToDateCents, shouldHaveCents, paidCents, balanceCents, coveredCents, gapCents,
// paidByOffice: { federal, ky, local }, nextDue: { dueIso, federalCents, kyCents } | null,
// pastDue: [{ dueIso, office, requiredCents, paidCents, shortCents }] }
// Every installment of one office (Q3's) with what was paid toward it by its due date: payments to that office count
// in date order and fill the earliest installment first.
function installmentCover(harbor, payments, office) {
let requiredBefore = 0;
return harbor[office].installments.map((inst) => {
const paidByThen = payments.filter((p) => p.office === office && p.date <= inst.dueIso).reduce((a, p) => a + p.amountCents, 0);
const paid = Math.max(0, Math.min(inst.amountCents, paidByThen - requiredBefore));
requiredBefore += inst.amountCents;
return { dueIso: inst.dueIso, office, requiredCents: inst.amountCents, paidCents: paid, shortCents: inst.amountCents - paid };
});
}
function taxJar(workspace, taxYear, rows, c, share, todayIso) {
const prefix = `${taxYear}-`;
let grossToDateCents = 0;
for (const t of workspace.transactions) {
if (t.category === 'income' && t.scheduleCLine === '1' && t.date.startsWith(prefix) && t.date <= todayIso) grossToDateCents += t.amountCents;
}
const payments = workspace.taxPayments.filter((p) => p.taxYear === taxYear);
const paidByOffice = { federal: 0, ky: 0, local: 0 };
for (const p of payments) paidByOffice[p.office === 'federal' || p.office === 'ky' ? p.office : 'local'] += p.amountCents;
const paidCents = paidByOffice.federal + paidByOffice.ky + paidByOffice.local;
const balanceCents = workspace.settings.setAsideBalanceCents === null || workspace.settings.setAsideBalanceCents === undefined
? 0 : workspace.settings.setAsideBalanceCents;
const shouldHaveCents = Math.round(share * grossToDateCents);
const coveredCents = paidCents + balanceCents;
const harbor = safeHarbor(workspace, taxYear, rows, c);
const pastDue = installmentCover(harbor, payments, 'federal').concat(installmentCover(harbor, payments, 'ky')).filter((i) => i.dueIso < todayIso);
pastDue.sort((a, b) => (a.dueIso < b.dueIso ? -1 : a.dueIso > b.dueIso ? 1 : a.office === b.office ? 0 : a.office === 'federal' ? -1 : 1));
const upcoming = harbor.federal.installments.concat(harbor.ky.installments).map((i) => i.dueIso).filter((d) => d >= todayIso).sort();
const amountOn = (office, dueIso) => harbor[office].installments.filter((i) => i.dueIso === dueIso).reduce((a, i) => a + i.amountCents, 0);
const nextDue = upcoming.length === 0 ? null
: { dueIso: upcoming[0], federalCents: amountOn('federal', upcoming[0]), kyCents: amountOn('ky', upcoming[0]) };
return { grossToDateCents, shouldHaveCents, paidCents, balanceCents, coveredCents, gapCents: shouldHaveCents - coveredCents,
paidByOffice, nextDue, pastDue };
}
// ---- WO-11 J4: the cost that paying and filing on time avoids ----
// catchUpCents: what the local returns that are late today cost to file now (the unfiled tax, its penalty and interest).
// latePenaltiesCents: the penalty and interest part of that.
// skipCostCents: Q3's skip cost (the underpayment penalty to the filing date) on the part of every federal and Kentucky
// installment that payments do not cover: the ones that have come due (taxJar's pastDue) and the ones still ahead.
// 0 with skipKnown false when the tax year has no due-date or rate record.
// totalPenaltyCents = latePenaltiesCents + skipCostCents.
// J9, a year from today, split by tax year (together with what is still accruing then, they are curve[12]):
// earlierInAYearCents: the earlier years' returns that are unfiled today, with a year more of penalty and interest;
// thisYearLateCents: this year's returns, if they are late by then and still unfiled (0 when they are not yet due).
// -> { catchUpCents, latePenaltiesCents, skipCostCents, skipFederalCents, skipKyCents, skipKnown, totalPenaltyCents,
// earlierInAYearCents, thisYearLateCents }
function avoidableCost(workspace, taxYear, rows, c, todayIso) {
const back = backFilingExposure(workspace, taxYear, rows, c, todayIso);
const inAYear = exposureAt(workspace, taxYear, rows, addMonths(todayIso, 12)).lines.filter((l) => l.status === 'late');
const earlierInAYearCents = inAYear.filter((l) => l.taxYear < taxYear).reduce((a, l) => a + l.totalCents, 0);
const thisYearLateCents = inAYear.filter((l) => l.taxYear === taxYear).reduce((a, l) => a + l.totalCents, 0);
const latePenaltiesCents = back.lines.filter((l) => l.status === 'late').reduce((a, l) => a + l.penaltyCents + l.interestCents, 0);
const skip = { federal: 0, ky: 0 };
let skipKnown = true;
try {
const harbor = safeHarbor(workspace, taxYear, rows, c);
const payments = workspace.taxPayments.filter((p) => p.taxYear === taxYear);
const filingIso = `${taxYear + 1}-04-15`;
for (const [office, prefix] of [['federal', 'fed.underpaymentRate'], ['ky', 'ky.interestRate']]) {
for (const i of installmentCover(harbor, payments, office)) {
if (i.shortCents > 0) skip[office] += penaltyDays(i.shortCents, i.dueIso, filingIso, c, prefix).penaltyCents;
}
}
} catch (e) {
if (!(e && /^missingConstant:/.test(e.message))) throw e;
skip.federal = 0;
skip.ky = 0;
skipKnown = false;
}
const skipCostCents = skip.federal + skip.ky;
return { catchUpCents: back.lateTotalCents, latePenaltiesCents, skipCostCents, skipFederalCents: skip.federal, skipKyCents: skip.ky,
skipKnown, totalPenaltyCents: latePenaltiesCents + skipCostCents, earlierInAYearCents, thisYearLateCents };
}
// ---- Q4: annualized-income installments (Form 2210 Schedule AI; Form 2210-K Part III) ----
// Annualized tax on an annualized net profit: federal = income tax + all SE tax; Kentucky = tax on the annualized federal
// AGI. The full standard deduction applies, and SE uses the full (not prorated) wage base.
function annualizedTax(netProfitCents, settings, c) {
const se = selfEmploymentTax(netProfitCents, settings.filingStatus, c);
const fed = federalIncomeTax({ netProfitCents, deductibleHalfSeCents: se.deductibleHalfCents, filingStatus: settings.filingStatus,
itemizedOverrideCents: settings.itemizedOverrideCents }, c);
return { federal: fed.taxCents + se.totalCents, ky: kentuckyIncomeTax({ federalAgiCents: fed.agiCents }, c).taxCents };
}
function aiSchedule(which, harbor, ytd, available, settings, c, factors, pcts, endMonths) {
const R = harbor.requiredAnnualCents;
const none = harbor.basis === 'belowThreshold' || harbor.basis === 'noPriorLiability';
const regular = harbor.installments.map((i) => i.amountCents);
const periods = [];
let carry = 0;
let requiredSoFar = 0;
let regularSoFar = 0;
const deferredByDueCents = [];
for (let i = 0; i < 4; i++) {
const p = { endMonth: endMonths[i], factor: factors[i], applicablePct: pcts[i], available: available[i], ytdNetCents: null,
annualizedNetCents: null, annualizedTaxCents: null, cumulativeCents: null, aiInstallmentCents: null,
regularInstallmentCents: regular[i] + carry, requiredInstallmentCents: null, dueIso: harbor.installments[i].dueIso };
regularSoFar += regular[i];
if (none) {
Object.assign(p, { regularInstallmentCents: 0, aiInstallmentCents: 0, requiredInstallmentCents: 0 });
} else if (available[i]) {
p.ytdNetCents = ytd[i];
p.annualizedNetCents = Math.round(ytd[i] * factors[i]);
p.annualizedTaxCents = annualizedTax(p.annualizedNetCents, settings, c)[which];
p.cumulativeCents = Math.round(p.annualizedTaxCents * pcts[i]);
p.aiInstallmentCents = Math.max(0, p.cumulativeCents - requiredSoFar);
p.requiredInstallmentCents = Math.min(p.aiInstallmentCents, p.regularInstallmentCents);
carry = p.regularInstallmentCents - p.requiredInstallmentCents;
requiredSoFar += p.requiredInstallmentCents;
}
// Pending periods contribute nothing; availability is monotone, so every later period is pending too.
deferredByDueCents.push(none ? 0 : p.requiredInstallmentCents === null ? null : regularSoFar - requiredSoFar);
periods.push(p);
}
return { requiredAnnualCents: none ? 0 : R, periods, totalRequiredCents: requiredSoFar, deferredByDueCents };
}
function annualizedInstallments(workspace, taxYear, rows, c) {
const harbor = safeHarbor(workspace, taxYear, rows, c);
const endMonths = val(c, 'fed.ai.periodsEndMonth');
const prefix = `${taxYear}-`;
const months = workspace.transactions.filter((t) => t.date.startsWith(prefix)).map((t) => monthOf(t.date));
const available = endMonths.map((m) => months.some((x) => x >= m));
const ytd = endMonths.map((m) => {
const upTo = `${taxYear}-${pad2(m)}`;
const part = Object.assign({}, workspace, { transactions: workspace.transactions.filter((t) => t.date.startsWith(prefix) && t.date.slice(0, 7) <= upTo) });
return scheduleC(part, taxYear).netProfitCents;
});
return {
federal: aiSchedule('federal', harbor.federal, ytd, available, workspace.settings, c, val(c, 'fed.ai.factors'),
val(c, 'fed.ai.applicablePcts'), endMonths),
ky: aiSchedule('ky', harbor.ky, ytd, available, workspace.settings, c, val(c, 'ky.est.ai.factors'),
val(c, 'ky.est.ai.applicablePcts'), endMonths)
};
}
return { withExtraIncome, marginalRates, quoteToNet, mulberry32, bootstrapSetAside, planNextYear, rateOn, penaltyDays, safeHarbor, monthsLate, backFilingExposure, lastLedgerMonth, ledgerPeriod, everyHundred, typicalJobCents, taxOffices, taxJar, avoidableCost, annualizedInstallments };
})();
// ---- ui-changed ----
const ui_changed = (() => {
const { combined } = tax;
const { COPY, shortDistrictName } = copy;
// ui-changed.js — layer 4, imported only by ui.js. WO-14 W2: what the entry just added changed. The year is computed
// on the workspace before the entry and again with it (tax.combined, the computation every figure on the page comes
// from) and the two are subtracted, office by office. Nothing here is a formula of its own, and nothing is saved.
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) node.setAttribute(k, attrs[k]);
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${cents < 0 ? '-' : ''}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
const signed = (cents) => `${cents < 0 ? '-' : '+'}${formatCents(Math.abs(cents))}`;
// The offices of one year's computation with what each is owed, as the Overview's table lists them: the IRS (income
// tax and self-employment tax), Kentucky, then every local office.
function officesOf(r) {
const local = r.local.map((l) => {
const name = shortDistrictName({ districtId: l.districtId, name: l.name, kind: l.kind, custom: l.custom });
return { key: l.districtId, name: l.custom ? `${name} (${COPY.notInTable})` : name, cents: l.liabilityCents };
});
return [{ key: 'irs', name: COPY.officeNames.irs, cents: r.federal.taxCents + r.se.totalCents },
{ key: 'kydor', name: COPY.officeNames.kydor, cents: r.ky.taxCents }].concat(local);
}
// before, after: the workspace without and with the entry txn. placeName: where the job was, in words (null for an
// expense). -> null when the year cannot be computed or nothing moved, otherwise
// { after, kind, amountCents, placeName, rows: [{ key, name, cents }], totalCents, keptCents, savedCents }
// rows holds only the offices whose amount moved (federal and Kentucky first, then local, largest move first);
// keptCents = the job's amount less the rise in total tax (null for an expense); savedCents = the fall in total tax
// an expense brought (null for a job).
function whatChanged(before, after, txn, rows, c, placeName) {
const taxYear = after.settings.taxYear;
let was;
let now;
try {
was = combined(before, taxYear, rows, c);
now = combined(after, taxYear, rows, c);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
return null;
}
const old = new Map(officesOf(was).map((o) => [o.key, o]));
const moved = [];
for (const o of officesOf(now)) {
const cents = o.cents - (old.has(o.key) ? old.get(o.key).cents : 0);
old.delete(o.key);
if (cents !== 0) moved.push({ key: o.key, name: o.name, cents });
}
// An office the year no longer reaches.
for (const o of old.values()) if (o.cents !== 0) moved.push({ key: o.key, name: o.name, cents: -o.cents });
const totalCents = now.totalCents - was.totalCents;
if (moved.length === 0 && totalCents === 0) return null;
const top = moved.filter((m) => m.key === 'irs' || m.key === 'kydor');
const local = moved.filter((m) => m.key !== 'irs' && m.key !== 'kydor').sort((a, b) => Math.abs(b.cents) - Math.abs(a.cents) || (a.key < b.key ? -1 : 1));
const job = txn.category === 'income';
const amountCents = Math.abs(txn.amountCents);
return { after, kind: job ? 'job' : 'expense', amountCents, placeName: job ? placeName : null, rows: top.concat(local), totalCents,
keptCents: job ? amountCents - totalCents : null, savedCents: job ? null : -totalCents };
}
function changedTitle(change) {
const amount = formatCents(change.amountCents);
return change.kind === 'job' && change.placeName ? COPY.changed.titleJob(amount, change.placeName)
: change.kind === 'job' ? COPY.changed.titleJobNoPlace(amount) : COPY.changed.titleExpense(amount);
}
// The card: a title, one row per office that moved, the total, the bold last line, one caption and Dismiss.
// ids are prefixed, since the Overview's card and the confirmation on another tab can both be in the page.
function renderChanged(parent, change, prefix, extraClass, onDismiss) {
const sec = parent.appendChild(make('section', { id: `${prefix}-card`, class: extraClass, 'aria-labelledby': `${prefix}-title` }));
sec.appendChild(make('h3', { id: `${prefix}-title` }, changedTitle(change)));
const dl = sec.appendChild(make('dl', { id: `${prefix}-rows`, class: 'totals changed-rows' }));
for (const r of change.rows) {
dl.appendChild(make('dt', { 'data-office': r.key }, r.name));
dl.appendChild(make('dd', { class: 'num changed-amount', 'data-office': r.key, 'data-cents': String(r.cents) }, signed(r.cents)));
}
dl.appendChild(make('dt', { class: 'strong' }, COPY.changed.total));
dl.appendChild(make('dd', { id: `${prefix}-total`, class: 'num strong', 'data-cents': String(change.totalCents) }, signed(change.totalCents)));
const job = change.kind === 'job';
const last = job ? COPY.changed.kept(formatCents(change.keptCents), COPY.fmtPct0(change.keptCents / change.amountCents))
: COPY.changed.saved(formatCents(change.savedCents));
sec.appendChild(make('p', { id: `${prefix}-kept`, class: 'changed-kept', 'data-cents': String(job ? change.keptCents : change.savedCents) }, last));
sec.appendChild(make('p', { id: `${prefix}-caption`, class: 'caption' }, COPY.changed.caption));
const actions = sec.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: `${prefix}-dismiss`, type: 'button', class: 'plain' }, COPY.changed.dismiss)).addEventListener('click', onDismiss);
return sec;
}
return { whatChanged, changedTitle, renderChanged };
})();
// ---- ui-import ----
const ui_import = (() => {
const { addTransactions, txnHash } = book;
const { parseCsv, headerSignature, detectMapping, mapColumns } = io;
const { COPY, formatDate } = copy;
// ui-import.js — layer 4, imported only by ui.js. Bank CSV import: file picker, mapping controls, preview, commit.
const MAX_CSV_BYTES = 5 * 1024 * 1024;
const MAX_MAPPINGS = 50;
const PREVIEW_LIMIT = 200;
const SHAPES = ['signed', 'debitCredit', 'typed'];
const COLUMN_KEYS = ['date', 'description', 'amount', 'debit', 'credit', 'type', 'inflowValue'];
const SHAPE_COLUMNS = {
signed: ['date', 'description', 'amount'],
debitCredit: ['date', 'description', 'debit', 'credit'],
typed: ['date', 'description', 'amount', 'type', 'inflowValue']
};
let ws = null;
let commitFn = null;
let input = null;
let dialog = null;
let state = null;
const el = {};
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function announce(text) {
const status = document.getElementById('status');
if (status) status.textContent = text;
}
function ensureDom() {
if (dialog) return;
input = make('input', { id: 'import-input', type: 'file', accept: '.csv,text/csv', hidden: true, 'aria-label': COPY.importButton });
input.addEventListener('change', () => {
const file = input.files && input.files[0];
input.value = '';
if (file) readFile(file);
});
document.body.appendChild(input);
dialog = make('dialog', { id: 'import-dialog', 'aria-labelledby': 'import-title' });
dialog.appendChild(make('h2', { id: 'import-title' }, COPY.importTitle));
el.fileName = dialog.appendChild(make('p', { id: 'import-file-name', class: 'hint' }));
dialog.appendChild(make('h3', {}, COPY.importRawTitle));
el.raw = dialog.appendChild(make('div', { class: 'table-wrap' })).appendChild(make('table', { id: 'import-raw' }));
el.parseErrors = dialog.appendChild(make('div', { id: 'import-parse-errors', class: 'inline-warning', hidden: true }));
const shapeSet = dialog.appendChild(make('fieldset', { id: 'import-shape' }));
shapeSet.appendChild(make('legend', {}, COPY.importShape));
for (const shape of SHAPES) {
const label = shapeSet.appendChild(make('label', { class: 'radio' }));
const radio = label.appendChild(make('input', { type: 'radio', name: 'import-shape', id: `import-shape-${shape}`, value: shape }));
label.appendChild(document.createTextNode(` ${COPY.importShapes[shape]}`));
radio.addEventListener('change', () => {
state.mapping.shape = shape;
renderControls();
renderPreview();
});
}
el.columns = dialog.appendChild(make('div', { id: 'import-columns' }));
dialog.appendChild(make('h3', {}, COPY.importPreviewTitle));
el.count = dialog.appendChild(make('p', { id: 'import-count' }));
el.rowErrors = dialog.appendChild(make('div', { id: 'import-row-errors', class: 'inline-warning', hidden: true }));
const previewWrap = dialog.appendChild(make('div', { class: 'table-wrap preview-wrap' }));
const preview = previewWrap.appendChild(make('table', { id: 'import-preview' }));
const head = preview.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['date', 'description', 'amount', 'category', 'status']) {
head.appendChild(make('th', { scope: 'col', class: k === 'amount' ? 'num' : '' }, COPY.importPreviewColumns[k]));
}
el.previewBody = preview.appendChild(make('tbody'));
el.more = dialog.appendChild(make('p', { id: 'import-more', class: 'hint', hidden: true }));
el.locationField = dialog.appendChild(make('div', { class: 'field', id: 'import-location-field', hidden: true }));
el.locationField.appendChild(make('label', { for: 'import-location' }, COPY.importDefaultLocation));
el.location = el.locationField.appendChild(make('select', { id: 'import-location', required: '' }));
el.needsLocation = dialog.appendChild(make('p', { id: 'import-needs-location', class: 'inline-error', hidden: true }, COPY.importNeedsLocation));
const actions = dialog.appendChild(make('div', { class: 'dialog-actions' }));
el.cancel = actions.appendChild(make('button', { id: 'import-cancel', type: 'button' }, COPY.importCancel));
el.commit = actions.appendChild(make('button', { id: 'import-commit', type: 'button', class: 'primary' }, COPY.importCommit));
el.cancel.addEventListener('click', closeDialog);
dialog.addEventListener('cancel', (e) => {
e.preventDefault();
closeDialog();
});
el.commit.addEventListener('click', commitImport);
document.body.appendChild(dialog);
}
// Opens a modal dialog and returns focus to the control that opened it when it closes.
function showDialog(dialog, opener) {
if (dialog.open) return;
const back = opener || document.activeElement;
dialog.addEventListener('close', () => {
if (back && back !== document.body && document.contains(back)) back.focus();
}, { once: true });
dialog.showModal();
}
async function readFile(file) {
if (file.size > MAX_CSV_BYTES) {
announce(COPY.importTooLarge);
return;
}
const parsed = parseCsv(await file.text());
const signature = headerSignature(parsed.headers);
const saved = ws.settings.csvMappings.find((m) => m.signature === signature);
const base = saved || detectMapping(parsed.headers, parsed.rows);
state = {
fileName: file.name,
headers: parsed.headers,
rows: parsed.rows,
parseErrors: parsed.errors,
signature,
mapping: { shape: base.shape, columns: Object.assign({}, base.columns) },
mapped: { txns: [], errors: [] }
};
el.fileName.textContent = COPY.importFileName(file.name);
renderRaw();
renderParseErrors();
renderControls();
renderPreview();
showDialog(dialog, opener);
}
function renderRaw() {
el.raw.textContent = '';
const head = el.raw.appendChild(make('thead')).appendChild(make('tr'));
for (const h of state.headers) head.appendChild(make('th', { scope: 'col' }, h));
const body = el.raw.appendChild(make('tbody'));
for (const r of state.rows.slice(0, 5)) {
const tr = body.appendChild(make('tr'));
for (const cell of r) tr.appendChild(make('td', {}, cell));
}
}
function errorList(container, lead, items) {
container.textContent = '';
container.hidden = items.length === 0;
if (!items.length) return;
container.appendChild(make('p', {}, lead));
const list = container.appendChild(make('ul'));
for (const text of items) list.appendChild(make('li', {}, text));
}
function renderParseErrors() {
const items = state.parseErrors.map((e) => COPY.importErrorLine(e.line, COPY.importErrors[e.code]));
errorList(el.parseErrors, COPY.importParseErrorCount(items.length), items);
}
function columnSelect(key) {
const id = `import-col-${key}`;
const wrap = make('div', { class: 'field' });
wrap.appendChild(make('label', { for: id }, COPY.importColumn[key]));
const select = wrap.appendChild(make('select', { id }));
select.appendChild(make('option', { value: '' }, COPY.importChoose));
let values = state.headers;
if (key === 'inflowValue') {
const typeAt = state.headers.indexOf(state.mapping.columns.type);
values = typeAt < 0 ? [] : [...new Set(state.rows.map((r) => r[typeAt].trim()).filter(Boolean))];
}
for (const v of values) select.appendChild(make('option', { value: v }, v));
const currentValue = state.mapping.columns[key];
select.value = currentValue !== null && values.includes(currentValue) ? currentValue : '';
if (select.value === '') state.mapping.columns[key] = null;
select.addEventListener('change', () => {
state.mapping.columns[key] = select.value === '' ? null : select.value;
if (key === 'type') renderControls();
renderPreview();
});
if (key === 'date') wrap.appendChild(make('p', { id: 'import-date-note', class: 'hint field-note' }, COPY.importDateOrderNote));
return wrap;
}
function renderControls() {
document.getElementById(`import-shape-${state.mapping.shape}`).checked = true;
el.columns.textContent = '';
for (const key of SHAPE_COLUMNS[state.mapping.shape]) el.columns.appendChild(columnSelect(key));
}
function mappingComplete() {
return SHAPE_COLUMNS[state.mapping.shape].every((k) => state.mapping.columns[k] !== null);
}
function renderPreview() {
const complete = mappingComplete();
state.mapped = complete
? mapColumns(state.headers, state.rows, { shape: state.mapping.shape, columns: state.mapping.columns, dateOrder: 'us' })
: { txns: [], errors: [] };
const seen = new Set(ws.transactions.map((t) => t.hash));
const flags = state.mapped.txns.map((t) => {
const h = txnHash(t);
const dup = seen.has(h);
seen.add(h);
return dup;
});
const dupes = flags.filter(Boolean).length;
el.count.textContent = state.rows.length === 0 ? COPY.importNoRows : COPY.importPreviewCount(state.mapped.txns.length, dupes);
el.previewBody.textContent = '';
state.mapped.txns.slice(0, PREVIEW_LIMIT).forEach((t, i) => {
const tr = el.previewBody.appendChild(make('tr', { class: flags[i] ? 'duplicate' : '' }));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(t.date)));
tr.appendChild(make('td', {}, t.description));
tr.appendChild(make('td', { class: 'num nowrap' }, formatCents(t.amountCents)));
tr.appendChild(make('td', {}, COPY.ledgerCategory[t.category]));
tr.appendChild(make('td', {}, flags[i] ? COPY.importDuplicate : COPY.importNew));
});
const hidden = state.mapped.txns.length - PREVIEW_LIMIT;
el.more.hidden = hidden <= 0;
el.more.textContent = hidden > 0 ? COPY.importPreviewMore(hidden) : '';
const rowItems = state.mapped.errors.map((e) => COPY.importErrorRow(e.row + 1, COPY.importErrors[e.code]));
errorList(el.rowErrors, COPY.importRowErrorCount(rowItems.length), rowItems);
const hasIncome = state.mapped.txns.some((t) => t.category === 'income');
const noLocations = ws.locations.length === 0;
const keep = el.location.value;
el.location.textContent = '';
for (const loc of ws.locations) el.location.appendChild(make('option', { value: loc.id }, loc.name));
if (ws.locations.some((l) => l.id === keep)) el.location.value = keep;
el.locationField.hidden = !hasIncome || noLocations;
el.needsLocation.hidden = !(hasIncome && noLocations);
el.commit.disabled = !complete || (hasIncome && noLocations);
}
function closeDialog() {
state = null;
dialog.close();
}
function sameMapping(a, b) {
return a.signature === b.signature && a.shape === b.shape && COLUMN_KEYS.every((k) => a.columns[k] === b.columns[k]);
}
// Replace by signature (the newest goes last); keep at most 50, dropping the oldest.
function withMapping(w, mapping) {
const list = w.settings.csvMappings;
if (list.length && sameMapping(list[list.length - 1], mapping)) return w;
const next = list.filter((m) => m.signature !== mapping.signature).concat([mapping]);
while (next.length > MAX_MAPPINGS) next.shift();
return Object.assign({}, w, { settings: Object.assign({}, w.settings, { csvMappings: next }) });
}
function commitImport() {
if (!state || el.commit.disabled) return;
const locationId = el.location.value || null;
const txns = state.mapped.txns.map((t) => (t.category === 'income' ? Object.assign({}, t, { locationId }) : t));
const result = addTransactions(ws, txns);
const columns = {};
for (const k of COLUMN_KEYS) columns[k] = SHAPE_COLUMNS[state.mapping.shape].includes(k) ? state.mapping.columns[k] : null;
const next = withMapping(result.workspace, { signature: state.signature.slice(0, 2000), shape: state.mapping.shape, columns });
const errors = state.mapped.errors.length + state.parseErrors.length;
closeDialog();
commitFn(next);
announce(COPY.importDone(result.added, result.skippedDuplicates, errors));
}
let opener = null;
function openImportDialog(workspace, commit) {
ws = workspace;
commitFn = commit;
opener = document.activeElement;
ensureDom();
input.click();
}
return { openImportDialog };
})();
// ---- ui-info ----
const ui_info = (() => {
const { COPY, formatDate, formatValue } = copy;
// ui-info.js — layer 4, imported only by ui.js. The Assumptions and Credits views.
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
// Every constant (key, value, effective date, verified on, source), every COPY.assumption* string, a link to the rate
// table and the contact line. J4: first, who the page is for, with the figure's source (facts['ky.nonemployerFirms']).
function card(root, id) {
return root.appendChild(make('section', { id, class: 'card' }));
}
function renderAssumptions(page, c, openRates, facts) {
page.textContent = '';
let root = card(page, 'assumptions-reach-card');
const reach = facts && facts['ky.nonemployerFirms'];
if (reach) {
root.appendChild(make('h3', { id: 'assumptions-reach-title' }, COPY.assumptionsReachTitle));
const p = root.appendChild(make('p', { id: 'assumptions-reach' }, `${COPY.assumptionsReach(String(Math.round(reach.value / 1000) * 1000).replace(/\B(?=(\d{3})+(?!\d))/g, ','))} `));
p.appendChild(make('a', { id: 'assumptions-reach-source', href: reach.sourceUrl, target: '_blank', rel: 'noopener noreferrer', title: reach.sourceUrl }, COPY.sourceLink));
}
if (!root.firstChild) root.remove();
root = card(page, 'assumptions-list-card');
root.appendChild(make('h3', {}, COPY.assumptionsListTitle));
const list = root.appendChild(make('ul', { id: 'assumptions-list' }));
for (const key of Object.keys(COPY).filter((k) => /^assumption[A-Z]/.test(k) && typeof COPY[k] === 'string')) {
list.appendChild(make('li', { 'data-key': key }, COPY[key]));
}
root.appendChild(make('button', { id: 'assumptions-rates', type: 'button', class: 'link-button' }, COPY.assumptionsRatesLink))
.addEventListener('click', openRates);
root = card(page, 'assumptions-constants-card');
root.appendChild(make('h3', {}, COPY.assumptionsConstantsTitle));
const cols = COPY.assumptionsConstantColumns;
const wrap = root.appendChild(make('div', { class: 'table-wrap' }));
const t = wrap.appendChild(make('table', { id: 'assumptions-constants' }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['key', 'value', 'effective', 'verified', 'source']) head.appendChild(make('th', { scope: 'col' }, cols[k]));
const body = t.appendChild(make('tbody'));
for (const key of Object.keys(c)) {
const r = c[key];
const tr = body.appendChild(make('tr', { 'data-key': key }));
tr.appendChild(make('th', { scope: 'row', class: 'constant-key' }, key));
tr.appendChild(make('td', { class: 'constant-value' }, formatValue(r.value)));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(r.effectiveDate)));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(r.verifiedOn)));
tr.appendChild(make('td')).appendChild(make('a', { href: r.sourceUrl, target: '_blank', rel: 'noopener noreferrer', title: r.sourceUrl }, COPY.sourceLink));
}
root.appendChild(make('p', { id: 'assumptions-contact' }, COPY.contact));
}
// summary: { unit, e2e, golden } from prompts/test-summary.json at build time, or null. districtCount: the number of
// jurisdictions in the rate table. J6: who built it, then how the numbers were checked, then the data sources, the AI
// and outside-services statements, and the license (the copyright line on show, the full text in a disclosure).
function renderCredits(page, summary, districtCount) {
page.textContent = '';
let root = card(page, 'credits-built-card');
root.appendChild(make('h3', { id: 'credits-built-title' }, COPY.creditsBuiltTitle));
root.appendChild(make('p', { id: 'credits-author' }, COPY.creditsAuthor));
root.appendChild(make('p', { id: 'credits-code' }, COPY.creditsCode));
root = card(page, 'credits-checked-card');
root.appendChild(make('h3', { id: 'credits-checked-title' }, COPY.creditsCheckedTitle));
const checked = root.appendChild(make('ul', { id: 'credits-checked', 'aria-labelledby': 'credits-checked-title' }));
checked.appendChild(make('li', { id: 'credits-checked-sources' }, COPY.creditsCheckedSources(districtCount)));
if (summary) {
checked.appendChild(make('li', { id: 'credits-checked-examples' }, COPY.creditsCheckedExamples(summary.golden)));
checked.appendChild(make('li', { id: 'credits-tests' }, COPY.creditsTests(summary.unit, summary.e2e)));
}
if (typeof COPY.reviewer === 'string' && COPY.reviewer !== '') checked.appendChild(make('li', { id: 'credits-reviewer' }, COPY.reviewer));
if (typeof COPY.testerQuote === 'string' && COPY.testerQuote !== '') checked.appendChild(make('li', { id: 'credits-tester' }, COPY.testerQuote));
root = card(page, 'credits-data-card');
root.appendChild(make('h3', { id: 'credits-data-title' }, COPY.creditsDataTitle));
root.appendChild(make('p', { id: 'credits-data' }, COPY.creditsData));
root = card(page, 'credits-about-card');
root.appendChild(make('h3', { id: 'credits-about-title' }, COPY.creditsAboutTitle));
root.appendChild(make('p', { id: 'credits-ai' }, COPY.creditsAI));
root.appendChild(make('p', { id: 'credits-services' }, COPY.creditsServices));
root = card(page, 'credits-license-card');
root.appendChild(make('h3', { id: 'credits-license-title' }, COPY.creditsLicenseTitle));
const copyright = COPY.mitLicense.split('\n').find((line) => /^Copyright /.test(line)) || '';
root.appendChild(make('p', { id: 'credits-copyright' }, `${copyright}. ${COPY.creditsLicenseLine}`));
const more = root.appendChild(make('details', { id: 'credits-license-more' }));
more.appendChild(make('summary', { id: 'credits-license-summary' }, COPY.creditsLicenseTitle));
more.appendChild(make('pre', { id: 'credits-license', class: 'license-text' }, COPY.mitLicense));
}
return { renderAssumptions, renderCredits };
})();
// ---- ui-jar ----
const ui_jar = (() => {
const { reduce, parseMoney, isIsoDate, dateInTaxYear } = book;
const { taxJar } = quant;
const { COPY, formatDate, shortDistrictName } = copy;
// ui-jar.js — layer 4, imported only by ui.js. WO-11 J3: the tax jar. What has been paid and saved, against what the
// set-aside share says is needed by today (quant.taxJar). renderJarCard draws the read-only card (screen 3 and the
// tool page both show it); renderJar is the tool page's section, with the savings balance and the payments made.
const SVG = 'http://www.w3.org/2000/svg';
const MAX_AMOUNT_CENTS = 100000000000;
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function svg(tag, attrs, text) {
const node = document.createElementNS(SVG, tag);
for (const k of Object.keys(attrs || {})) node.setAttribute(k, attrs[k]);
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
// 'paid' (nothing short), 'missed' (nothing paid by the due date) or 'short'.
function installmentStatus(p) {
return p.shortCents === 0 ? 'paid' : p.paidCents === 0 ? 'missed' : 'short';
}
// The card: three figures, a two-part bar, the next due date and the installments that have passed. id prefixes
// every element id, so the same card can sit on screen 3 and on the tool page. share: the set-aside share in use.
function renderJarCard(parent, workspace, rows, c, todayIso, share, id) {
const card = parent.appendChild(make('div', { id: `${id}-card`, class: 'jar-card' }));
let jar;
try {
jar = taxJar(workspace, workspace.settings.taxYear, rows, c, share, todayIso);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
card.appendChild(make('p', { id: `${id}-unavailable`, class: 'hint' },
e.message === 'unsupportedFilingStatus' ? COPY.taxUnsupported : COPY.calendarUnavailable(workspace.settings.taxYear)));
return null;
}
const ahead = jar.gapCents < 0;
const main = card.appendChild(make('div', { class: 'jar-main' }));
const figures = main.appendChild(make('dl', { class: 'jar-figures' }));
const figure = (key, label, cents, extra) => {
const box = figures.appendChild(make('div', { class: `jar-figure${extra ? ` ${extra}` : ''}` }));
box.appendChild(make('dt', {}, label));
box.appendChild(make('dd', { id: `${id}-${key}` }, COPY.fmtDollars0(cents)));
};
figure('should', COPY.jarShould, jar.shouldHaveCents);
figure('covered', COPY.jarCovered, jar.coveredCents);
figure('gap', ahead ? COPY.jarAhead : COPY.jarShort, Math.abs(jar.gapCents), ahead ? 'jar-ahead' : jar.gapCents > 0 ? 'jar-short' : '');
// Two parts: what is paid and saved, and what is still short of today's figure (none when ahead).
const W = 400;
const H = 16;
const whole = Math.max(jar.shouldHaveCents, jar.coveredCents, 1);
const coveredW = Math.min(jar.coveredCents, whole) / whole * W;
const gapW = Math.max(0, jar.gapCents) / whole * W;
const bar = main.appendChild(svg('svg', { id: `${id}-bar`, class: 'jar-bar', viewBox: `0 0 ${W} ${H}`, preserveAspectRatio: 'none', role: 'img',
'aria-label': COPY.jarBarLabel(COPY.fmtDollars0(jar.coveredCents), COPY.fmtDollars0(jar.shouldHaveCents)) }));
bar.appendChild(svg('title', {}, COPY.jarTitle));
bar.appendChild(svg('rect', { x: '0', y: '0', width: coveredW.toFixed(2), height: String(H), class: 'jar-covered', 'data-part': 'covered' }));
bar.appendChild(svg('rect', { x: coveredW.toFixed(2), y: '0', width: gapW.toFixed(2), height: String(H), class: 'jar-gap', 'data-part': 'gap' }));
main.appendChild(make('p', { id: `${id}-basis`, class: 'hint' },
COPY.jarBasis(`${(share * 100).toFixed(2)}%`, formatCents(jar.grossToDateCents), formatCents(jar.paidCents), formatCents(jar.balanceCents))));
main.appendChild(make('p', { id: `${id}-next`, class: 'jar-next' }, jar.nextDue
? COPY.jarNext(formatDate(jar.nextDue.dueIso), formatCents(jar.nextDue.federalCents), formatCents(jar.nextDue.kyCents)) : COPY.jarNextNone));
// WO-13 V6: the six-row table of past-due installments is gone; the Quarterly payments card is the one schedule.
return jar;
}
// ---- the tool page's section ----
let built = false;
let current = null;
let ctx = null;
const el = {};
function field(id, label, control) {
const wrap = make('div', { class: 'field' });
wrap.appendChild(make('label', { for: id }, label));
wrap.appendChild(control);
return wrap;
}
function centsToInput(cents) {
return cents === null || cents === undefined ? '' : (cents / 100).toFixed(2).replace(/\.00$/, '');
}
// The offices a payment can go to: the IRS, Kentucky, and every local district the work locations resolve to.
function officeOptions() {
const all = ctx.rows.concat(current.customRates.map((r) => ({ districtId: r.districtId, name: r.name, kind: r.kind, custom: true })));
const out = [['federal', COPY.officeNames.irs], ['ky', COPY.officeNames.kydor]];
const seen = new Set();
const ids = current.locations.flatMap((l) => l.districtIds).concat(current.taxPayments.map((p) => p.office));
for (const id of ids) {
if (id === 'federal' || id === 'ky' || seen.has(id)) continue;
seen.add(id);
const row = all.find((r) => r.districtId === id);
out.push([id, row ? (row.custom ? `${row.name} (${COPY.notInTable})` : shortDistrictName(row)) : id]);
}
return out;
}
function clearError(key) {
el.errors[key].hidden = true;
el.errors[key].textContent = '';
el[key].removeAttribute('aria-invalid');
el[key].removeAttribute('aria-describedby');
}
function showError(key, text) {
el.errors[key].textContent = text;
el.errors[key].hidden = false;
el[key].setAttribute('aria-invalid', 'true');
el[key].setAttribute('aria-describedby', el.errors[key].id);
}
function build(root) {
root.textContent = '';
el.errors = {};
root.appendChild(make('h3', { id: 'jar-title', tabindex: '-1' }, COPY.jarTitle));
root.appendChild(make('p', { id: 'jar-intro', class: 'hint' }, COPY.jarIntro));
// WO-13 V6: the three stats, the bar and the next due date first; then what is in savings.
el.slot = root.appendChild(make('div', { id: 'jar-slot', 'aria-live': 'polite' }));
el.saved = make('input', { id: 'jar-saved', type: 'text', inputmode: 'decimal', autocomplete: 'off' });
root.appendChild(field('jar-saved', COPY.jarSavedLabel, el.saved));
el.errors.saved = root.appendChild(make('p', { id: 'jar-saved-error', class: 'field-error', role: 'alert', hidden: true }));
el.saved.addEventListener('change', () => {
const text = el.saved.value.trim();
const cents = text === '' ? null : parseMoney(text);
if (text !== '' && (cents === null || cents < 0 || cents > MAX_AMOUNT_CENTS)) {
showError('saved', COPY.jarSavedInvalid);
return;
}
clearError('saved');
ctx.commit(reduce(current, { type: 'settings/set', key: 'setAsideBalanceCents', value: cents }));
});
el.saved.addEventListener('input', () => clearError('saved'));
// WO-13 V2: payments made and the form to add one sit under one disclosure.
const record = root.appendChild(make('details', { id: 'jar-record' }));
record.appendChild(make('summary', { id: 'jar-record-summary' }, COPY.jarRecord));
record.appendChild(make('h3', { id: 'jar-payments-title' }, COPY.jarPayments));
el.none = record.appendChild(make('p', { id: 'jar-payments-none', class: 'hint' }, COPY.jarPaymentsNone));
el.tableWrap = record.appendChild(make('div', { class: 'table-wrap' }));
const table = el.tableWrap.appendChild(make('table', { id: 'jar-payments', 'aria-labelledby': 'jar-payments-title' }));
const head = table.appendChild(make('thead')).appendChild(make('tr'));
const cols = COPY.jarPaymentColumns;
for (const [label, num] of [[cols.date], [cols.office], [cols.amount, true], [cols.actions]]) head.appendChild(make('th', { scope: 'col', class: num ? 'num' : '' }, label));
el.tbody = table.appendChild(make('tbody'));
el.tbody.addEventListener('click', (e) => {
const button = e.target.closest('button[data-payment-id]');
if (!button) return;
ctx.commit(reduce(current, { type: 'payment/delete', id: button.getAttribute('data-payment-id') }));
el.status.textContent = COPY.jarPayDeleted;
});
const form = record.appendChild(make('form', { id: 'jar-pay-form', class: 'sub-form', novalidate: '' }));
form.appendChild(make('h3', { id: 'jar-pay-title' }, COPY.jarAddTitle));
el.date = make('input', { id: 'jar-pay-date', type: 'date' });
el.amount = make('input', { id: 'jar-pay-amount', type: 'text', inputmode: 'decimal', autocomplete: 'off' });
el.office = make('select', { id: 'jar-pay-office' });
for (const [key, label, control] of [['date', COPY.jarPayDate, el.date], ['amount', COPY.jarPayAmount, el.amount]]) {
const group = form.appendChild(make('div', { class: 'field-group' }));
group.appendChild(field(`jar-pay-${key}`, label, control));
el.errors[key] = group.appendChild(make('p', { id: `jar-pay-${key}-error`, class: 'field-error', role: 'alert', hidden: true }));
control.addEventListener('input', () => clearError(key));
}
form.appendChild(field('jar-pay-office', COPY.jarPayOffice, el.office));
const actions = form.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'jar-pay-add', type: 'submit' }, COPY.jarPayAdd));
el.status = form.appendChild(make('p', { id: 'jar-status', class: 'hint', 'aria-live': 'polite' }));
form.addEventListener('submit', (e) => {
e.preventDefault();
for (const key of ['date', 'amount']) clearError(key);
const problems = [];
if (el.date.value === '') problems.push(['date', COPY.dateRequired]);
else if (!isIsoDate(el.date.value)) problems.push(['date', COPY.dateInvalid]);
const cents = parseMoney(el.amount.value);
if (cents === null || cents <= 0 || cents > MAX_AMOUNT_CENTS) problems.push(['amount', COPY.amountInvalid]);
if (problems.length) {
for (const [key, text] of problems) showError(key, text);
el[problems[0][0]].focus();
return;
}
const payment = { date: el.date.value, amountCents: cents, office: el.office.value, taxYear: current.settings.taxYear };
el.amount.value = '';
ctx.commit(reduce(current, { type: 'payment/add', payment }));
el.status.textContent = COPY.jarPayAdded;
});
built = true;
}
function renderPayments() {
const year = current.settings.taxYear;
const mine = current.taxPayments.filter((p) => p.taxYear === year).slice().sort((a, b) => (a.date < b.date ? -1 : a.date > b.date ? 1 : a.id < b.id ? -1 : 1));
el.none.hidden = mine.length > 0;
el.tableWrap.hidden = mine.length === 0;
el.tbody.textContent = '';
const names = {};
for (const [id, label] of officeOptions()) names[id] = label;
for (const p of mine) {
const tr = el.tbody.appendChild(make('tr', { 'data-payment-id': p.id }));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(p.date)));
tr.appendChild(make('td', {}, names[p.office] || p.office));
tr.appendChild(make('td', { class: 'num nowrap' }, formatCents(p.amountCents)));
tr.appendChild(make('td', { class: 'row-actions' })).appendChild(make('button', { type: 'button', 'data-payment-id': p.id,
'aria-label': COPY.jarPayDeleteLabel(formatDate(p.date), formatCents(p.amountCents)) }, COPY.jarPayDelete));
}
}
// withShare(onReady): calls onReady(share) once the set-aside share is known (null when there is none to use).
function renderJar(root, workspace, rows, c, todayIso, commit, withShare) {
if (!built || !root.contains(el.slot)) build(root);
current = workspace;
ctx = { rows, c, todayIso, commit };
if (document.activeElement !== el.saved && !el.errors.saved.textContent) el.saved.value = centsToInput(workspace.settings.setAsideBalanceCents);
if (!el.date.value && !el.errors.date.textContent) el.date.value = dateInTaxYear(workspace.settings.taxYear, todayIso);
const keep = el.office.value;
el.office.textContent = '';
const options = officeOptions();
for (const [value, label] of options) el.office.appendChild(make('option', { value }, label));
if (options.some((o) => o[0] === keep)) el.office.value = keep;
renderPayments();
const draw = (share) => {
if (current !== workspace) return;
el.slot.textContent = '';
if (share === null) el.slot.appendChild(make('p', { id: 'jar-no-share', class: 'hint' }, COPY.jarNoShare));
else renderJarCard(el.slot, workspace, rows, c, todayIso, share, 'jar');
};
let drawn = false;
withShare((share) => {
drawn = true;
draw(share);
});
if (!drawn && !el.slot.firstChild) el.slot.appendChild(make('p', { id: 'jar-computing', class: 'hint' }, COPY.computing));
}
return { installmentStatus, renderJarCard, renderJar };
})();
// ---- ui-ledger ----
const ui_ledger = (() => {
const { SCHEDULE_C_LINES, INCOME_LINES, parseMoney, reduce, addTransactions, isIsoDate, dateInTaxYear } = book;
const { COPY, formatDate } = copy;
// ui-ledger.js — layer 4, imported only by ui.js. The add-entry sheet (WO-13 V4), which + Add opens from any tab and
// each row's Edit opens pre-filled; Ledger › Entries (newest first, 25 rows a page, a search field and two filters);
// and the delete dialog. Everything goes through the ledger's own reducers (txn/add, txn/update,
// txn/delete); nothing new is saved.
const MAX_AMOUNT_CENTS = 100000000000;
const PAGE_SIZE = 25;
let current = null;
let commitFn = null;
let hooks = null;
let today = null;
let built = false;
let sheetBuilt = false;
let editingId = null;
let pendingDuplicate = null;
let pendingDeleteId = null;
// The sheet's side: 'job' (money in, tied to a place) or 'expense'.
let kind = 'job';
// Ledger › Entries: the page on show and what narrows the list.
const view = { page: 0, search: '', place: '', type: '' };
const el = {};
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function field(id, label, control) {
const wrap = make('div', { class: 'field' });
wrap.appendChild(make('label', { for: id }, label));
wrap.appendChild(control);
return wrap;
}
// D1: a field with its own message underneath; the message goes away when the control changes.
function checkedField(key, label, control) {
const id = `ledger-${key}`;
const group = make('div', { class: 'field-group' });
group.appendChild(field(id, label, control));
el.errors[key] = group.appendChild(make('p', { id: `${id}-error`, class: 'field-error', role: 'alert', hidden: true }));
control.addEventListener(control.tagName === 'SELECT' ? 'change' : 'input', () => clearFieldError(key));
return group;
}
function showFieldError(key, text) {
el.errors[key].textContent = text;
el.errors[key].hidden = false;
el[key].setAttribute('aria-invalid', 'true');
el[key].setAttribute('aria-describedby', `ledger-${key}-error`);
}
function clearFieldError(key) {
el.errors[key].textContent = '';
el.errors[key].hidden = true;
el[key].removeAttribute('aria-invalid');
el[key].removeAttribute('aria-describedby');
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function centsToInput(cents) {
const abs = Math.abs(cents);
return `${Math.floor(abs / 100)}.${String(abs % 100).padStart(2, '0')}`;
}
// A location whose districts include a hand-entered custom rate is flagged "not in table" on every screen.
function locationLabel(loc) {
return loc.districtIds.some((id) => id.startsWith('custom_')) ? `${loc.name} (${COPY.notInTable})` : loc.name;
}
function lineLabel(line) {
return `${line} — ${COPY.scheduleCLabels[line]}`;
}
// Opens a modal dialog and returns focus to the control that opened it when it closes.
function showDialog(dialog, opener) {
if (dialog.open) return;
const back = opener || document.activeElement;
dialog.addEventListener('close', () => {
if (back && back !== document.body && document.contains(back)) back.focus();
}, { once: true });
dialog.showModal();
}
// ---- the add-entry sheet ----
// The sheet and the delete dialog sit at the end of <body>, outside the tab panels, so they open from any tab.
function buildSheet() {
el.errors = {};
const sheet = document.body.appendChild(make('dialog', { id: 'add-sheet', 'aria-labelledby': 'ledger-form-title' }));
const form = sheet.appendChild(make('form', { id: 'ledger-form', novalidate: '' }));
el.formTitle = form.appendChild(make('h2', { id: 'ledger-form-title' }, COPY.addTitle));
// Job or Expense.
const kinds = form.appendChild(make('div', { id: 'add-kind', class: 'segmented', role: 'group', 'aria-label': COPY.addKindLabel }));
el.kindJob = kinds.appendChild(make('button', { id: 'add-kind-job', type: 'button', 'aria-pressed': 'true' }, COPY.addKinds.job));
el.kindExpense = kinds.appendChild(make('button', { id: 'add-kind-expense', type: 'button', 'aria-pressed': 'false' }, COPY.addKinds.expense));
// With no place yet, the Job side is one line and the way to add one.
el.needsLocation = form.appendChild(make('div', { id: 'ledger-needs-location', hidden: true }));
el.needsLocation.appendChild(make('p', {}, COPY.ledgerNeedsLocation));
el.placeFirst = el.needsLocation.appendChild(make('button', { id: 'add-place-first', type: 'button' }, COPY.addPlaceFirst));
el.fields = form.appendChild(make('div', { id: 'add-fields' }));
el.amount = make('input', { id: 'ledger-amount', type: 'text', inputmode: 'decimal', autocomplete: 'off' });
el.location = make('select', { id: 'ledger-location' });
el.line = make('select', { id: 'ledger-line' });
el.date = make('input', { id: 'ledger-date', type: 'date', required: '' });
el.description = make('input', { id: 'ledger-description', type: 'text', maxlength: '500', autocomplete: 'off' });
el.incomeKind = make('select', { id: 'ledger-income-kind' });
for (const line of INCOME_LINES) el.incomeKind.appendChild(make('option', { value: line }, COPY.ledgerIncomeKinds[line]));
el.fields.appendChild(checkedField('amount', COPY.ledgerFields.amount, el.amount));
el.locationField = el.fields.appendChild(checkedField('location', COPY.addFields.place, el.location));
el.lineField = el.fields.appendChild(checkedField('line', COPY.addFields.what, el.line));
el.fields.appendChild(checkedField('date', COPY.ledgerFields.date, el.date));
el.fields.appendChild(field('ledger-description', COPY.addFields.description, el.description));
// The rarer kind of money in (other business income) sits one step further in.
el.more = el.fields.appendChild(make('details', { id: 'ledger-more' }));
el.more.appendChild(make('summary', { id: 'ledger-more-summary' }, COPY.ledgerMore));
el.more.appendChild(field('ledger-income-kind', COPY.ledgerIncomeKind, el.incomeKind));
// What an expense was for: the common ones in plain words, then every other Schedule C line.
el.line.appendChild(make('option', { value: '' }, COPY.ledgerLineChoose));
const common = el.line.appendChild(make('optgroup', { label: COPY.ledgerLineGroups.common }));
for (const [label, line] of COPY.quickExpenseKinds) common.appendChild(make('option', { value: line }, label));
const plain = COPY.quickExpenseKinds.map((k) => k[1]);
const other = el.line.appendChild(make('optgroup', { label: COPY.ledgerLineGroups.other }));
for (const line of SCHEDULE_C_LINES.filter((l) => !INCOME_LINES.includes(l) && !plain.includes(l))) other.appendChild(make('option', { value: line }, lineLabel(line)));
el.duplicate = form.appendChild(make('div', { id: 'ledger-duplicate', class: 'inline-warning', hidden: true }));
el.duplicate.appendChild(make('span', {}, COPY.ledgerDuplicate + ' '));
el.addAnyway = el.duplicate.appendChild(make('button', { id: 'ledger-add-anyway', type: 'button' }, COPY.ledgerAddAnyway));
el.status = form.appendChild(make('p', { id: 'ledger-status', class: 'hint', 'aria-live': 'polite' }));
const actions = form.appendChild(make('div', { class: 'dialog-actions' }));
el.deleteEntry = actions.appendChild(make('button', { id: 'ledger-delete-entry', type: 'button', class: 'plain danger', hidden: true }, COPY.ledgerDelete));
el.cancel = actions.appendChild(make('button', { id: 'ledger-cancel-edit', type: 'button' }, COPY.addCancel));
el.another = actions.appendChild(make('button', { id: 'add-another', type: 'button' }, COPY.addAnother));
el.saveEntry = actions.appendChild(make('button', { id: 'ledger-save-entry', type: 'submit', class: 'primary' }, COPY.addSubmit));
el.sheet = sheet;
const dialog = document.body.appendChild(make('dialog', { id: 'ledger-delete-dialog', 'aria-labelledby': 'ledger-delete-title' }));
dialog.appendChild(make('h2', { id: 'ledger-delete-title' }, COPY.ledgerDeleteTitle));
el.deleteBody = dialog.appendChild(make('p', { id: 'ledger-delete-body' }));
const dActions = dialog.appendChild(make('div', { class: 'dialog-actions' }));
el.deleteCancel = dActions.appendChild(make('button', { id: 'ledger-delete-cancel', type: 'button' }, COPY.ledgerDeleteCancel));
el.deleteConfirm = dActions.appendChild(make('button', { id: 'ledger-delete-confirm', type: 'button', class: 'primary' }, COPY.ledgerDelete));
el.deleteDialog = dialog;
// Enter submits: the form's one submit button is Add.
form.addEventListener('submit', (e) => {
e.preventDefault();
submitEntry(false);
});
el.another.addEventListener('click', () => submitEntry(true));
el.kindJob.addEventListener('click', () => setKind('job'));
el.kindExpense.addEventListener('click', () => setKind('expense'));
el.cancel.addEventListener('click', () => sheet.close());
el.placeFirst.addEventListener('click', () => {
// Once the sheet has closed (and handed focus back to its opener), go to Ledger, Places; that heading takes focus.
sheet.addEventListener('close', () => {
if (hooks && hooks.toPlaces) hooks.toPlaces();
}, { once: true });
sheet.close();
});
el.addAnyway.addEventListener('click', () => {
if (!pendingDuplicate) return;
const txn = pendingDuplicate;
const result = addTransactions(current, [txn], { allowDuplicates: true });
finishAdd(result.workspace, txn, el.addAnyway.getAttribute('data-another') === 'true');
});
el.deleteEntry.addEventListener('click', () => {
const txn = current.transactions.find((t) => t.id === editingId);
if (txn) askDelete(txn);
});
el.deleteCancel.addEventListener('click', closeDelete);
dialog.addEventListener('cancel', (e) => {
e.preventDefault();
closeDelete();
});
el.deleteConfirm.addEventListener('click', () => {
const id = pendingDeleteId;
closeDelete();
if (sheet.open) sheet.close();
commitFn(reduce(current, { type: 'txn/delete', id }));
el.status.textContent = COPY.ledgerDeleted;
if (hooks && hooks.onChanged) hooks.onChanged(COPY.ledgerDeleted);
});
sheet.addEventListener('close', () => {
editingId = null;
});
sheetBuilt = true;
}
function fillLocations() {
const keep = el.location.value;
el.location.textContent = '';
for (const loc of current.locations) el.location.appendChild(make('option', { value: loc.id }, locationLabel(loc)));
if (current.locations.some((l) => l.id === keep)) el.location.value = keep;
}
// Shows the side chosen: a job has a place (and, one step in, the kind of income); an expense has what it was for.
function updateFormState() {
const job = kind === 'job';
const blocked = job && current.locations.length === 0;
el.kindJob.setAttribute('aria-pressed', String(job));
el.kindExpense.setAttribute('aria-pressed', String(!job));
el.locationField.hidden = !job;
el.more.hidden = !job;
el.lineField.hidden = job;
el.needsLocation.hidden = !blocked;
el.fields.hidden = blocked;
el.saveEntry.disabled = blocked;
el.another.disabled = blocked;
el.another.hidden = editingId !== null;
el.deleteEntry.hidden = editingId === null;
el.formTitle.textContent = editingId === null ? COPY.addTitle : COPY.ledgerEditTitle;
el.saveEntry.textContent = editingId === null ? COPY.addSubmit : COPY.ledgerSaveEntry;
}
function setKind(next) {
kind = next;
clearMessages();
updateFormState();
}
function clearMessages() {
for (const key of Object.keys(el.errors)) clearFieldError(key);
el.duplicate.hidden = true;
pendingDuplicate = null;
el.status.textContent = '';
}
// + Add: the sheet, empty, on the side asked for (a job unless told otherwise), the date on today.
function openAddSheet(side, opener) {
if (!sheetBuilt || !current) return;
editingId = null;
kind = side === 'expense' ? 'expense' : 'job';
clearMessages();
el.amount.value = '';
el.description.value = '';
el.line.value = '';
el.incomeKind.value = '1';
el.more.open = false;
if (!el.date.value) el.date.value = dateInTaxYear(current.settings.taxYear, today);
fillLocations();
updateFormState();
showDialog(el.sheet, opener);
if (!el.fields.hidden) el.amount.focus();
}
// A row's Edit: the same sheet, filled in, with Delete inside it.
function startEdit(txn, opener) {
clearMessages();
editingId = txn.id;
kind = txn.category === 'income' ? 'job' : 'expense';
fillLocations();
el.date.value = txn.date;
el.amount.value = centsToInput(txn.amountCents);
el.description.value = txn.description;
if (kind === 'job') {
el.incomeKind.value = txn.scheduleCLine;
el.more.open = txn.scheduleCLine !== '1';
if (txn.locationId) el.location.value = txn.locationId;
} else {
el.line.value = txn.scheduleCLine;
}
updateFormState();
showDialog(el.sheet, opener);
el.amount.focus();
}
// Checks every field and shows each problem under its own field (D1); null when anything is wrong.
function readForm() {
const job = kind === 'job';
const problems = [];
const cents = parseMoney(el.amount.value);
if (cents !== null && cents < 0) problems.push(['amount', COPY.amountNegative]);
else if (cents === null || cents === 0 || cents > MAX_AMOUNT_CENTS) problems.push(['amount', COPY.amountInvalid]);
if (job && !current.locations.some((l) => l.id === el.location.value)) problems.push(['location', COPY.ledgerNeedsLocation]);
if (!job && !el.line.value) problems.push(['line', COPY.ledgerLineRequired]);
if (el.date.value === '') problems.push(['date', COPY.dateRequired]);
else if (!isIsoDate(el.date.value)) problems.push(['date', COPY.dateInvalid]);
if (problems.length) {
for (const [key, text] of problems) showFieldError(key, text);
el[problems[0][0]].focus();
return null;
}
return {
date: el.date.value,
amountCents: job ? cents : -cents,
description: el.description.value.trim().slice(0, 500),
category: job ? 'income' : 'expense',
scheduleCLine: job ? el.incomeKind.value : el.line.value,
locationId: job ? el.location.value : null,
source: 'manual'
};
}
// What the entry is called when the description is left empty: the place for a job, what it was for for an expense.
function plainName(txn) {
if (txn.category === 'income') {
const loc = current.locations.find((l) => l.id === txn.locationId);
return loc ? loc.name : '';
}
const known = COPY.quickExpenseKinds.find((k) => k[1] === txn.scheduleCLine);
return known ? known[0] : COPY.scheduleCLabels[txn.scheduleCLine];
}
// After a successful add: tell the page (it shows the toast), then close the sheet or get it ready for the next one.
function finishAdd(next, txn, another) {
const info = { kind: txn.category === 'income' ? 'job' : 'expense', amountText: formatCents(Math.abs(txn.amountCents)), name: plainName(txn) };
view.page = 0;
clearMessages();
el.amount.value = '';
el.description.value = '';
if (!another) el.sheet.close();
// W2: the page is told which entry this commit added, so it can show what the entry changed.
commitFn(next, { added: txn });
el.status.textContent = COPY.addedLine(info.amountText, COPY.addKindWords[info.kind], info.name);
if (another) el.amount.focus();
if (hooks && hooks.onAdded) hooks.onAdded(info, another);
}
// WO-14 W1: a job added outside the sheet (the Overview's try-it row) takes the sheet's own path: the same checks on
// the amount and the place, the same reducer, and the name the sheet gives an entry with no description (numbered on
// a repeat). Returns null when the job is in the ledger, or the problem in words.
function addJobDirect(amountText, locationId, dateIso) {
const cents = parseMoney(amountText);
if (cents !== null && cents < 0) return COPY.amountNegative;
if (cents === null || cents === 0 || cents > MAX_AMOUNT_CENTS) return COPY.amountInvalid;
if (!current.locations.some((l) => l.id === locationId)) return COPY.ledgerNeedsLocation;
const txn = { date: dateIso, amountCents: cents, description: '', category: 'income', scheduleCLine: '1', locationId, source: 'manual' };
const name = plainName(txn);
for (let n = 1; n <= 99; n++) {
const named = Object.assign({}, txn, { description: COPY.quickJobDescription(name, n) });
const next = reduce(current, { type: 'txn/add', txn: named });
if (next === current) continue;
const info = { kind: 'job', amountText: formatCents(cents), name, direct: true };
view.page = 0;
commitFn(next, { added: named });
if (el.status) el.status.textContent = COPY.addedLine(info.amountText, COPY.addKindWords.job, name);
if (hooks && hooks.onAdded) hooks.onAdded(info, false);
return null;
}
return COPY.amountInvalid;
}
function submitEntry(another) {
clearMessages();
const txn = readForm();
if (!txn) return;
if (editingId) {
const patch = Object.assign({}, txn);
delete patch.source;
const next = reduce(current, { type: 'txn/update', id: editingId, patch });
if (next === current) {
const old = current.transactions.find((t) => t.id === editingId);
const unchanged = old && Object.keys(patch).every((k) => old[k] === patch[k]);
if (!unchanged) {
el.addAnyway.hidden = true;
el.duplicate.hidden = false;
return;
}
}
el.sheet.close();
commitFn(next);
el.status.textContent = COPY.ledgerUpdated;
if (hooks && hooks.onChanged) hooks.onChanged(COPY.ledgerUpdated);
return;
}
// With no description the entry is named for its place or its purpose; a repeat on the same day is numbered, since
// two jobs at one price in one place on one day are ordinary.
if (txn.description === '') {
const name = plainName(txn);
for (let n = 1; n <= 99; n++) {
const named = Object.assign({}, txn, { description: txn.category === 'income' ? COPY.quickJobDescription(name, n) : COPY.quickExpenseDescription(name, n) });
const next = reduce(current, { type: 'txn/add', txn: named });
if (next !== current) {
finishAdd(next, named, another);
return;
}
}
}
const next = reduce(current, { type: 'txn/add', txn });
if (next === current) {
pendingDuplicate = txn;
el.addAnyway.hidden = false;
el.addAnyway.setAttribute('data-another', String(another));
el.duplicate.hidden = false;
return;
}
finishAdd(next, txn, another);
}
function askDelete(txn) {
pendingDeleteId = txn.id;
el.deleteBody.textContent = COPY.ledgerDeleteConfirm(formatDate(txn.date), txn.description, formatCents(txn.amountCents));
showDialog(el.deleteDialog);
}
function closeDelete() {
pendingDeleteId = null;
el.deleteDialog.close();
}
// ---- Ledger › Entries ----
function build(root) {
root.textContent = '';
const head = root.appendChild(make('div', { class: 'card-head' }));
head.appendChild(make('h2', { id: 'ledger-title' }, COPY.ledgerTitle));
const add = head.appendChild(make('button', { id: 'ledger-add', type: 'button' }, COPY.add));
add.addEventListener('click', () => openAddSheet('job', add));
el.yearNote = root.appendChild(make('p', { id: 'ledger-year-note', class: 'hint' }));
const filters = root.appendChild(make('div', { id: 'ledger-filters', class: 'filter-row' }));
el.search = make('input', { id: 'ledger-search', type: 'search', autocomplete: 'off' });
el.filterPlace = make('select', { id: 'ledger-filter-place' });
el.filterType = make('select', { id: 'ledger-filter-type' });
for (const [value, label] of [['', COPY.ledgerFilters.allTypes], ['income', COPY.ledgerFilters.income], ['expense', COPY.ledgerFilters.expense]]) {
el.filterType.appendChild(make('option', { value }, label));
}
filters.appendChild(field('ledger-search', COPY.ledgerFilters.search, el.search));
filters.appendChild(field('ledger-filter-place', COPY.ledgerFilters.place, el.filterPlace));
filters.appendChild(field('ledger-filter-type', COPY.ledgerFilters.type, el.filterType));
const narrowed = () => {
view.search = el.search.value;
view.place = el.filterPlace.value;
view.type = el.filterType.value;
view.page = 0;
renderTable(current.settings.taxYear);
};
el.search.addEventListener('input', narrowed);
el.filterPlace.addEventListener('change', narrowed);
el.filterType.addEventListener('change', narrowed);
const wrap = root.appendChild(make('div', { class: 'table-wrap' }));
const table = wrap.appendChild(make('table', { id: 'ledger-table', 'aria-labelledby': 'ledger-title' }));
const headRow = table.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['date', 'description', 'line', 'location', 'amount', 'actions']) {
headRow.appendChild(make('th', { scope: 'col', class: k === 'amount' ? 'num' : '' }, COPY.ledgerColumns[k]));
}
el.tbody = table.appendChild(make('tbody'));
const pager = root.appendChild(make('div', { id: 'ledger-pager', class: 'pager' }));
el.prev = pager.appendChild(make('button', { id: 'ledger-prev', type: 'button' }, COPY.ledgerPager.previous));
el.count = pager.appendChild(make('p', { id: 'ledger-count', 'aria-live': 'polite' }));
el.next = pager.appendChild(make('button', { id: 'ledger-next', type: 'button' }, COPY.ledgerPager.next));
el.prev.addEventListener('click', () => {
view.page -= 1;
renderTable(current.settings.taxYear);
});
el.next.addEventListener('click', () => {
view.page += 1;
renderTable(current.settings.taxYear);
});
el.tbody.addEventListener('click', (e) => {
const button = e.target.closest('button[data-action="edit"]');
if (!button) return;
const txn = current.transactions.find((t) => t.id === button.getAttribute('data-id'));
if (txn) startEdit(txn, button);
});
built = true;
}
function renderFilters() {
const keep = view.place;
el.filterPlace.textContent = '';
el.filterPlace.appendChild(make('option', { value: '' }, COPY.ledgerFilters.allPlaces));
for (const loc of current.locations) el.filterPlace.appendChild(make('option', { value: loc.id }, locationLabel(loc)));
view.place = current.locations.some((l) => l.id === keep) ? keep : '';
el.filterPlace.value = view.place;
el.filterType.value = view.type;
if (document.activeElement !== el.search) el.search.value = view.search;
}
// Newest first; the page on show holds 25 rows. The count line reads "1–25 of 1,157".
function renderTable(taxYear) {
const names = {};
for (const loc of current.locations) names[loc.id] = locationLabel(loc);
const inYear = current.transactions.filter((t) => t.date.startsWith(`${taxYear}-`));
const needle = view.search.trim().toLowerCase();
const rows = inYear
.filter((t) => (needle === '' || t.description.toLowerCase().includes(needle)) && (view.place === '' || t.locationId === view.place)
&& (view.type === '' || t.category === view.type))
.sort((a, b) => (a.date === b.date ? (a.id < b.id ? 1 : -1) : a.date < b.date ? 1 : -1));
const pages = Math.max(1, Math.ceil(rows.length / PAGE_SIZE));
view.page = Math.min(Math.max(view.page, 0), pages - 1);
const first = view.page * PAGE_SIZE;
const shown = rows.slice(first, first + PAGE_SIZE);
el.tbody.textContent = '';
el.prev.disabled = view.page === 0;
el.next.disabled = view.page >= pages - 1;
el.count.textContent = rows.length === 0 ? COPY.ledgerPager.none : COPY.ledgerPager.count(first + 1, first + shown.length, rows.length);
el.count.setAttribute('data-total', String(rows.length));
if (rows.length === 0) {
const tr = el.tbody.appendChild(make('tr', { class: 'empty' }));
tr.appendChild(make('td', { colspan: '6' }, inYear.length === 0 ? COPY.ledgerEmpty(taxYear) : COPY.ledgerNoMatch));
return;
}
for (const t of shown) {
const tr = el.tbody.appendChild(make('tr', { 'data-txn-id': t.id }));
tr.appendChild(make('td', { class: 'nowrap', 'data-date': t.date }, formatDate(t.date)));
tr.appendChild(make('td', {}, t.description));
tr.appendChild(make('td', {}, lineLabel(t.scheduleCLine)));
tr.appendChild(make('td', {}, t.category === 'income' ? names[t.locationId] || t.locationId : ''));
tr.appendChild(make('td', { class: 'num nowrap' }, formatCents(t.amountCents)));
const actions = tr.appendChild(make('td', { class: 'row-actions' }));
actions.appendChild(make('button', { type: 'button', class: 'plain', 'data-action': 'edit', 'data-id': t.id,
'aria-label': COPY.ledgerEditLabel(formatDate(t.date), t.description) }, COPY.ledgerEdit));
}
}
// on = { onAdded(info, another), onChanged(text), toPlaces() }: the page shows the toast and does the navigation.
function renderLedger(root, workspace, commit, todayIso, on) {
// Another tax year shows another list: back to its first page.
const replaced = current !== null && current.settings.taxYear !== workspace.settings.taxYear;
current = workspace;
commitFn = commit;
hooks = on || null;
today = todayIso;
if (!sheetBuilt) buildSheet();
if (!built || !root.contains(el.tbody)) build(root);
if (replaced) view.page = 0;
if (editingId && !current.transactions.some((t) => t.id === editingId) && el.sheet.open) el.sheet.close();
const taxYear = current.settings.taxYear;
el.yearNote.textContent = COPY.ledgerYearNote(taxYear);
// D1: a new entry starts on today when today is in the tax year shown, else on the nearest day of that year.
if (!el.sheet.open) el.date.value = dateInTaxYear(taxYear, todayIso);
fillLocations();
updateFormState();
renderFilters();
renderTable(taxYear);
}
return { formatCents, openAddSheet, addJobDirect, renderLedger };
})();
// ---- ui-locations ----
const ui_locations = (() => {
const { reduce, nextCustomRateId } = book;
const { RATE_ROWS, RATE_TABLE_META, candidatesForZip, buildDistrictIds, effectiveDistricts, fallbackRow, isSupplementalCountyRow, isMergedCounty } = jurisdictions;
const { COPY, shortDistrictName } = copy;
// ui-locations.js — layer 4, imported only by ui.js. Work locations: list, add/edit form, resident county.
let current = null;
let commitFn = null;
let built = false;
let editingId = null;
const el = {};
// The city choice "inside a city that isn't in this version's table", and the placeholder id a new custom rate
// holds in districtIds until saveLocation gives it its real id.
const NOT_LISTED = 'not-listed';
const OTHER_COUNTY = 'other-county';
const NEW_CUSTOM = 'custom_new';
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function field(id, label, control) {
const wrap = make('div', { class: 'field' });
wrap.appendChild(make('label', { for: id }, label));
wrap.appendChild(control);
return wrap;
}
function selectOf(id, options, selected) {
const select = make('select', { id });
for (const [value, label] of options) select.appendChild(make('option', { value }, label));
if (selected !== undefined && options.some((o) => o[0] === selected)) select.value = selected;
return select;
}
function allRows() {
return RATE_ROWS.concat(current.customRates.map(fallbackRow));
}
// D4: plain short names here; the full recorded names stay in the Rate table and the CPA packet.
function shortOf(row) {
return row.custom ? `${row.name} (${COPY.notInTable})` : shortDistrictName(row);
}
function rowName(districtId) {
const row = RATE_ROWS.concat(current.customRates.map(fallbackRow)).find((r) => r.districtId === districtId);
return row ? shortOf(row) : districtId;
}
function uniqueRows(filter) {
const seen = new Set();
return RATE_ROWS.filter((r) => filter(r) && !seen.has(r.districtId) && seen.add(r.districtId));
}
// A supplemental county line (Boone mental health) rides with its county and is never offered as a county.
const countyRows = () => uniqueRows((r) => (r.kind === 'county' || r.kind === 'merged') && !isSupplementalCountyRow(r));
const userRateRow = (cityId) => RATE_ROWS.find((r) => r.districtId === cityId && r.requiresUserRate === true) || null;
const cityRowsFor = (countyId) => uniqueRows((r) => r.kind === 'city' && r.parentCountyId === countyId);
function districtNames(location, extraRows) {
const taxYear = current.settings.taxYear;
const result = effectiveDistricts(location, allRows().concat(extraRows || []), taxYear, current.settings.residentCountyId);
return result.rows.map(shortOf)
.concat(result.missing.map((id) => COPY.districtMissing(id)));
}
function build(root) {
root.textContent = '';
const top = root.appendChild(make('div', { class: 'card-head' }));
top.appendChild(make('h2', { id: 'locations-title' }, COPY.locationsTitle));
el.add = top.appendChild(make('button', { id: 'location-add', type: 'button' }, COPY.placeAdd));
el.add.addEventListener('click', () => {
resetForm();
openSheet(el.add);
});
root.appendChild(make('p', { class: 'hint' }, COPY.locationsIntro));
el.resident = make('select', { id: 'resident-county' });
root.appendChild(field('resident-county', COPY.residentCountyLabel, el.resident));
el.resident.setAttribute('aria-describedby', 'resident-county-hint');
root.appendChild(make('p', { id: 'resident-county-hint', class: 'hint field-hint' }, COPY.residentCountyHint));
el.resident.appendChild(make('option', { value: '' }, COPY.residentCountyNone));
for (const r of countyRows()) el.resident.appendChild(make('option', { value: r.districtId }, shortOf(r)));
el.resident.addEventListener('change', () => {
commitFn(reduce(current, { type: 'settings/set', key: 'residentCountyId', value: el.resident.value || null }));
});
const wrap = root.appendChild(make('div', { class: 'table-wrap' }));
const table = wrap.appendChild(make('table', { id: 'locations-table' }));
const head = table.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['name', 'zip', 'districts', 'income', 'actions']) {
head.appendChild(make('th', { scope: 'col', class: k === 'income' ? 'num' : '' }, COPY.locationColumns[k]));
}
el.tbody = table.appendChild(make('tbody'));
el.listError = root.appendChild(make('p', { id: 'locations-error', class: 'inline-error', role: 'alert', hidden: true }));
el.listStatus = root.appendChild(make('p', { id: 'locations-status', class: 'hint', 'aria-live': 'polite' }));
// WO-13 V7: the form lives in a sheet at the end of <body> (one sheet, however often this card is rebuilt).
const old = document.getElementById('location-sheet');
if (old) old.remove();
el.sheet = document.body.appendChild(make('dialog', { id: 'location-sheet', 'aria-labelledby': 'location-form-title' }));
const form = el.sheet.appendChild(make('form', { id: 'location-form', novalidate: '' }));
el.formTitle = form.appendChild(make('h2', { id: 'location-form-title' }, COPY.locationAdd));
el.name = make('input', { id: 'location-name', type: 'text', maxlength: '120', autocomplete: 'off' });
el.zip = make('input', { id: 'location-zip', type: 'text', inputmode: 'numeric', maxlength: '5', autocomplete: 'off' });
form.appendChild(field('location-name', COPY.locationName, el.name));
form.appendChild(field('location-zip', COPY.locationZip, el.zip));
el.area = form.appendChild(make('div', { id: 'location-zip-area' }));
el.preview = form.appendChild(make('div', { id: 'location-districts-preview', class: 'preview-box' }));
const actions = form.appendChild(make('div', { class: 'dialog-actions' }));
el.cancel = actions.appendChild(make('button', { id: 'location-cancel', type: 'button' }, COPY.locationCancel));
actions.appendChild(make('button', { id: 'location-save', type: 'submit', class: 'primary' }, COPY.locationSave));
el.form = form;
el.zip.addEventListener('input', () => {
clearError('location-zip');
renderArea(null);
});
el.name.addEventListener('input', () => clearError('location-name'));
form.addEventListener('change', (e) => {
if (e.target === el.zip) return;
if (e.target.name === 'location-mode' || e.target.name === 'location-city' || e.target.id === 'location-county' ||
e.target.id === 'location-manual-county' || e.target.id === 'location-manual-city') {
const focusId = e.target.id;
renderArea(readArea());
const again = document.getElementById(focusId);
if (again) again.focus();
} else {
renderPreview();
}
});
// Typing a name or rate refreshes the preview; choices that change the form's shape arrive as 'change' above.
form.addEventListener('input', (e) => {
if (e.target !== el.zip && e.target.tagName === 'INPUT' && e.target.type === 'text') {
clearError(e.target.id);
renderPreview();
}
});
form.addEventListener('submit', (e) => {
e.preventDefault();
saveLocation();
});
el.cancel.addEventListener('click', () => el.sheet.close());
el.tbody.addEventListener('click', (e) => {
const button = e.target.closest('button[data-action]');
if (!button) return;
const loc = current.locations.find((l) => l.id === button.getAttribute('data-id'));
if (!loc) return;
if (button.getAttribute('data-action') === 'edit') startEdit(loc);
else deleteLocation(loc);
});
built = true;
renderArea(null);
}
// Current choices in the ZIP area, so a re-render can keep them.
function readArea() {
const value = (id) => {
const node = document.getElementById(id);
return node ? node.value : null;
};
const checked = (name) => {
const node = el.area.querySelector(`input[name="${name}"]:checked`);
return node ? node.value : null;
};
return {
mode: checked('location-mode'),
county: value('location-county'),
city: checked('location-city'),
manualCounty: value('location-manual-county'),
manualCity: value('location-manual-city'),
customName: value('custom-name'),
customKind: value('custom-kind'),
customBase: value('custom-base'),
customRate: value('custom-rate'),
userRate: value('user-rate')
};
}
function radio(name, id, value, label, checked) {
const wrap = make('label', { class: 'radio' });
const input = wrap.appendChild(make('input', { type: 'radio', name, id, value }));
input.checked = Boolean(checked);
wrap.appendChild(document.createTextNode(` ${label}`));
return wrap;
}
function renderArea(prior) {
const keep = prior || {};
el.area.textContent = '';
const zip = el.zip.value.trim();
const candidates = /^\d{5}$/.test(zip) ? candidatesForZip(zip) : null;
if (candidates && candidates.counties.length) {
// outside: part of this ZIP is in a county not in the table, so that stays a choice and leads to the no-ZIP paths.
const counties = candidates.outside ? candidates.counties.concat([OTHER_COUNTY]) : candidates.counties;
// Editing a location described through "another county" (manual pick or a hand-entered rate) reopens that choice.
const viaOther = candidates.outside && (keep.mode === 'custom' && !keep.county ||
Boolean(keep.manualCounty) && !candidates.counties.includes(keep.manualCounty));
let county = counties.includes(keep.county) ? keep.county : viaOther ? OTHER_COUNTY : counties[0];
if (counties.length > 1) {
const options = counties.map((id) => [id, id === OTHER_COUNTY ? COPY.countyNotListed : rowName(id)]);
el.area.appendChild(field('location-county', COPY.locationCounty, selectOf('location-county', options, county)));
if (county === OTHER_COUNTY) {
renderModeChoices(keep);
renderPreview();
return;
}
} else {
const wrap = el.area.appendChild(make('div', { class: 'field' }));
wrap.appendChild(make('span', { class: 'field-label' }, COPY.locationCounty));
wrap.appendChild(make('span', { id: 'location-county-fixed', 'data-value': county }, rowName(county)));
}
// D1: a merged city-county government has no city inside it to ask about; the location keeps the merged row and
// its schools.
if (isMergedCounty(RATE_ROWS, county)) {
el.area.appendChild(make('p', { id: 'location-merged-note', class: 'hint' }, COPY.mergedCountyNote(rowName(county))));
renderPreview();
return;
}
const cities = candidates.cities.filter((id) => RATE_ROWS.some((r) => r.districtId === id && r.parentCountyId === county));
// With no candidate city the answer starts at "none of these", as before F4; a city not in the table is one click away.
const valid = cities.concat([NOT_LISTED, '']).includes(keep.city);
const choice = valid ? keep.city : (cities.length ? null : '');
// J5: one plain question. The answers are the city names, then a different city, then no city.
const set = el.area.appendChild(make('fieldset', { id: 'location-city-question', 'aria-describedby': 'location-city-hint' }));
set.appendChild(make('legend', {}, COPY.cityQuestion));
for (const id of cities) set.appendChild(radio('location-city', `location-city-${id}`, id, rowName(id).replace(/^City of /, ''), choice === id));
set.appendChild(radio('location-city', 'location-city-not-listed', NOT_LISTED, COPY.cityOther, choice === NOT_LISTED));
set.appendChild(radio('location-city', 'location-city-none', '', COPY.noneOfThese, choice === ''));
set.appendChild(make('p', { id: 'location-city-hint', class: 'hint field-hint' }, COPY.cityHint));
renderCityExtras(choice, keep);
} else {
// D1: a full ZIP outside the table says what the page covers and starts on the by-hand rate.
const outsideTable = /^\d{5}$/.test(zip);
if (outsideTable) {
el.area.appendChild(make('p', { id: 'location-zip-not-in-table', class: 'inline-warning' }, COPY.zipNotInTable(RATE_TABLE_META.districtCount)));
}
renderModeChoices(keep, outsideTable);
}
renderPreview();
}
// No usable ZIP candidate (or "a county not in the table"): pick a county and city from the table, or enter a rate.
function renderModeChoices(keep, preferCustom) {
const mode = keep.mode === 'custom' || (preferCustom && keep.mode !== 'manual') ? 'custom' : 'manual';
const set = el.area.appendChild(make('fieldset', { id: 'location-mode' }));
set.appendChild(make('legend', {}, COPY.zipMode));
set.appendChild(radio('location-mode', 'location-mode-manual', 'manual', COPY.zipModeManual, mode === 'manual'));
set.appendChild(radio('location-mode', 'location-mode-custom', 'custom', COPY.zipModeCustom, mode === 'custom'));
if (mode === 'manual') {
const options = [['', COPY.locationCountyChoose]].concat(countyRows().map((r) => [r.districtId, shortOf(r)]));
const county = keep.manualCounty || '';
el.area.appendChild(field('location-manual-county', COPY.locationCounty, selectOf('location-manual-county', options, county)));
if (county && isMergedCounty(RATE_ROWS, county)) {
el.area.appendChild(make('p', { id: 'location-merged-note', class: 'hint' }, COPY.mergedCountyNote(rowName(county))));
return;
}
const cityOptions = [['', COPY.locationNoCity]].concat(cityRowsFor(county).map((r) => [r.districtId, shortOf(r)]));
if (county) cityOptions.push([NOT_LISTED, COPY.cityNotListed]);
const city = cityOptions.some((o) => o[0] === keep.manualCity) ? keep.manualCity : '';
el.area.appendChild(field('location-manual-city', COPY.locationCity, selectOf('location-manual-city', cityOptions, city)));
renderCityExtras(city, keep);
} else {
const name = make('input', { id: 'custom-name', type: 'text', maxlength: '120', autocomplete: 'off' });
name.value = keep.customName || '';
el.area.appendChild(field('custom-name', COPY.customRateName, name));
const kinds = ['county', 'city', 'school'].map((k) => [k, COPY.customRateKinds[k]]);
el.area.appendChild(field('custom-kind', COPY.customRateKind, selectOf('custom-kind', kinds, keep.customKind || 'city')));
const bases = ['netProfit', 'grossReceipts'].map((k) => [k, COPY.customRateBases[k]]);
el.area.appendChild(field('custom-base', COPY.customRateBase, selectOf('custom-base', bases, keep.customBase || 'netProfit')));
const rate = make('input', { id: 'custom-rate', type: 'text', inputmode: 'decimal', autocomplete: 'off' });
rate.value = keep.customRate || '';
el.area.appendChild(field('custom-rate', COPY.customRatePct, rate));
}
}
// Fields that follow the city choice: a custom city's name, base and rate ("not listed"), or the license-class rate
// for a city whose rate depends on the business (requiresUserRate, Paducah).
function renderCityExtras(city, keep) {
if (city === NOT_LISTED) {
const box = el.area.appendChild(make('div', { id: 'location-city-custom', class: 'sub-fields' }));
const name = make('input', { id: 'custom-name', type: 'text', maxlength: '120', autocomplete: 'off' });
name.value = keep.customName || '';
box.appendChild(field('custom-name', COPY.cityNotListedName, name));
const bases = ['netProfit', 'grossReceipts'].map((k) => [k, COPY.customRateBases[k]]);
box.appendChild(field('custom-base', COPY.customRateBase, selectOf('custom-base', bases, keep.customBase || 'netProfit')));
const rate = make('input', { id: 'custom-rate', type: 'text', inputmode: 'decimal', autocomplete: 'off' });
rate.value = keep.customRate || '';
box.appendChild(field('custom-rate', COPY.customRatePct, rate));
return;
}
const row = city ? userRateRow(city) : null;
if (!row) return;
const box = el.area.appendChild(make('div', { id: 'location-user-rate', class: 'sub-fields' }));
box.appendChild(make('p', { id: 'user-rate-prompt', class: 'inline-warning' }, COPY.requiresUserRate(row.name)));
const rate = make('input', { id: 'user-rate', type: 'text', inputmode: 'decimal', autocomplete: 'off', 'aria-describedby': 'user-rate-prompt' });
rate.value = keep.userRate || '';
box.appendChild(field('user-rate', COPY.userRateLabel, rate));
}
function parsePct(text) {
const t = (text || '').trim();
const pct = /^\d+(\.\d+)?$/.test(t) ? Number(t) : NaN;
return pct >= 0 && pct <= 5 ? pct : null;
}
// The location for a county plus a city choice: a city in the table, none, a city not in the table (custom row),
// or a requiresUserRate city (custom row at the user's rate, or no city row when the rate is left blank).
function countyLocation(base, county, city, a, taxYear) {
const ids = (cityId) => buildDistrictIds(RATE_ROWS, taxYear, county, cityId);
if (city === NOT_LISTED) {
const customName = (a.customName || '').trim();
const pct = parsePct(a.customRate);
const errors = [];
if (customName.length < 1 || customName.length > 120) errors.push(['custom-name', COPY.customRateNameInvalid]);
if (pct === null) errors.push(['custom-rate', COPY.customRatePctInvalid]);
if (errors.length) return { errors };
return { location: Object.assign(base, { districtIds: ids(NEW_CUSTOM), insideCityLimits: true }),
customRate: { name: customName, kind: 'city', base: a.customBase || 'netProfit', ratePct: pct, effectiveDate: `${taxYear}-01-01` } };
}
const row = city ? userRateRow(city) : null;
if (row) {
if ((a.userRate || '').trim() === '') return { location: Object.assign(base, { districtIds: ids(null), insideCityLimits: true }), customRate: null };
const pct = parsePct(a.userRate);
if (pct === null) return { errors: [['user-rate', COPY.customRatePctInvalid]] };
return { location: Object.assign(base, { districtIds: ids(NEW_CUSTOM), insideCityLimits: true }),
customRate: { name: row.name, kind: 'city', base: row.base, ratePct: pct, effectiveDate: `${taxYear}-01-01` } };
}
return { location: Object.assign(base, { districtIds: ids(city), insideCityLimits: Boolean(city) }), customRate: null };
}
// -> { errors: [[controlId, text], ...] } (every problem at once, D1) or { location: {...fields}, customRate: {...} | null }
function readForm() {
const name = el.name.value.trim();
const zipText = el.zip.value.trim();
const errors = [];
if (name.length < 1 || name.length > 120) errors.push(['location-name', COPY.locationNameInvalid]);
if (zipText !== '' && !/^\d{5}$/.test(zipText)) errors.push(['location-zip', COPY.locationZipInvalid]);
const zip = zipText === '' ? null : zipText;
const rest = readPlace(name, zip);
if (rest.errors) return { errors: errors.concat(rest.errors) };
return errors.length ? { errors } : rest;
}
// The county, city and rate part of the form.
function readPlace(name, zip) {
const a = readArea();
const taxYear = current.settings.taxYear;
const fixed = document.getElementById('location-county-fixed');
const zipCounty = fixed ? fixed.getAttribute('data-value') : a.county;
if (zipCounty && zipCounty !== OTHER_COUNTY) {
const asked = document.getElementById('location-city-question');
if (asked && a.city === null) return { errors: [['location-city-question', COPY.locationCityRequired]] };
return countyLocation({ name, zip, confirmedBy: 'user' }, zipCounty, a.city || null, a, taxYear);
}
if (a.mode === 'custom') {
const customName = (a.customName || '').trim();
const pct = parsePct(a.customRate);
const errors = [];
if (customName.length < 1 || customName.length > 120) errors.push(['custom-name', COPY.customRateNameInvalid]);
if (pct === null) errors.push(['custom-rate', COPY.customRatePctInvalid]);
if (errors.length) return { errors };
const customRate = { name: customName, kind: a.customKind, base: a.customBase, ratePct: pct, effectiveDate: `${taxYear}-01-01` };
return { location: { name, zip, districtIds: null, insideCityLimits: a.customKind === 'city', confirmedBy: 'user-manual' }, customRate };
}
if (!a.manualCounty) return { errors: [['location-manual-county', COPY.locationCountyRequired]] };
return countyLocation({ name, zip, confirmedBy: 'user-manual' }, a.manualCounty, a.manualCity || null, a, taxYear);
}
// D1: each message sits under its own control and goes away when that control changes.
function clearError(controlId) {
const note = document.getElementById(`${controlId}-error`);
if (note) note.remove();
const control = document.getElementById(controlId);
if (control) {
control.removeAttribute('aria-invalid');
const rest = (control.getAttribute('aria-describedby') || '').split(' ').filter((t) => t && t !== `${controlId}-error`);
if (rest.length) control.setAttribute('aria-describedby', rest.join(' '));
else control.removeAttribute('aria-describedby');
}
}
function clearErrors() {
for (const note of Array.from(el.form.querySelectorAll('.field-error'))) clearError(note.id.replace(/-error$/, ''));
}
function showErrors(errors) {
errors.forEach(([controlId, text], i) => {
const control = document.getElementById(controlId);
if (!control) return;
const note = make('p', { id: `${controlId}-error`, class: 'field-error', role: 'alert' }, text);
(control.closest('.field') || control).after(note);
if (control.tagName !== 'FIELDSET') control.setAttribute('aria-invalid', 'true');
const prior = control.getAttribute('aria-describedby');
control.setAttribute('aria-describedby', prior ? `${prior} ${note.id}` : note.id);
if (i === 0) (control.tagName === 'FIELDSET' ? control.querySelector('input') : control).focus();
});
}
function renderPreview() {
el.preview.textContent = '';
const result = readForm();
el.preview.appendChild(make('p', { class: 'hint' }, COPY.locationDistrictsPreview));
const list = el.preview.appendChild(make('ul', { id: 'location-districts-list' }));
if (!result.location) {
list.appendChild(make('li', { class: 'hint' }, COPY.locationDistrictsNone));
return;
}
const pending = result.customRate ? [fallbackRow(Object.assign({ districtId: NEW_CUSTOM }, result.customRate))] : [];
const names = result.location.districtIds === null
? [`${result.customRate.name} (${COPY.notInTable})`]
: districtNames(result.location, pending);
for (const n of names) list.appendChild(make('li', {}, n));
}
function customIdsOf(location) {
return location ? location.districtIds.filter((id) => id.startsWith('custom_')) : [];
}
function dropUnusedCustom(w, ids) {
let out = w;
for (const id of ids) out = reduce(out, { type: 'customRate/delete', districtId: id });
return out;
}
function saveLocation() {
clearErrors();
el.listError.hidden = true;
const result = readForm();
if (result.errors) {
showErrors(result.errors);
return;
}
let next = current;
const location = result.location;
if (result.customRate) {
const id = nextCustomRateId(next);
location.districtIds = location.districtIds === null ? [id] : location.districtIds.map((d) => (d === NEW_CUSTOM ? id : d));
next = reduce(next, { type: 'customRate/add', customRate: result.customRate });
}
if (editingId) {
const old = current.locations.find((l) => l.id === editingId);
next = reduce(next, { type: 'location/update', id: editingId, patch: location });
next = dropUnusedCustom(next, customIdsOf(old));
} else {
next = reduce(next, { type: 'location/add', location });
}
resetForm();
el.sheet.close();
commitFn(next);
el.listStatus.textContent = COPY.locationSaved;
}
// Opens the sheet and hands focus back to what opened it when it closes.
function openSheet(opener) {
if (el.sheet.open) return;
const back = opener || document.activeElement;
el.sheet.addEventListener('close', () => {
if (back && back !== document.body && document.contains(back)) back.focus();
}, { once: true });
el.sheet.showModal();
el.name.focus();
}
function resetForm() {
editingId = null;
el.formTitle.textContent = COPY.locationAdd;
el.name.value = '';
el.zip.value = '';
clearErrors();
renderArea(null);
}
function startEdit(loc) {
editingId = loc.id;
el.formTitle.textContent = COPY.locationEditTitle;
openSheet(document.querySelector(`#locations-table button[data-action="edit"][data-id="${loc.id}"]`));
el.name.value = loc.name;
el.zip.value = loc.zip || '';
const custom = current.customRates.find((r) => loc.districtIds.includes(r.districtId));
const county = loc.districtIds.find((id) => countyRows().some((r) => r.districtId === id)) || '';
let city = loc.districtIds.find((id) => RATE_ROWS.some((r) => r.districtId === id && r.kind === 'city')) || '';
const keep = { mode: 'manual', county };
if (custom && !county) {
renderArea({ mode: 'custom', customName: custom.name, customKind: custom.kind, customBase: custom.base, customRate: String(custom.ratePct) });
el.name.focus();
return;
}
const userCity = cityRowsFor(county).find((r) => r.requiresUserRate === true) || null;
if (custom && userCity && custom.name === userCity.name) {
city = userCity.districtId;
keep.userRate = String(custom.ratePct);
} else if (custom) {
city = NOT_LISTED;
Object.assign(keep, { customName: custom.name, customBase: custom.base, customRate: String(custom.ratePct) });
} else if (!city && loc.insideCityLimits && userCity) {
city = userCity.districtId;
}
renderArea(Object.assign(keep, { city, manualCounty: county, manualCity: city }));
el.name.focus();
}
function deleteLocation(loc) {
el.listError.hidden = true;
const n = current.transactions.filter((t) => t.locationId === loc.id).length;
if (n > 0) {
el.listError.textContent = COPY.locationInUse(n);
el.listError.hidden = false;
el.listStatus.textContent = '';
return;
}
if (editingId === loc.id) resetForm();
let next = reduce(current, { type: 'location/delete', id: loc.id });
next = dropUnusedCustom(next, customIdsOf(loc));
commitFn(next);
el.listStatus.textContent = COPY.locationDeleted;
}
function renderList() {
el.tbody.textContent = '';
if (current.locations.length === 0) {
el.tbody.appendChild(make('tr', { class: 'empty' })).appendChild(make('td', { colspan: '5' }, COPY.locationsEmpty));
return;
}
for (const loc of current.locations) {
const tr = el.tbody.appendChild(make('tr', { 'data-location-id': loc.id }));
tr.appendChild(make('td', {}, loc.name));
tr.appendChild(make('td', { class: 'nowrap' }, loc.zip || ''));
// V7: short names on one line, separated by commas.
tr.appendChild(make('td', { class: 'district-list' }, districtNames(loc).join(', ')));
const count = current.transactions.filter((t) => t.locationId === loc.id).length;
tr.appendChild(make('td', { class: 'num' }, String(count)));
const actions = tr.appendChild(make('td', { class: 'row-actions' }));
actions.appendChild(make('button', { type: 'button', 'data-action': 'edit', 'data-id': loc.id }, COPY.locationEdit));
actions.appendChild(make('button', { type: 'button', 'data-action': 'delete', 'data-id': loc.id }, COPY.locationDelete));
}
}
function renderLocations(root, workspace, commit) {
current = workspace;
commitFn = commit;
if (!built || !root.contains(el.tbody)) build(root);
if (editingId && !current.locations.some((l) => l.id === editingId)) resetForm();
el.resident.value = current.settings.residentCountyId || '';
renderList();
renderPreview();
}
return { renderLocations };
})();
// ---- ui-math ----
const ui_math = (() => {
const { COPY, formatDate, shortDistrictName } = copy;
// ui-math.js — layer 4, imported only by ui.js (and by the build and the tests, which check it). WO-14 W4: the
// arithmetic behind one local office's tax, written out from the values tax.combined already holds for that office
// (base, share of the work, apportioned amount, exemption, rate, cap, minimum, fee, credit) so it can be checked
// with a calculator. It is display only: the tax shown is the engine's. Every "=" written here is checked first: the
// numbers as displayed are multiplied out exactly and must give the engine's cents; a form that does not is not
// shown, and nothing is rounded to make one fit.
function formatCents(cents) {
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${cents < 0 ? '-' : ''}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
// A number as an exact fraction of two BigInts, from an integer and the count of decimals it is shown with.
const frac = (int, decimals) => [BigInt(int), 10n ** BigInt(decimals)];
const mul = (a, b) => [a[0] * b[0], a[1] * b[1]];
const add = (a, b) => [a[0] * b[1] + b[0] * a[1], a[1] * b[1]];
const neg = (a) => [-a[0], a[1]];
// To whole cents, halves up, as Math.round does.
function toCents(a) {
const [n, d] = a;
return Number((2n * n + d) / (2n * d) - ((2n * n + d) % (2n * d) < 0n ? 1n : 0n));
}
// A percent shown with the fewest decimals (2 to 6) that hold it exactly, as { text, value: exact fraction of 1 }.
function exactPct(pct) {
for (let k = 2; k <= 6; k++) {
const scaled = pct * 10 ** k;
if (Math.abs(scaled - Math.round(scaled)) < 1e-7) return { text: `${pct.toFixed(k)}%`, value: frac(Math.round(scaled), k + 2) };
}
return null;
}
// A share of the work shown as a percent with d decimals, correctly rounded.
function sharePct(factor, d) {
const scaled = Math.round(factor * 10 ** (d + 2));
return { text: `${(scaled / 10 ** d).toFixed(d)}%`, value: frac(scaled, d + 2) };
}
// What follows the rate: a cap or a minimum that changed the figure, a flat fee, a credit. Each is a step of its own,
// in the engine's order. -> the steps, or null when they do not arrive at the engine's figure.
function tail(l, computedCents, creditName) {
const steps = [];
let cents = computedCents;
if (l.afterCapCents < cents) {
cents = l.afterCapCents;
steps.push({ text: COPY.math.cap(formatCents(cents)), cents });
}
if (l.afterMinimumCents > cents) {
cents = l.afterMinimumCents;
steps.push({ text: COPY.math.minimum(formatCents(cents)), cents });
}
if (cents !== l.afterMinimumCents) return null;
if (l.flatLicenseFeeCents > 0) {
const from = cents;
cents += l.flatLicenseFeeCents;
steps.push({ text: COPY.math.fee(formatCents(from), formatCents(l.flatLicenseFeeCents), formatCents(cents)), cents });
}
if (l.creditCents > 0) {
const from = cents;
cents -= l.creditCents;
steps.push({ text: COPY.math.credit(formatCents(from), formatCents(l.creditCents), creditName, formatCents(cents)), cents });
}
return cents === l.liabilityCents ? steps : null;
}
// l: one line of tax.combined's local list. row: the rate row in force for it (for the full exemption and the names).
// nameOf(districtId): a district's short name. -> { steps: [{ text, cents }], text } or null when no form multiplies
// out to the engine's figure. steps[last].cents is always l.liabilityCents.
function officeMath(l, row, nameOf) {
if (typeof l.ratePct !== 'number') return null;
const base = formatCents(l.baseCents);
const word = l.base === 'grossReceipts' ? COPY.math.baseWords.grossReceipts : COPY.math.baseWords.netProfit;
const creditName = row && row.creditAgainst ? nameOf(row.creditAgainst) : null;
const done = (steps) => ({ steps, text: steps.map((s) => s.text).join('; ') });
const split = Array.isArray(l.portions) && l.portions.length > 1;
// A row taxed at one rate inside a city and another outside: each part of the work at its own rate.
if (split) {
const parts = [];
for (const p of l.portions) {
const rate = exactPct(p.ratePct);
if (!rate) return null;
parts.push({ p, rate, where: p.cityId === null ? COPY.math.outsideCities : COPY.math.insideCity(nameOf(p.cityId)) });
}
const after = tail(l, l.computedCents, creditName);
if (!after) return null;
const terms = parts.map((x) => COPY.math.portionTerm(formatCents(x.p.apportionedCents), x.where, x.rate.text));
const sum = parts.reduce((acc, x) => add(acc, mul(frac(x.p.apportionedCents, 0), x.rate.value)), [0n, 1n]);
if (toCents(sum) === l.computedCents) return done([{ text: COPY.math.equals(terms.join(' + '), formatCents(l.computedCents)), cents: l.computedCents }].concat(after));
// The engine rounds each part to the cent before adding; when that shows, each part is its own step.
const each = parts.map((x, i) => ({ text: COPY.math.equals(terms[i], formatCents(x.p.computedCents)), cents: x.p.computedCents }));
if (parts.some((x) => toCents(mul(frac(x.p.apportionedCents, 0), x.rate.value)) !== x.p.computedCents)) return null;
if (parts.reduce((acc, x) => acc + x.p.computedCents, 0) !== l.computedCents) return null;
each.push({ text: COPY.math.equals(parts.map((x) => formatCents(x.p.computedCents)).join(' + '), formatCents(l.computedCents)), cents: l.computedCents });
return done(each.concat(after));
}
const rate = exactPct(l.ratePct);
const after = tail(l, l.computedCents, creditName);
if (!rate || !after) return null;
// The whole share of the work is inside the exemption: nothing to multiply.
if (l.taxableCents === 0 && l.exemptionCents > 0 && l.computedCents === 0) {
const full = row && row.exemptionCents ? row.exemptionCents : l.exemptionCents;
return done([{ text: COPY.math.insideExemption(formatCents(l.apportionedCents), base, word, formatCents(full)), cents: 0 }].concat(after));
}
// One line: base x share x rate, with the exemption taken off first where there is one. The share is shown with
// as few decimals as multiply out to the engine's figure (two when the share is a round percent).
for (let d = 2; d <= 6; d++) {
const share = sharePct(l.factor, d);
let value = mul(frac(l.baseCents, 0), share.value);
if (l.exemptionCents > 0) value = add(value, neg(frac(l.exemptionCents, 0)));
if (value[0] < 0n || toCents(mul(value, rate.value)) !== l.computedCents) continue;
const line = l.exemptionCents > 0 ? COPY.math.withExemption(base, share.text, formatCents(l.exemptionCents), rate.text)
: COPY.math.plain(base, word, share.text, rate.text);
return done([{ text: COPY.math.equals(line, formatCents(l.computedCents)), cents: l.computedCents }].concat(after));
}
// No short percent multiplies out: start from the amount of the base that belongs to the work here, which the
// engine holds to the cent, and say the share it came from in words.
let value = frac(l.apportionedCents, 0);
if (l.exemptionCents > 0) value = add(value, neg(frac(l.exemptionCents, 0)));
if (toCents(mul(value, rate.value)) !== l.computedCents) return null;
const lead = COPY.math.apportionedLead(formatCents(l.apportionedCents), base, word, sharePct(l.factor, 2).text);
const line = l.exemptionCents > 0 ? COPY.math.fromApportionedExempt(formatCents(l.apportionedCents), formatCents(l.exemptionCents), rate.text)
: COPY.math.fromApportioned(formatCents(l.apportionedCents), rate.text);
const out = done([{ text: COPY.math.equals(line, formatCents(l.computedCents)), cents: l.computedCents }].concat(after));
return Object.assign(out, { lead });
}
// ---- the disclosure ----
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
// Adds the chevron cell to a table row just appended to its body, and the row's detail under it.
// table: a short name for the table ('offices', 'local'); key: the office; name: its short name for the button.
// open: whether it is open; onToggle(open): told when the chevron is used; fill(cell): writes the detail.
function mathDisclosure(tr, table, key, name, colspan, open, onToggle, fill) {
const id = `math-${table}-${key}`;
const button = tr.appendChild(make('td', { class: 'math-more' })).appendChild(make('button', { type: 'button', class: 'plain rate-toggle math-toggle',
'data-office': key, 'aria-expanded': String(open), 'aria-controls': id, 'aria-label': COPY.math.toggleLabel(name), title: COPY.math.toggleTitle }));
button.appendChild(make('span', { class: 'chevron', 'aria-hidden': 'true' }, COPY.rateChevron));
const detail = tr.parentNode.appendChild(make('tr', { id, class: 'rate-detail math-detail', 'data-detail-for': key, hidden: !open }));
const cell = detail.appendChild(make('td', { colspan: String(colspan), class: 'rate-detail-cell math-cell' }));
fill(cell);
button.addEventListener('click', () => {
const now = button.getAttribute('aria-expanded') !== 'true';
button.setAttribute('aria-expanded', String(now));
detail.hidden = !now;
onToggle(now);
});
}
// A local office's detail: the arithmetic, where the rate comes from and when it was checked, and one caption.
function fillLocalMath(cell, l, row, nameOf) {
const math = officeMath(l, row, nameOf);
if (math) {
if (math.lead) cell.appendChild(make('div', { class: 'math-lead' }, math.lead));
cell.appendChild(make('div', { class: 'math-line', 'data-cents': String(l.liabilityCents) }, math.text));
} else {
cell.appendChild(make('div', { class: 'math-none' }, COPY.math.none));
}
const source = cell.appendChild(make('div', { class: 'math-source' }));
if (row && row.sourceUrl) {
const title = row.sourceTitle || row.name;
const checked = row.verifiedOn ? formatDate(row.verifiedOn) : null;
const [before, after] = (checked ? COPY.math.source('\u0000', checked) : COPY.math.sourceUndated('\u0000')).split('\u0000');
source.appendChild(document.createTextNode(before));
source.appendChild(make('a', { href: row.sourceUrl, target: '_blank', rel: 'noopener noreferrer', class: 'math-source-link' }, title));
source.appendChild(document.createTextNode(after));
} else {
source.textContent = COPY.math.sourceCustom;
}
if (math) cell.appendChild(make('div', { class: 'caption math-caption' }, COPY.math.caption));
}
// The IRS and Kentucky: one sentence naming the form of the calculation, and the way to Assumptions.
function fillFormSentence(cell, key, toAssumptions) {
const p = cell.appendChild(make('div', { class: 'math-form' }, `${COPY.math.forms[key]} `));
p.appendChild(make('button', { type: 'button', class: 'link-button math-assumptions', 'data-office': key }, COPY.math.assumptionsLink)).addEventListener('click', toAssumptions);
}
function officeShortName(l) {
const name = shortDistrictName({ districtId: l.districtId, name: l.name, kind: l.kind, custom: l.custom });
return l.custom ? `${name} (${COPY.notInTable})` : name;
}
return { officeMath, mathDisclosure, fillLocalMath, fillFormSentence, officeShortName };
})();
// ---- ui-motion ----
const ui_motion = (() => {
// ui-motion.js — layer 4, imported only by ui.js. WO-14 W3: motion on recalculation. A hero or stat value counts from
// what it showed to what it shows now over 500 ms; bar widths move over 500 ms; a redrawn chart fades in over the one
// it replaces in 200 ms (no shape is morphed). None of it runs under prefers-reduced-motion: reduce: there every value
// is simply the new one.
//
// The page is redrawn by rebuilding its nodes, so "what it showed" is remembered here by a stable key. The text of a
// counting number is its final value from the first frame; the moving digits are drawn by ::after from data-anim, so
// a screen reader hears one value and a test that reads the text reads the final one.
const REDUCED = window.matchMedia('(prefers-reduced-motion: reduce)');
const COUNT_MS = 500;
// However late the first frame after a redraw comes, the digits are final this long after the change itself.
const DONE_BY_MS = 800;
const FADE_MS = 200;
const easeOut = (t) => 1 - (1 - t) ** 3;
function motionOn() {
return !REDUCED.matches;
}
// ---- numbers ----
// "$44,826", "19%", "Short by $9,876": some words, one number, some words.
const NUMBER = /^(\D*)(\d[\d,]*(?:\.\d+)?)(\D*)$/;
function withCommas(value, decimals) {
const [whole, part] = value.toFixed(decimals).split('.');
return whole.replace(/\B(?=(\d{3})+(?!\d))/g, ',') + (part ? `.${part}` : '');
}
// node's text is already toText. Counts the drawn digits from fromText's number to toText's when the two differ only
// in the number; otherwise nothing moves.
function countTo(node, fromText, toText) {
if (!motionOn()) return;
const a = NUMBER.exec(fromText);
const b = NUMBER.exec(toText);
if (!a || !b || a[1] !== b[1] || a[3] !== b[3]) return;
const from = Number(a[2].replace(/,/g, ''));
const to = Number(b[2].replace(/,/g, ''));
if (from === to) return;
const decimals = (b[2].split('.')[1] || '').length;
// The clock starts at the first frame drawn after the redraw, so the count is not cut short by the redraw itself;
// it runs 500 ms, or less when that first frame came late, so the digits are final 800 ms after the change.
const changed = performance.now();
let start = null;
let length = COUNT_MS;
node.setAttribute('data-anim', fromText);
node.classList.add('counting');
const frame = (now) => {
if (start === null) {
start = now;
length = Math.min(COUNT_MS, Math.max(0, changed + DONE_BY_MS - now));
}
const t = length === 0 ? 1 : (now - start) / length;
if (t >= 1 || !node.isConnected || !motionOn()) {
node.classList.remove('counting');
node.removeAttribute('data-anim');
return;
}
node.setAttribute('data-anim', `${b[1]}${withCommas(from + (to - from) * easeOut(Math.max(0, t)), decimals)}${b[3]}`);
requestAnimationFrame(frame);
};
requestAnimationFrame(frame);
}
// ---- bars ----
// Every bar on the page with a key that survives a redraw, and how its size is read and set.
const svgRect = {
read: (el) => [Number(el.getAttribute('x')), Number(el.getAttribute('width'))],
write: (el, [x, w]) => { el.setAttribute('x', x.toFixed(2)); el.setAttribute('width', w.toFixed(2)); }
};
const fill = {
read: (el) => [parseFloat(el.style.width)],
write: (el, [w]) => { el.style.width = `${w.toFixed(2)}%`; }
};
function bars() {
const out = [];
for (const el of document.querySelectorAll('svg.hundred-bar rect[data-part], svg.jar-bar rect[data-part]')) {
out.push([`${el.ownerSVGElement.id}:${el.getAttribute('data-part')}`, el, svgRect]);
}
for (const el of document.querySelectorAll('.hbars .bar[data-name] .bar-fill')) out.push([`local:${el.closest('.bar').getAttribute('data-name')}`, el, fill]);
return out;
}
const lastBars = new Map();
const seenBars = new WeakSet();
function moveBars() {
for (const [key, el, kind] of bars()) {
if (seenBars.has(el)) continue;
seenBars.add(el);
const to = kind.read(el);
const from = lastBars.get(key);
lastBars.set(key, to);
if (!from || !motionOn() || from.every((v, i) => v === to[i]) || to.some((v) => !Number.isFinite(v))) continue;
let start = null;
kind.write(el, from);
const frame = (now) => {
if (start === null) start = now;
const t = (now - start) / COUNT_MS;
if (t >= 1 || !el.isConnected || !motionOn()) {
kind.write(el, to);
return;
}
const e = easeOut(Math.max(0, t));
kind.write(el, from.map((v, i) => v + (to[i] - v) * e));
requestAnimationFrame(frame);
};
requestAnimationFrame(frame);
}
}
// ---- charts ----
const CHARTS = 'svg[id]:not(.hundred-bar):not(.jar-bar):not(.brand-mark)';
const removedCharts = new Map();
let fresh = false;
function crossfade(records) {
for (const r of records) {
for (const n of r.removedNodes) {
if (!(n instanceof Element)) continue;
const found = n.matches(CHARTS) ? [n] : [...n.querySelectorAll(CHARTS)];
for (const s of found) removedCharts.set(s.id, s);
}
}
for (const [id, old] of [...removedCharts]) {
const now = document.getElementById(id);
if (!now || now === old) continue;
removedCharts.delete(id);
const box = now.getBoundingClientRect();
if (!motionOn() || box.width === 0 || box.height === 0 || now.innerHTML === old.innerHTML || typeof now.animate !== 'function') continue;
old.removeAttribute('id');
for (const el of old.querySelectorAll('[id]')) el.removeAttribute('id');
old.setAttribute('aria-hidden', 'true');
old.classList.add('chart-ghost');
Object.assign(old.style, { left: `${box.left + window.scrollX}px`, top: `${box.top + window.scrollY}px`, width: `${box.width}px`, height: `${box.height}px` });
document.body.appendChild(old);
// The fade starts at the first frame drawn after the redraw (a long redraw would otherwise use up its 200 ms
// before anything is painted); until then the old chart covers the new one.
now.style.opacity = '0';
requestAnimationFrame(() => {
now.style.opacity = '';
if (!now.isConnected) {
old.remove();
return;
}
now.animate([{ opacity: 0 }, { opacity: 1 }], { duration: FADE_MS, easing: 'linear' });
const out = old.animate([{ opacity: 1 }, { opacity: 0 }], { duration: FADE_MS, easing: 'linear' });
const drop = () => old.remove();
out.onfinish = drop;
out.oncancel = drop;
});
}
}
// Called after the page's nodes change (ui.js's observer), with the observer's records.
function motionAfter(records) {
moveBars();
if (fresh) {
fresh = false;
removedCharts.clear();
return;
}
crossfade(records);
}
// Another workspace: nothing it shows is a change from what the last one showed.
function resetMotion() {
lastBars.clear();
removedCharts.clear();
fresh = true;
}
return { motionOn, countTo, motionAfter, resetMotion };
})();
// ---- ui-overview ----
const ui_overview = (() => {
const { taxOffices, marginalRates, everyHundred, typicalJobCents, avoidableCost, taxJar, ledgerPeriod } = quant;
const { isQuickEstimate, scheduleC } = book;
const { combined } = tax;
const { rowsForTaxYear, fallbackRow } = jurisdictions;
const { COPY, formatDate, shortDistrictName } = copy;
// ui-overview.js — layer 4, imported only by ui.js. The Overview tab (WO-13 V3), top to bottom: the hero card (what is
// kept so far, and where every $100 goes), three stat tiles that lead to their tabs, "Where the tax goes" (one row per
// office), "Unfiled returns" (only when there is something unfiled or missed), and "Where the job is changes the tax".
// Every figure comes from the functions the three tour screens used (quant.taxOffices, avoidableCost, everyHundred,
// marginalRates, taxJar and the shared set-aside run). contextChart is drawn in the What if panel "Next $1,000".
const SVG = 'http://www.w3.org/2000/svg';
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function svg(tag, attrs, text) {
const node = document.createElementNS(SVG, tag);
for (const k of Object.keys(attrs || {})) node.setAttribute(k, attrs[k]);
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function formatDollars(cents) {
return `$${String(Math.round(cents / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
}
// A visually hidden table holding a chart's numbers. The wrapper is what is hidden: a table sizes to its content and
// would widen the page.
function srTable(parent, id, columns, rows) {
const t = parent.appendChild(make('div', { class: 'sr-only' })).appendChild(make('table', { id }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const c of columns) head.appendChild(make('th', { scope: 'col' }, c));
const body = t.appendChild(make('tbody'));
for (const r of rows) {
const tr = body.appendChild(make('tr'));
for (const cell of r) tr.appendChild(make('td', {}, cell));
}
return t;
}
function isDemoWorkspace(w) {
return w.locations.length > 0 && w.locations.every((l) => l.confirmedBy === 'fixture');
}
function card(root, id, titleId, title, extra) {
const sec = root.appendChild(make('section', { id, class: extra ? `card ${extra}` : 'card', 'aria-labelledby': titleId }));
sec.appendChild(make('h3', { id: titleId }, title));
return sec;
}
// D3: a ledger built from the quick answers says so and offers the way to exact figures.
function quickBanner(sec, workspace, on) {
if (!isQuickEstimate(workspace)) return;
const box = sec.appendChild(make('div', { id: 'quick-banner', class: 'tour-banner' }));
// J9: with last year written in from the fifth answer, say whether its income was entered or assumed.
const taxYear = workspace.settings.taxYear;
const hasLastYear = workspace.transactions.some((t) => t.date.startsWith(`${taxYear - 1}-`));
const same = scheduleC(workspace, taxYear - 1).grossReceiptsCents === scheduleC(workspace, taxYear).grossReceiptsCents;
box.appendChild(make('p', { id: 'quick-banner-text' }, !hasLastYear ? COPY.quickBanner : same ? COPY.quickBannerAssumed : COPY.quickBannerEntered));
box.appendChild(make('button', { id: 'quick-banner-link', type: 'button', class: 'link-button' }, COPY.quickBannerLink))
.addEventListener('click', on.toLedger);
}
// ---- hero card ----
// J1: where every $100 invoiced goes: one full-width bar in three parts, each named underneath with its amount.
function hundredBar(parent, parts, demo) {
const wrap = parent.appendChild(make('div', { id: 'screen1-hundred', class: 'hundred' }));
wrap.appendChild(make('p', { id: 'screen1-hundred-title', class: 'hundred-title' }, COPY.hundredTitle));
const items = [['costs', parts.costsCents, COPY.hundredParts.costs], ['taxes', parts.taxesCents, COPY.hundredParts.taxes],
['kept', parts.keptCents, demo ? COPY.hundredParts.kept : COPY.hundredParts.keptYours]];
const W = 1000;
const H = 12;
const s = wrap.appendChild(svg('svg', { id: 'screen1-hundred-bar', class: 'hundred-bar', viewBox: `0 0 ${W} ${H}`, preserveAspectRatio: 'none', role: 'img',
'aria-label': COPY.hundredLabel(formatCents(parts.costsCents), formatCents(parts.taxesCents), formatCents(parts.keptCents)) }));
s.appendChild(svg('title', {}, COPY.hundredTitle));
let x = 0;
for (const [key, cents] of items) {
const w = cents / 10000 * W;
s.appendChild(svg('rect', { x: x.toFixed(2), y: '0', width: w.toFixed(2), height: String(H), class: `seg hundred-${key}`, 'data-part': key }));
x += w;
}
const list = wrap.appendChild(make('ul', { id: 'screen1-hundred-key', class: 'hundred-key' }));
for (const [key, cents, label] of items) {
const li = list.appendChild(make('li', { 'data-part': key }));
li.appendChild(make('span', { class: `swatch hundred-${key}`, 'aria-hidden': 'true' }));
li.appendChild(make('span', { class: 'hundred-name' }, label));
li.appendChild(make('span', { class: 'hundred-amount' }, formatCents(cents)));
}
srTable(wrap, 'screen1-hundred-data', [COPY.hundredColumns.part, COPY.hundredColumns.amount], items.map(([, cents, label]) => [label, formatCents(cents)]));
}
// WO-14 W1: the try-it row under the $100 bar: an amount, a place and Add. It adds a job dated today through the
// sheet's own path (on.addJob), and every figure on the page is computed again. What the row holds is kept here, since
// the tab is redrawn after every add: the example starts on $500 at Georgetown clients; after an add the amount is
// empty and the cursor is back in it. ui.js starts it afresh when another workspace is loaded.
const tryRow = { fresh: true, amount: '', placeId: null, refocus: false };
function resetTryRow() {
Object.assign(tryRow, { fresh: true, amount: '', placeId: null, refocus: false });
}
function tryItRow(hero, workspace, demo, on) {
if (workspace.locations.length === 0) return;
if (tryRow.fresh) {
const example = demo ? workspace.locations.find((l) => l.name === COPY.tryIt.examplePlace) : null;
tryRow.amount = example ? COPY.tryIt.exampleAmount : '';
tryRow.placeId = (example || workspace.locations[0]).id;
tryRow.fresh = false;
}
if (!workspace.locations.some((l) => l.id === tryRow.placeId)) tryRow.placeId = workspace.locations[0].id;
const form = hero.appendChild(make('form', { id: 'try-it', class: 'try-it', novalidate: '', 'aria-labelledby': 'try-it-label' }));
form.appendChild(make('p', { id: 'try-it-label', class: 'try-it-label' }, COPY.tryIt.label));
const amountField = form.appendChild(make('div', { class: 'field try-amount' }));
amountField.appendChild(make('label', { for: 'try-amount' }, COPY.tryIt.amount));
const amount = amountField.appendChild(make('input', { id: 'try-amount', type: 'text', inputmode: 'decimal', autocomplete: 'off' }));
amount.value = tryRow.amount;
const placeField = form.appendChild(make('div', { class: 'field try-place' }));
placeField.appendChild(make('label', { for: 'try-place' }, COPY.tryIt.place));
const place = placeField.appendChild(make('select', { id: 'try-place' }));
for (const l of workspace.locations) place.appendChild(make('option', { value: l.id }, l.name));
place.value = tryRow.placeId;
form.appendChild(make('button', { id: 'try-add', type: 'submit', class: 'primary' }, COPY.tryIt.add));
const error = form.appendChild(make('p', { id: 'try-error', class: 'field-error', role: 'alert', hidden: true }));
const dated = demo ? exampleJobDate(workspace) : null;
if (dated) form.appendChild(make('p', { id: 'try-dated', class: 'caption try-dated' }, COPY.tryIt.dated(dated)));
amount.addEventListener('input', () => {
tryRow.amount = amount.value;
error.hidden = true;
});
place.addEventListener('change', () => {
tryRow.placeId = place.value;
});
form.addEventListener('submit', (e) => {
e.preventDefault();
const typed = amount.value;
// The add redraws this tab before it returns, so the row's next state is set first.
Object.assign(tryRow, { amount: '', placeId: place.value, refocus: true });
const problem = on.addJob(typed, place.value);
if (problem === null) return;
Object.assign(tryRow, { amount: typed, refocus: false });
error.textContent = problem;
error.hidden = false;
amount.focus();
});
if (tryRow.refocus) {
tryRow.refocus = false;
amount.focus({ preventScroll: true });
}
}
// WO-15 X3: the date the try-it row gives its job in the example: the latest entry date of the tax year (Oct 31 for
// Marcus), so the job lands inside the period the hero already names. Null when the year has no entry.
function exampleJobDate(workspace) {
const prefix = `${workspace.settings.taxYear}-`;
let last = null;
for (const t of workspace.transactions) if (t.date.startsWith(prefix) && (last === null || t.date > last)) last = t.date;
return last;
}
// An empty workspace whose Quick estimate card was set aside: the way back to it.
function emptyActions(sec, workspace, on) {
const quick = document.getElementById('quick-sheet');
if (workspace.locations.length > 0 || workspace.transactions.length > 0 || (quick && quick.open)) return;
const controls = sec.appendChild(make('div', { class: 'form-actions' }));
controls.appendChild(make('button', { id: 'overview-quick', type: 'button', class: 'primary' }, COPY.startSheet.quick)).addEventListener('click', on.quick);
}
// WO-14 W5: why the numbers can be trusted: three statements and two ways to check them. The counts come from
// on.trustFacts(): { offices, examples (null when the build carries no test summary), leftOut: [names] }.
function trustCard(root, on) {
const facts = on.trustFacts();
const sec = card(root, 'trust-card', 'trust-title', COPY.trust.title);
const list = sec.appendChild(make('ul', { id: 'trust-list', class: 'trust-list' }));
list.appendChild(make('li', { id: 'trust-offices', 'data-count': String(facts.offices) }, COPY.trust.rates(facts.offices)));
if (facts.examples !== null) list.appendChild(make('li', { id: 'trust-examples', 'data-count': String(facts.examples) }, COPY.trust.examples(facts.examples)));
list.appendChild(make('li', { id: 'trust-left-out', 'data-count': String(facts.leftOut.length) },
facts.leftOut.length ? COPY.trust.leftOut(facts.leftOut.join(', ')) : COPY.trust.leftOutNone));
const actions = sec.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'trust-rates', type: 'button' }, COPY.trust.seeRates)).addEventListener('click', on.toRates);
actions.appendChild(make('button', { id: 'trust-math', type: 'button' }, COPY.trust.showMath)).addEventListener('click', on.showMath);
}
// The closing line under the cards (W5: the trust card above it carries the way to the rates).
function closing(root, on) {
trustCard(root, on);
root.appendChild(make('p', { id: 'screen1-diff', class: 'caption overview-closing' }, COPY.overviewClosing));
}
// WO-14 W1: where the hero's figures come from: the tax year's entries, counted, with the way to them.
function entryCount(workspace, taxYear) {
return workspace.transactions.filter((t) => t.date.startsWith(`${taxYear}-`)).length;
}
function sourceLine(head, workspace, taxYear, on) {
const p = head.appendChild(make('p', { id: 'screen1-source', class: 'caption hero-source' }));
p.appendChild(make('button', { id: 'screen1-source-link', type: 'button', class: 'link-button' }, COPY.heroSource(COPY.fmtCount(entryCount(workspace, taxYear)))))
.addEventListener('click', on.toLedger);
}
// ---- stat tiles ----
// A tile is a link to its tab: a caption label, a 28 px value, a caption line.
function tile(row, id, hash, label) {
const a = row.appendChild(make('a', { id, class: 'card stat-tile', href: hash }));
a.appendChild(make('span', { class: 'stat-label' }, label));
const value = a.appendChild(make('span', { id: `${id}-value`, class: 'stat-value' }));
const caption = a.appendChild(make('span', { id: `${id}-caption`, class: 'caption' }));
return { a, value, caption };
}
// ---- where the tax goes ----
function officeName(o) {
if (o.districtId === null) return COPY.officeNames[o.key];
const custom = o.kind === 'custom';
const name = shortDistrictName({ districtId: o.districtId, name: o.name, kind: o.kind, custom });
return custom ? `${name} (${COPY.notInTable})` : name;
}
const TONE = { filed: 'ok', paymentsMissed: 'warn', paymentsShort: 'warn', neverFiled: 'danger', notDue: 'neutral' };
function officeTable(sec, offices, local, on) {
const wrap = sec.appendChild(make('div', { class: 'table-wrap' }));
const t = wrap.appendChild(make('table', { id: 'screen1-offices', class: 'two-line', 'aria-labelledby': 'screen1-offices-title' }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
const cols = COPY.officeColumns;
for (const [label, num] of [[cols.office], [cols.kind], [cols.amount, true], [cols.status]]) head.appendChild(make('th', { scope: 'col', class: num ? 'num' : '' }, label));
// W4: the column of chevrons that open each row.
head.appendChild(make('th', { scope: 'col', class: 'math-col' })).appendChild(make('span', { class: 'sr-only' }, COPY.math.column));
const body = t.appendChild(make('tbody'));
// Federal and Kentucky first, then the local offices, largest first.
const ordered = offices.filter((o) => o.districtId === null).concat(
offices.filter((o) => o.districtId !== null).sort((a, b) => b.owedCents - a.owedCents || (a.key < b.key ? -1 : 1)));
for (const o of ordered) {
const tr = body.appendChild(make('tr', { class: `office-row office-${o.status}`, 'data-office': o.key, 'data-status': o.status }));
tr.appendChild(make('th', { scope: 'row', class: 'office-name' }, officeName(o)));
tr.appendChild(make('td', { class: 'office-kind' }, COPY.officeKinds[o.kind]));
tr.appendChild(make('td', { class: 'num office-owed' }, formatCents(o.owedCents)));
const chip = o.status === 'paymentsMissed' ? COPY.officePaymentsMissed(o.missedCount)
: o.status === 'paymentsShort' ? COPY.officePaymentsShort(o.shortCount) : COPY.officeStatus[o.status];
tr.appendChild(make('td', { class: 'office-status' })).appendChild(make('span', { class: `pill pill-${TONE[o.status] || 'neutral'} office-chip chip-${o.status}` }, chip));
// W4: a local office opens to its arithmetic and source; the IRS and Kentucky to one sentence.
on.math(tr, 'offices', { key: o.key, name: officeName(o), line: o.districtId === null ? null : local.find((l) => l.districtId === o.districtId) || null, colspan: 5 });
}
}
// ---- unfiled returns ----
// The total a year from each point, month by month, at card width, with its two ends named.
function timeline(parent, curve, dueIso) {
const W = 920;
const H = 96;
const TOP = 20;
const values = curve.map((p) => p.exposureCents);
const lo = Math.min(...values);
const hi = Math.max(...values);
const x = (k) => 8 + k * ((W - 16) / 12);
const y = (v) => (hi === lo ? (H + TOP) / 2 : H - 8 - (v - lo) / (hi - lo) * (H - TOP - 12));
const wrap = parent.appendChild(make('div', { class: 'sparkline-wrap' }));
const s = wrap.appendChild(svg('svg', { id: 'screen1-sparkline', class: 'sparkline', viewBox: `0 0 ${W} ${H}`, role: 'img',
'aria-label': COPY.sparkLabel(formatCents(values[0]), formatCents(values[12])) }));
s.appendChild(svg('title', {}, COPY.sparkTitle));
s.appendChild(svg('polyline', { class: 'sparkline-line', points: values.map((v, k) => `${x(k).toFixed(1)},${y(v).toFixed(1)}`).join(' '),
'data-points': String(values.length) }));
// The first point after this year's returns fall due: the jump, marked; its date is named in the caption.
const due = curve.findIndex((p) => p.dateIso > dueIso);
if (due > 0) {
const tick = s.appendChild(svg('line', { class: 'sparkline-tick', x1: x(due).toFixed(1), x2: x(due).toFixed(1), y1: String(H - 2), y2: String(TOP - 8) }));
tick.appendChild(svg('title', {}, COPY.sparkDueTick));
wrap.appendChild(make('span', { class: 'sr-only', id: 'screen1-due-tick' }, COPY.sparkDueTick));
}
s.appendChild(svg('circle', { class: 'sparkline-dot', cx: x(12).toFixed(1), cy: y(values[12]).toFixed(1), r: '3' }));
const labels = wrap.appendChild(make('div', { class: 'sparkline-labels', 'aria-hidden': 'true' }));
// The ends are named, not priced: the last point lumps two of the rows above (WO-12 J9 keeps them apart).
labels.appendChild(make('span', { id: 'screen1-spark-start' }, COPY.sparkToday));
labels.appendChild(make('span', { id: 'screen1-spark-end' }, COPY.sparkPlus12));
if (due > 0) {
// The caption, with the date in an element of its own.
const date = formatDate(dueIso);
const [before, after] = COPY.sparkJump(date).split(date);
const caption = wrap.appendChild(make('p', { id: 'screen1-jump', class: 'caption sparkline-caption' }, before));
caption.appendChild(make('span', { id: 'screen1-jump-label' }, date));
caption.appendChild(document.createTextNode(after));
}
srTable(wrap, 'screen1-spark-data', [COPY.sparkColumns.date, COPY.sparkColumns.total], curve.map((p) => [formatDate(p.dateIso), formatCents(p.exposureCents)]));
}
// ---- where the job is changes the tax ----
// One bar per distinct district set: counties in order of first appearance; within a county the set with no city
// first, then city sets. A city set is named by its city; a no-city set is "{county} outside city" when the county also
// has a city set here, otherwise just the county.
function countyName(row) {
if (row.custom) return row.name;
if (row.kind === 'merged') {
const slug = row.districtId.replace(/^ky-/, '').split('-')[0];
return slug.charAt(0).toUpperCase() + slug.slice(1);
}
return row.name.replace(/ County$/, '');
}
function marginalBars(workspace, rows, c) {
const taxYear = workspace.settings.taxYear;
const all = rowsForTaxYear(rows.concat(workspace.customRates.map(fallbackRow)), taxYear);
const byId = (id) => all.find((r) => r.districtId === id) || null;
const rates = marginalRates(workspace, taxYear, rows, c);
const sets = [];
for (const r of rates) {
const key = r.districtIds.join('|');
if (sets.some((s) => s.key === key)) continue;
const districtRows = r.districtIds.map(byId).filter(Boolean);
const county = districtRows.find((x) => x.kind === 'county' || x.kind === 'merged' || x.custom) || null;
const city = districtRows.find((x) => x.kind === 'city') || null;
sets.push({ key, countyKey: county ? county.districtId : key, countyName: county ? countyName(county) : r.name, city, r });
}
const countyOrder = [];
for (const s of sets) if (!countyOrder.includes(s.countyKey)) countyOrder.push(s.countyKey);
const out = [];
for (const ck of countyOrder) {
const mine = sets.filter((s) => s.countyKey === ck);
const hasCity = mine.some((s) => s.city);
for (const s of mine.filter((x) => !x.city).concat(mine.filter((x) => x.city))) {
const name = s.city ? (s.city.custom ? s.city.name : s.city.name.replace(/^City of /, ''))
: hasCity ? COPY.barOutsideCity(s.countyName) : s.countyName;
out.push(Object.assign({}, s.r, { name }));
}
}
return out;
}
const SEGMENTS = [['se', 'seCents'], ['federal', 'federalCents'], ['ky', 'kyCents'], ['local', 'localCents']];
// Every tax on the next step of receipts in ONE place, drawn against the whole step so what is kept shows. WO-13 V3:
// drawn at the top of the What if panel "Next $1,000". WO-15 X2: the panel hands in its amount and the row its stats
// show (one marginalRates computation for both); with none, $1,000 at the first place of marginalBars.
function contextChart(parent, workspace, rows, c, stepCents = 100000, row = null) {
const bar = row || marginalBars(workspace, rows, c)[0];
if (!bar) return;
const step = stepCents % 100 === 0 ? formatDollars(stepCents) : formatCents(stepCents);
parent.appendChild(make('h4', { id: 'screen2-context-title' }, COPY.contextTitle(step, bar.name)));
const W = 360;
const H = 44;
const s = parent.appendChild(svg('svg', { id: 'screen2-context', class: 'bar-chart context-chart', viewBox: `0 0 ${W} ${H}`, role: 'img',
'aria-label': COPY.contextChartLabel(step, bar.name) }));
s.appendChild(svg('title', {}, COPY.contextTitle(step, bar.name)));
s.appendChild(svg('rect', { x: '0.5', y: '6.5', width: String(W - 1), height: '31', class: 'seg-kept' }));
let x = 0;
for (const [seg, field] of SEGMENTS) {
const w = bar[field] / stepCents * W;
const rect = s.appendChild(svg('rect', { x: x.toFixed(2), y: '6', width: w.toFixed(2), height: '32', class: `seg seg-${seg}` }));
rect.appendChild(svg('title', {}, COPY.barSegmentTitle(COPY.barSegments[seg], formatCents(bar[field]))));
x += w;
}
const key = parent.appendChild(make('ul', { id: 'screen2-key', class: 'chart-key chart-key-amounts' }));
for (const [seg, field] of SEGMENTS) {
const li = key.appendChild(make('li'));
li.appendChild(make('span', { class: `swatch swatch-${seg}`, 'aria-hidden': 'true' }));
li.appendChild(make('span', { class: 'key-name' }, COPY.barSegments[seg]));
li.appendChild(make('span', { class: 'key-amount num' }, formatCents(bar[field])));
}
parent.appendChild(make('p', { id: 'screen2-context-label', class: 'context-label' }, COPY.barLabel(`${bar.ratePct.toFixed(2)}%`, formatCents(bar.keptCents))));
srTable(parent, 'screen2-context-data', [COPY.contextColumns.tax, COPY.contextColumns.amount],
SEGMENTS.map(([seg, field]) => [COPY.barSegments[seg], formatCents(bar[field])]));
}
// The local tax alone, one bar per district set, highest first, each labelled in dollars. The bars are plain boxes in a
// grid, so they fill the card at any width; together they are one image, with the numbers in a hidden table.
function localBars(parent, bars, stepCents) {
const step = formatDollars(stepCents);
parent.appendChild(make('p', { id: 'screen2-local-title', class: 'caption' }, COPY.localTitleNext(step)));
const sorted = bars.slice().sort((a, b) => b.localCents - a.localCents);
const max = Math.max(1, ...sorted.map((b) => b.localCents));
const chart = parent.appendChild(make('div', { id: 'screen2-local', class: 'hbars', role: 'img', 'aria-label': COPY.localChartLabel(step) }));
for (const b of sorted) {
const row = chart.appendChild(make('div', { class: 'bar', 'data-name': b.name, 'data-local-cents': String(b.localCents) }));
row.appendChild(make('span', { class: 'bar-name' }, b.name));
const fill = row.appendChild(make('span', { class: 'bar-track' })).appendChild(make('span', { class: 'bar-fill', title: COPY.barSegmentTitle(COPY.barSegments.local, formatCents(b.localCents)) }));
fill.style.width = `${(b.localCents / max * 100).toFixed(2)}%`;
row.appendChild(make('span', { class: 'bar-label bar-dollars' }, formatCents(b.localCents)));
}
srTable(parent, 'screen2-local-data', [COPY.localColumns.place, COPY.localColumns.local], sorted.map((b) => [b.name, formatCents(b.localCents)]));
if (sorted.length > 1) {
const hi = sorted[0].localCents;
const lo = sorted[sorted.length - 1].localCents;
parent.appendChild(make('p', { id: 'screen2-spread', class: 'tour-answer' }, lo === 0 ? COPY.localSpreadZero(formatCents(hi)) : COPY.localSpread(hi / lo)));
}
}
function placesCard(root, workspace, rows, c, lastMonth, on) {
if (workspace.locations.length === 0) return;
const sec = card(root, 'screen-2', 'screen2-heading', COPY.placesCardTitle);
let r;
try {
localBars(sec, marginalBars(workspace, rows, c), 100000);
r = combined(workspace, workspace.settings.taxYear, rows, c);
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
sec.appendChild(make('p', {}, COPY.taxUnsupported));
return;
}
sec.appendChild(make('p', { id: 'screen2-annual', class: 'caption' }, COPY.screen2Annual(COPY.fmtDollars0(r.localTotalCents), lastMonth)));
sec.appendChild(make('p', { id: 'screen2-note', class: 'caption' }, COPY.q1ApportionmentNote));
const actions = sec.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'overview-price', type: 'button', class: 'link-button' }, COPY.placesCardLink)).addEventListener('click', () => on.toWhatIf('q2'));
}
// ---- the tab ----
// The example's set-aside caption names its typical job (J2: the ledger's most common price, $165 on the demo). Your own
// data is shown per $100 invoiced.
const PER_INVOICED_CENTS = 10000;
// on = { toLedger(), toRates(), toWhatIf(key), quick(), withQ5(onReady, onUnsupported), addJob(amountText, locationId),
// changedCard(parent), math(tr, table, { key, name, line, colspan }), trustFacts(), showMath() }
function renderOverview(root, workspace, rows, c, todayIso, on) {
root.textContent = '';
const taxYear = workspace.settings.taxYear;
const demo = isDemoWorkspace(workspace);
root.appendChild(make('h2', { id: 'overview-title', class: 'sr-only' }, COPY.tabs.overview));
quickBanner(root, workspace, on);
let o = null;
try {
o = taxOffices(workspace, taxYear, rows, c, todayIso);
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
}
const hero = root.appendChild(make('section', { id: 'screen-1', class: 'card hero-card', 'aria-labelledby': 'overview-title' }));
const head = hero.appendChild(make('div', { id: 'screen1-headline', class: 'hero-block', tabindex: '-1' }));
const hasYear = workspace.transactions.some((t) => t.date.startsWith(`${taxYear}-`));
if (!o || !hasYear) {
head.appendChild(make('p', { id: 'screen1-empty', class: 'hero-sub' }, !o ? COPY.taxUnsupported : COPY.yoursHeadlineEmpty));
emptyActions(hero, workspace, on);
closing(root, on);
return;
}
// J1: the budgeting answer first. Gross is everything the year brought in; kept is net profit less every tax.
const sc = o.combined.scheduleC;
const grossCents = sc.grossReceiptsCents + sc.otherIncomeCents;
const keptCents = sc.netProfitCents - o.totalCents;
const parts = everyHundred(grossCents, sc.totalExpensesCents, o.totalCents);
// J9, V4: how far into the year the ledger runs. Before the year's last day the totals are year to date; a month is
// one of the months elapsed (10 for a ledger that ends Oct 31, 10 + 16/30 for one that ends Nov 16), and the period
// is named "October" or "Nov 16".
const period = ledgerPeriod(workspace, taxYear);
const months = period ? period.monthsElapsed : 12;
const lastMonth = period && period.monthsElapsed < 12 ? COPY.throughLabel(period.month, period.day, period.monthEnd) : null;
if (parts) {
head.appendChild(make('p', { id: 'screen1-caption', class: 'caption' }, COPY.heroCaption(lastMonth)));
head.appendChild(make('p', { id: 'screen1-hero', class: 'hero-number' }, COPY.fmtDollars0(keptCents)));
head.appendChild(make('p', { id: 'screen1-sub', class: 'hero-sub' }, COPY.heroSub(COPY.fmtDollars0(grossCents), COPY.fmtDollars0(Math.round(keptCents / months)))));
sourceLine(head, workspace, taxYear, on);
hundredBar(hero, parts, demo);
} else {
head.appendChild(make('p', { id: 'screen1-none', class: 'hero-sub' }, COPY.yoursHeroNone(COPY.fmtDollars0(grossCents), lastMonth)));
sourceLine(head, workspace, taxYear, on);
}
tryItRow(hero, workspace, demo, on);
// W2: what the entry just added changed, directly under the hero.
on.changedCard(root);
// Three tiles, each a link to its tab.
const row = root.appendChild(make('div', { id: 'overview-stats', class: 'stat-row' }));
const taxTile = tile(row, 'stat-tax', '#taxes', COPY.statTax(lastMonth));
taxTile.value.textContent = COPY.fmtDollars0(o.totalCents);
// J9: with months still to come, the whole year's bill at this pace (filled in once the set-aside run is in).
taxTile.caption.id = 'screen1-pace';
taxTile.caption.hidden = true;
const setAside = tile(row, 'screen1-setaside', '#plan', COPY.statSetAside);
setAside.a.setAttribute('aria-live', 'polite');
setAside.value.textContent = COPY.computing;
const jarTile = tile(row, 'stat-jar', '#plan', COPY.statJar);
jarTile.value.textContent = COPY.computing;
// Where the tax goes.
const offices = card(root, 'overview-offices', 'screen1-offices-title', COPY.officesCardTitle);
officeTable(offices, o.offices, o.combined.local, on);
const owed = demo ? COPY.screen1Owed : COPY.yoursOwed;
offices.appendChild(make('p', { id: 'screen1-owed', class: 'caption' }, owed(COPY.fmtDollars0(o.totalCents), o.offices.length, o.unfiledCount)));
// J3: what has already gone to the offices this year.
const paidCents = workspace.taxPayments.filter((p) => p.taxYear === taxYear).reduce((a, p) => a + p.amountCents, 0);
if (paidCents > 0) offices.appendChild(make('p', { id: 'screen1-paid', class: 'caption' }, COPY.screen1Paid(COPY.fmtDollars0(paidCents))));
// J4: what is unfiled or missed, each line only when its amount is more than zero, then how much of it is penalty
// and interest. J9: like for like: the same returns a year from now; this year's, late by then, on their own line.
const back = o.backFiling;
const av = avoidableCost(workspace, taxYear, rows, c, todayIso);
const never = o.offices.filter((x) => x.status === 'neverFiled');
const neverCents = never.reduce((a, x) => a + x.owedCents, 0);
const lines = [];
if (neverCents > 0) lines.push(['never', (demo ? COPY.unfiledRows.never : COPY.unfiledRows.neverYours)(never.length, lastMonth), neverCents]);
if (av.catchUpCents > 0) {
lines.push(['catchup', demo ? COPY.unfiledRows.catchUp : COPY.unfiledRows.catchUpYours, av.catchUpCents]);
lines.push(['later', COPY.unfiledRows.later, av.earlierInAYearCents]);
if (av.thisYearLateCents > 0) lines.push(['thisyear', COPY.unfiledRows.thisYear, av.thisYearLateCents]);
}
if (av.skipCostCents > 0) lines.push(['skip', demo ? COPY.unfiledRows.skip : COPY.unfiledRows.skipYours, av.skipCostCents]);
if (lines.length) {
const unfiled = card(root, 'screen1-hidden', 'screen1-hidden-title', neverCents > 0 || av.catchUpCents > 0 ? COPY.unfiledTitle : COPY.missedTitle, 'card-danger');
const dl = unfiled.appendChild(make('dl', { id: 'screen1-hidden-lines', class: 'totals' }));
for (const [key, label, cents] of lines) {
dl.appendChild(make('dt', {}, label));
dl.appendChild(make('dd', { id: `screen1-hidden-${key}`, class: 'num' }, COPY.fmtDollars0(cents)));
}
if (av.totalPenaltyCents > 0) {
unfiled.appendChild(make('p', { id: 'screen1-hidden-total', class: 'hidden-total' }, COPY.unfiledTotal(COPY.fmtDollars0(av.totalPenaltyCents))));
}
if (back.lines.length) timeline(unfiled, back.curve, `${taxYear + 1}-04-15`);
const actions = unfiled.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'overview-unfiled-detail', type: 'button', class: 'link-button' }, COPY.unfiledDetail)).addEventListener('click', () => on.toWhatIf('q6'));
}
if (!back.lines.length) offices.appendChild(make('p', { id: 'screen1-catchup', class: 'caption' }, COPY.catchUpNone));
placesCard(root, workspace, rows, c, lastMonth, on);
closing(root, on);
// The set-aside tile and the jar tile arrive once the shared run is in. With no earlier month to resample (a quick
// estimate, a first month) the share is the plain one: the year's total over the year's receipts. Whole percents
// and whole dollars are printed; amounts are computed from the unrounded share.
const amount = (cents, share) => COPY.fmtDollars0(Math.round(cents * share));
const fillJar = (share) => {
let jar = null;
try {
jar = share === null ? null : taxJar(workspace, taxYear, rows, c, share, todayIso);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
}
jarTile.a.hidden = jar === null;
if (jar === null) return;
const state = jar.gapCents > 0 ? 'short' : jar.gapCents < 0 ? 'ahead' : 'even';
jarTile.value.textContent = COPY.statJarValue[state](COPY.fmtDollars0(Math.abs(jar.gapCents)));
jarTile.value.className = `stat-value stat-${state}`;
jarTile.caption.textContent = COPY.statJarCaption(COPY.fmtDollars0(jar.coveredCents), COPY.fmtDollars0(jar.shouldHaveCents));
};
on.withQ5((v) => {
if (!setAside.a.isConnected) return;
if (v.setAsideShare !== null && lastMonth !== null) {
taxTile.caption.textContent = COPY.screen1Pace(COPY.fmtDollars0(v.p50TotalCents));
taxTile.caption.setAttribute('data-cents', String(v.p50TotalCents));
taxTile.caption.hidden = false;
}
const share = v.setAsideShare === null ? o.combined.setAsideShareOfGross : v.setAsideShare;
setAside.a.hidden = share === null;
fillJar(share);
if (share === null) return;
setAside.value.textContent = COPY.fmtPct0(share);
const typical = demo && v.setAsideShare !== null ? typicalJobCents(workspace, taxYear) : null;
setAside.caption.textContent = typical !== null
? COPY.statSetAsideTypical(amount(typical, share), COPY.fmtDollars0(typical))
: COPY.statSetAsidePer(amount(PER_INVOICED_CENTS, share), COPY.fmtDollars0(PER_INVOICED_CENTS));
}, () => {
if (!setAside.a.isConnected) return;
setAside.a.hidden = true;
jarTile.a.hidden = true;
});
}
return { isDemoWorkspace, resetTryRow, exampleJobDate, entryCount, marginalBars, contextChart, renderOverview };
})();
// ---- ui-packet ----
const ui_packet = (() => {
const { scheduleC, salesByLocation } = book;
const { combined, returnLines, quarterlyCalendar } = tax;
const { safeHarbor } = quant;
const { RATE_TABLE_FROZEN_ON } = jurisdictions;
const { COPY, formatDate, formatValue } = copy;
// ui-packet.js — layer 4, imported only by ui.js. The printable CPA packet: eight sections, each on its own printed
// page, computed from the ledger and the rate table and never stored.
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) node.setAttribute(k, attrs[k]);
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function percent(x, digits) {
return `${(x * 100).toFixed(digits)}%`;
}
function section(root, key) {
const sec = root.appendChild(make('section', { class: 'packet-section', id: `packet-${key}`, 'aria-labelledby': `packet-${key}-title` }));
sec.appendChild(make('h2', { id: `packet-${key}-title`, class: 'packet-heading' }, COPY.packetSections[key]));
return sec;
}
// columns: [[key, label, numeric]]; rows: arrays of strings in column order.
function table(parent, id, columns, rows) {
const t = parent.appendChild(make('table', { id, class: 'packet-table' }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const [, label, numeric] of columns) head.appendChild(make('th', { scope: 'col', class: numeric ? 'num' : '' }, label));
const body = t.appendChild(make('tbody'));
for (const r of rows) {
const tr = body.appendChild(make('tr'));
r.forEach((cell, i) => tr.appendChild(make('td', { class: columns[i][2] ? 'num' : '' }, cell)));
}
return t;
}
function pairs(parent, id, entries) {
const dl = parent.appendChild(make('dl', { id, class: 'totals' }));
for (const [label, value, attrs] of entries) {
dl.appendChild(make('dt', {}, label));
dl.appendChild(make('dd', Object.assign({ class: 'num' }, attrs || {}), value));
}
return dl;
}
function rowFor(rows, workspace, districtId) {
const custom = workspace.customRates.find((r) => r.districtId === districtId);
return custom ? null : rows.find((r) => r.districtId === districtId) || null;
}
function districtName(line) {
return line.custom ? `${line.name} (${COPY.notInTable})` : line.name;
}
function cover(root, workspace, rows, todayIso) {
const sec = section(root, 'cover');
const s = workspace.settings;
const resident = s.residentCountyId ? (rows.find((r) => r.districtId === s.residentCountyId) || { name: s.residentCountyId }).name
: COPY.packetResidentNone;
// J6: the product's name and mark head the cover.
const brand = sec.appendChild(make('p', { id: 'packet-brand', class: 'packet-brand' }));
const NS = 'http://www.w3.org/2000/svg';
const mark = brand.appendChild(document.createElementNS(NS, 'svg'));
mark.setAttribute('class', 'brand-mark');
mark.setAttribute('viewBox', COPY.brandMark.viewBox);
mark.setAttribute('aria-hidden', 'true');
mark.setAttribute('focusable', 'false');
for (const [cls, d] of [['mark-first', COPY.brandMark.first], ['mark-second', COPY.brandMark.second]]) {
const path = mark.appendChild(document.createElementNS(NS, 'path'));
path.setAttribute('class', cls);
path.setAttribute('d', d);
}
brand.appendChild(make('span', { id: 'packet-product', class: 'packet-product' }, COPY.productName));
brand.appendChild(make('span', { class: 'packet-product-sub' }, COPY.productSubtitle));
// J3: the workspace's own name (schema 2), or the untitled label while it has none.
pairs(sec, 'packet-cover-facts', [
[COPY.packetCover.name, workspace.name || COPY.packetUntitled, { id: 'packet-name' }],
[COPY.packetCover.taxYear, String(s.taxYear)],
[COPY.packetCover.filingStatus, COPY.filingStatus[s.filingStatus] || s.filingStatus],
[COPY.packetCover.asOf, formatDate(todayIso), { id: 'packet-as-of' }],
[COPY.packetCover.resident, resident],
[COPY.packetCover.frozenOn, formatDate(RATE_TABLE_FROZEN_ON)]
]);
sec.appendChild(make('p', { class: 'packet-disclaimer', 'data-disclaimer': '' }, COPY.footer));
sec.appendChild(make('p', { id: 'packet-purpose' }, COPY.packetPurpose));
}
function summary(root, r) {
const sec = section(root, 'summary');
const entries = [[COPY.taxNetProfit, formatCents(r.scheduleC.netProfitCents)]];
for (const l of r.local) entries.push([districtName(l), formatCents(l.liabilityCents)]);
entries.push([COPY.taxLocalTotal, formatCents(r.localTotalCents)], [COPY.taxSe, formatCents(r.se.totalCents)],
[COPY.taxFederal, formatCents(r.federal.taxCents)], [COPY.taxKy, formatCents(r.ky.taxCents)],
[COPY.taxCombined, formatCents(r.totalCents), { id: 'packet-combined' }],
[COPY.taxShareOfGross, r.setAsideShareOfGross === null ? COPY.taxShareNone : percent(r.setAsideShareOfGross, 2)],
[COPY.taxShareOfNet, r.setAsideShareOfNet === null ? COPY.taxShareNone : percent(r.setAsideShareOfNet, 2)]);
pairs(sec, 'packet-summary-list', entries);
}
function scheduleCSection(root, workspace, taxYear) {
const sec = section(root, 'scheduleC');
const sc = scheduleC(workspace, taxYear);
const label = (line) => `${line} ${COPY.scheduleCLabels[line]}`;
const entries = [[label('1'), formatCents(sc.grossReceiptsCents)], [label('6'), formatCents(sc.otherIncomeCents)]];
for (const line of Object.keys(sc.expensesByLine)) entries.push([label(line), formatCents(sc.expensesByLine[line])]);
entries.push([COPY.packetTotalExpensesLine, formatCents(sc.totalExpensesCents)], [COPY.packetNetProfitLine, formatCents(sc.netProfitCents)]);
pairs(sec, 'packet-schedule-c', entries);
}
function apportionment(root, workspace, taxYear, rows, r) {
const sec = section(root, 'apportionment');
const sc = r.scheduleC;
const salesEverywhere = sc.grossReceiptsCents + sc.otherIncomeCents;
const sales = salesByLocation(workspace, taxYear);
const methods = {};
const data = r.local.map((l) => {
const salesIn = workspace.locations.filter((loc) => loc.districtIds.includes(l.districtId))
.reduce((a, loc) => a + (sales[loc.id] || 0), 0);
const row = rowFor(rows, workspace, l.districtId);
const method = row ? row.apportionment : 'krs67753';
methods[method] = true;
return [districtName(l), formatCents(salesIn), formatCents(salesEverywhere), percent(l.factor, 4),
COPY.apportionmentMethods[method] || method];
});
const cols = COPY.packetApportionColumns;
if (data.length === 0) sec.appendChild(make('p', {}, COPY.packetNoDistricts));
else table(sec, 'packet-apportionment-table', [['d', cols.district], ['i', cols.salesIn, true], ['e', cols.salesEverywhere, true],
['f', cols.factor, true], ['m', cols.method]], data);
if (methods.threeFactor) sec.appendChild(make('p', { class: 'hint' }, COPY.assumptionPropertyFactor));
}
function lineValue(line) {
if (line.kind === 'factor') return percent(line.value, 4);
if (line.kind === 'pct') return line.value === null ? '' : `${line.value}%`;
return formatCents(line.value);
}
function lineLabel(line, rows) {
if (!line.key.startsWith('portion:')) return COPY.returnLine[line.key];
const cityId = line.key.slice('portion:'.length);
if (cityId === 'outside') return COPY.returnLinePortionOutside(line.ratePct);
const city = rows.find((x) => x.districtId === cityId);
return COPY.returnLinePortion(city ? city.name : cityId, line.ratePct);
}
function districts(root, workspace, rows, r) {
const sec = section(root, 'districts');
sec.appendChild(make('p', { class: 'hint' }, COPY.returnWorksheetNote));
if (r.local.length === 0) sec.appendChild(make('p', {}, COPY.packetNoDistricts));
for (const l of r.local) {
const w = returnLines(l);
const row = rowFor(rows, workspace, l.districtId);
const block = sec.appendChild(make('div', { class: 'packet-worksheet', 'data-district-id': w.districtId }));
block.appendChild(make('h3', {}, districtName(l)));
block.appendChild(make('p', { class: 'hint' }, w.formId ? COPY.packetForm(w.formId) : COPY.packetFormNone));
block.appendChild(make('p', { class: 'hint packet-source' }, row && row.sourceUrl ? COPY.packetSource(row.sourceUrl) : COPY.packetSourceNone));
const dl = block.appendChild(make('dl', { class: 'totals' }));
for (const line of w.lines) {
dl.appendChild(make('dt', {}, lineLabel(line, rows)));
const value = line.key.startsWith('portion:') ? `${formatCents(line.value)} → ${formatCents(line.computedCents)}` : lineValue(line);
dl.appendChild(make('dd', { class: 'num', 'data-line': line.key }, value));
}
}
}
function dueDates(root, workspace, taxYear, rows, c) {
const sec = section(root, 'dueDates');
let cal;
try {
cal = quarterlyCalendar(taxYear, c);
} catch (e) {
if (!(e && /^missingConstant:/.test(e.message))) throw e;
sec.appendChild(make('p', { id: 'packet-calendar-unavailable' }, COPY.calendarUnavailable(taxYear)));
return;
}
// Q3: the safe-harbor amounts print beside each date (none when the filing status is not computed).
let sh = null;
try {
sh = safeHarbor(workspace, taxYear, rows, c);
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
}
const cols = COPY.packetDueColumns;
const amounts = COPY.packetDueAmountsColumns;
const amount = (s, i) => (sh ? formatCents(sh[s].installments[i].amountCents) : '');
table(sec, 'packet-due-dates', [['n', cols.installment], ['f', cols.federal], ['fa', amounts.fedAmount, true], ['k', cols.ky],
['ka', amounts.kyAmount, true]], cal.federal.map((d, i) => [String(i + 1), formatDate(d), amount('federal', i), formatDate(cal.ky[i]), amount('ky', i)]));
if (sh) {
sec.appendChild(make('p', {}, `${COPY.q3FederalTitle}: ${COPY.q3Required(COPY.q3Basis[sh.federal.basis], formatCents(sh.federal.requiredAnnualCents))}`));
sec.appendChild(make('p', {}, `${COPY.q3KyTitle}: ${COPY.q3Required(COPY.q3Basis[sh.ky.basis], formatCents(sh.ky.requiredAnnualCents))}`));
}
}
function ledger(root, workspace, taxYear) {
const sec = section(root, 'ledger');
const txns = workspace.transactions.filter((t) => t.date.startsWith(`${taxYear}-`)).slice()
.sort((a, b) => (a.date < b.date ? -1 : a.date > b.date ? 1 : a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
if (txns.length === 0) {
sec.appendChild(make('p', {}, COPY.packetLedgerEmpty(taxYear)));
return;
}
const names = {};
for (const loc of workspace.locations) names[loc.id] = loc.name;
const cols = COPY.packetLedgerColumns;
table(sec, 'packet-ledger-table', [['d', cols.date], ['s', cols.description], ['l', cols.location], ['c', cols.line],
['a', cols.amount, true]], txns.map((t) => [formatDate(t.date), t.description, t.locationId ? names[t.locationId] || t.locationId : '',
`${t.scheduleCLine} ${COPY.scheduleCLabels[t.scheduleCLine] || ''}`.trim(), formatCents(t.amountCents)]));
}
function assumptions(root, c) {
const sec = section(root, 'assumptions');
const list = sec.appendChild(make('ul', { id: 'packet-assumptions' }));
for (const key of Object.keys(COPY).filter((k) => /^assumption[A-Z]/.test(k) && typeof COPY[k] === 'string')) {
list.appendChild(make('li', {}, COPY[key]));
}
sec.appendChild(make('h3', {}, COPY.packetConstantsTitle));
const cols = COPY.packetConstantColumns;
table(sec, 'packet-constants', [['k', cols.key], ['v', cols.value], ['s', cols.source]],
Object.keys(c).map((k) => [k, formatValue(c[k].value), c[k].sourceUrl]));
}
// The sections sit in a one-cell table whose footer row repeats on every printed page, holding the space the fixed
// disclaimer footer covers, so no line prints underneath it. On screen the frame displays as plain blocks.
function frame(root) {
const t = root.appendChild(make('table', { class: 'packet-frame', role: 'presentation' }));
t.appendChild(make('tfoot')).appendChild(make('tr')).appendChild(make('td')).appendChild(make('div', { class: 'packet-footer-space' }));
return t.appendChild(make('tbody')).appendChild(make('tr')).appendChild(make('td'));
}
function renderPacket(container, workspace, rows, c, todayIso) {
container.textContent = '';
const root = frame(container);
const taxYear = workspace.settings.taxYear;
const allRows = rows;
cover(root, workspace, allRows, todayIso);
let r = null;
try {
r = combined(workspace, taxYear, allRows, c);
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
}
if (r) {
summary(root, r);
scheduleCSection(root, workspace, taxYear);
apportionment(root, workspace, taxYear, allRows, r);
districts(root, workspace, allRows, r);
} else {
for (const key of ['summary', 'scheduleC', 'apportionment', 'districts']) section(root, key).appendChild(make('p', {}, COPY.taxUnsupported));
}
dueDates(root, workspace, taxYear, allRows, c);
ledger(root, workspace, taxYear);
assumptions(root, c);
}
return { renderPacket };
})();
// ---- ui-quant ----
const ui_quant = (() => {
const { reduce } = book;
const { marginalRates, quoteToNet, bootstrapSetAside, safeHarbor, backFilingExposure, annualizedInstallments, taxJar, planNextYear } = quant;
const { COPY, formatDate, shortDistrictName } = copy;
// ui-quant.js — layer 4, imported only by ui.js. The What if section: computed panels over quant.js, never stored
// (except the settings the panels expose, written through the settings reducer).
let built = false;
const el = {};
const state = { stepCents: 100000, quoteCents: 16500, from: null, to: null, savingsPct: 0, tab: 'q1', plan: false };
// U6: the What if panels are tabs, in this order; only the open tab computes.
const TABS = ['q1', 'q2', 'q5', 'q3', 'q6', 'q4'];
const RENDER = {};
let current = null;
let ctx = null;
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
// '$1,000' or '1000.50' -> cents, or null.
function parseDollars(text) {
const t = String(text || '').trim().replace(/^\$/, '').replace(/,/g, '');
if (!/^\d+(\.\d{1,2})?$/.test(t)) return null;
const [whole, frac] = t.split('.');
return Number(whole) * 100 + Number((frac || '').padEnd(2, '0') || 0);
}
function field(id, label, control) {
const wrap = make('div', { class: 'field' });
wrap.appendChild(make('label', { for: id }, label));
wrap.appendChild(control);
return wrap;
}
function table(parent, id, columns) {
const wrap = parent.appendChild(make('div', { class: 'table-wrap' }));
const t = wrap.appendChild(make('table', { id }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const [label, numeric] of columns) head.appendChild(make('th', { scope: 'col', class: numeric ? 'num' : '' }, label));
return t.appendChild(make('tbody'));
}
function customIds(workspace) {
return new Set(workspace.customRates.map((r) => r.districtId));
}
// Runs fn(); when the filing status is not computed, shows the unsupported line in the panel instead.
function guarded(panel, fn) {
try {
fn();
panel.unsupported.hidden = true;
panel.body.hidden = false;
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
panel.unsupported.hidden = false;
panel.body.hidden = true;
}
}
// WO-13 V6: a panel's result as a row of stats (a caption label above a 28 px value). ids: <prefix>-<key>.
function statRow(parent, id, items, prefix) {
const dl = parent.appendChild(make('dl', { id, class: 'stat-row' }));
const out = {};
for (const [key, label] of items) {
const box = dl.appendChild(make('div', { class: 'stat' }));
box.appendChild(make('dt', {}, label));
out[key] = box.appendChild(make('dd', { id: `${prefix || id}-${key}` }));
}
return out;
}
// J5: under the plain title, one grey line gives the term tax people use for it.
function panel(root, id, title) {
const sec = root.appendChild(make('section', { id, class: 'quant-panel', 'aria-labelledby': `${id}-title` }));
const key = id.replace(/-panel$/, '');
const h = sec.appendChild(make('h4', { id: `${id}-title` }, title));
if (key === 'q3') h.setAttribute('data-tip', 'estimated');
sec.appendChild(make('p', { id: `${key}-official`, class: 'hint official-term' }, COPY.whatIfOfficial[key]));
const unsupported = sec.appendChild(make('p', { class: 'inline-warning', hidden: true }, COPY.taxUnsupported));
const empty = sec.appendChild(make('p', { class: 'hint', hidden: true }, COPY.quantNoLocations));
const body = sec.appendChild(make('div', { class: 'quant-body' }));
return { sec, unsupported, empty, body };
}
// ---- Q1: next $1,000 ----
function buildQ1(root) {
const p = panel(root, 'q1-panel', COPY.q1Title);
const step = make('input', { id: 'q1-step', type: 'text', inputmode: 'decimal', autocomplete: 'off', value: '1,000' });
p.body.appendChild(field('q1-step', COPY.q1StepLabel, step));
p.error = p.body.appendChild(make('p', { id: 'q1-step-error', class: 'inline-error', role: 'alert', hidden: true }, COPY.q1StepInvalid));
p.stats = statRow(p.body, 'q1-stats', [['kept', COPY.whatIfStats.q1Kept], ['tax', COPY.whatIfStats.q1Tax], ['rate', COPY.whatIfStats.q1Rate]]);
p.statsNote = p.body.appendChild(make('p', { id: 'q1-stats-note', class: 'caption' }));
// WO-13 V3: every tax on the next $1,000 in the first place on the list (the chart that sat on tour screen 2).
p.context = p.body.appendChild(make('div', { id: 'q1-context', class: 'q1-context' }));
const cols = COPY.q1Columns;
p.tbody = table(p.body, 'q1-table', [[cols.location], [cols.se, true], [cols.federal, true], [cols.ky, true], [cols.local, true],
[cols.total, true], [cols.kept, true], [cols.rate, true]]);
p.body.appendChild(make('p', { id: 'q1-note', class: 'hint' }, COPY.q1ApportionmentNote));
step.addEventListener('input', () => {
const cents = parseDollars(step.value);
const ok = cents !== null && cents >= 10000 && cents <= 1000000;
p.error.hidden = ok;
if (ok) {
state.stepCents = cents;
renderQ1();
}
});
el.q1 = p;
}
function renderQ1() {
const p = el.q1;
const w = current;
p.empty.hidden = w.locations.length > 0;
if (w.locations.length === 0) {
p.body.hidden = true;
return;
}
guarded(p, () => {
const rows = marginalRates(w, w.settings.taxYear, ctx.rows, ctx.c, state.stepCents);
const custom = customIds(w);
// The first place on the list, as three stats; X2: the bar and its key under them are the same row at the same amount.
const one = rows[0];
p.context.textContent = '';
if (ctx.tools && ctx.tools.context) ctx.tools.context(p.context, state.stepCents, one);
p.stats.kept.textContent = formatCents(one.keptCents);
p.stats.tax.textContent = formatCents(one.seCents + one.federalCents + one.kyCents + one.localCents);
p.stats.rate.textContent = `${one.ratePct.toFixed(2)}%`;
// V8: a sentence gives whole dollars; an amount typed with cents is shown as typed.
p.statsNote.textContent = COPY.whatIfStats.q1Note(state.stepCents % 100 === 0 ? COPY.fmtDollars0(state.stepCents) : formatCents(state.stepCents), one.name);
p.tbody.textContent = '';
for (const r of rows) {
const tr = p.tbody.appendChild(make('tr', { 'data-location-id': r.locationId }));
const flagged = r.districtIds.some((id) => custom.has(id));
tr.appendChild(make('td', {}, flagged ? `${r.name} (${COPY.notInTable})` : r.name));
for (const v of [r.seCents, r.federalCents, r.kyCents, r.localCents]) tr.appendChild(make('td', { class: 'num' }, formatCents(v)));
tr.appendChild(make('td', { class: 'num q1-total' }, formatCents(r.totalCents)));
tr.appendChild(make('td', { class: 'num q1-kept' }, formatCents(r.keptCents)));
tr.appendChild(make('td', { class: 'num q1-rate' }, `${r.ratePct.toFixed(2)}%`));
}
});
}
// ---- Q2: quote adjuster ----
function selectOf(id) {
return make('select', { id });
}
function fillLocations(select, locations, value) {
select.textContent = '';
for (const loc of locations) select.appendChild(make('option', { value: loc.id }, loc.name));
select.value = value;
}
function buildQ2(root) {
const p = panel(root, 'q2-panel', COPY.q2Title);
p.from = selectOf('q2-from');
p.quote = make('input', { id: 'q2-quote', type: 'text', inputmode: 'decimal', autocomplete: 'off', value: '165' });
p.to = selectOf('q2-to');
p.body.appendChild(field('q2-from', COPY.q2FromLabel, p.from));
p.body.appendChild(field('q2-quote', COPY.q2QuoteLabel, p.quote));
p.body.appendChild(field('q2-to', COPY.q2ToLabel, p.to));
p.error = p.body.appendChild(make('p', { id: 'q2-quote-error', class: 'inline-error', role: 'alert', hidden: true }, COPY.q2QuoteInvalid));
p.stats = statRow(p.body, 'q2-stats', [['quote', COPY.whatIfStats.q2Quote], ['net', COPY.whatIfStats.q2Net], ['equivalent', COPY.whatIfStats.q2Equivalent]]);
p.result = p.body.appendChild(make('p', { id: 'q2-result', 'aria-live': 'polite' }));
p.lower = p.body.appendChild(make('p', { id: 'q2-lower', class: 'hint', hidden: true }));
p.from.addEventListener('change', () => {
state.from = p.from.value;
renderQ2();
});
p.to.addEventListener('change', () => {
state.to = p.to.value;
renderQ2();
});
p.quote.addEventListener('input', () => {
const cents = parseDollars(p.quote.value);
p.error.hidden = cents !== null;
if (cents !== null) {
state.quoteCents = cents;
renderQ2();
}
});
el.q2 = p;
}
function renderQ2() {
const p = el.q2;
const w = current;
const locs = w.locations;
p.empty.hidden = locs.length > 0;
if (locs.length === 0) {
p.body.hidden = true;
return;
}
const ids = locs.map((l) => l.id);
// Defaults: the first and the fourth location when there are four or more (Lexington -> Georgetown on case 1).
if (!ids.includes(state.from)) state.from = ids[0];
if (!ids.includes(state.to)) state.to = ids.length >= 4 ? ids[3] : ids[ids.length - 1];
fillLocations(p.from, locs, state.from);
fillLocations(p.to, locs, state.to);
guarded(p, () => {
const r = quoteToNet(w, w.settings.taxYear, ctx.rows, ctx.c, state.from, state.to, state.quoteCents);
const nameOf = (id) => locs.find((l) => l.id === id).name;
p.result.textContent = r.equivalentQuoteCents === null ? COPY.q2None(nameOf(state.to))
: COPY.q2Result(formatCents(r.quoteCents), nameOf(state.from), formatCents(r.netCents), nameOf(state.to),
formatCents(r.equivalentQuoteCents));
p.result.setAttribute('data-equivalent-cents', r.equivalentQuoteCents === null ? '' : String(r.equivalentQuoteCents));
p.stats.quote.textContent = formatCents(r.quoteCents);
p.stats.net.textContent = formatCents(r.netCents);
p.stats.equivalent.textContent = r.equivalentQuoteCents === null ? COPY.rateNone : formatCents(r.equivalentQuoteCents);
const lower = r.equivalentQuoteCents !== null && r.equivalentQuoteCents < r.quoteCents;
p.lower.hidden = !lower;
p.lower.textContent = lower ? COPY.q2Lower(nameOf(state.from), nameOf(state.to)) : '';
});
}
// ---- Q5: seeded bootstrap set-aside ----
const CONFIDENCES = [0.5, 0.75, 0.9, 0.95, 0.99];
const pct = (x, digits) => `${(x * 100).toFixed(digits)}%`;
let q5Memo = { key: null, value: null };
let planMemo = { key: null, value: null };
function buildQ5(root) {
const p = panel(root, 'q5-panel', COPY.q5Title);
p.confidence = make('select', { id: 'q5-confidence' });
for (const v of CONFIDENCES) p.confidence.appendChild(make('option', { value: String(v) }, pct(v, 0)));
p.body.appendChild(field('q5-confidence', COPY.q5ConfidenceLabel, p.confidence));
p.plan = p.body.appendChild(make('button', { id: 'q5-plan', type: 'button', 'aria-pressed': 'false' }, COPY.planToggle));
p.plan.addEventListener('click', () => {
state.plan = !state.plan;
renderQ5();
});
p.noHistory = p.body.appendChild(make('p', { id: 'q5-no-history', class: 'hint', hidden: true }, COPY.q5NoHistory));
p.result = p.body.appendChild(make('p', { id: 'q5-result', 'aria-live': 'polite' }));
Object.assign(p, statRow(p.body, 'q5-stats', ['p10', 'p50', 'p90'].map((k) => [k, COPY.q5Totals[k]]), 'q5'));
p.history = p.body.appendChild(make('p', { id: 'q5-history', class: 'hint' }));
// J7: the same panel for next year, every month resampled, with the chart.
p.fallback = p.body.appendChild(make('p', { id: 'q5-plan-fallback', class: 'hint', hidden: true }));
p.chart = p.body.appendChild(make('div', { id: 'q5-plan-chart' }));
// The confidence is a saved setting: it goes through the settings reducer, which marks the workspace dirty.
p.confidence.addEventListener('change', () => {
ctx.commit(reduce(current, { type: 'settings/set', key: 'setAsideConfidence', value: Number(p.confidence.value) }));
});
el.q5 = p;
}
function renderQ5() {
const p = el.q5;
const w = current;
const s = w.settings;
p.empty.hidden = w.locations.length > 0;
if (w.locations.length === 0) {
p.body.hidden = true;
return;
}
const options = [...p.confidence.options].map((o) => o.value);
if (!options.includes(String(s.setAsideConfidence))) p.confidence.appendChild(make('option', { value: String(s.setAsideConfidence) }, pct(s.setAsideConfidence, 0)));
p.confidence.value = String(s.setAsideConfidence);
guarded(p, () => {
// Same workspace object and settings -> same result (the computation is seeded), so a re-render reuses it.
const key = [s.taxYear, w.seed, s.bootstrapDraws, s.setAsideConfidence, ctx.rows.length].join('|');
if (q5Memo.workspace !== w || q5Memo.key !== key) {
q5Memo = { workspace: w, key, value: bootstrapSetAside(w, s.taxYear, ctx.rows, ctx.c, w.seed,
{ draws: s.bootstrapDraws, confidence: s.setAsideConfidence }) };
}
p.plan.setAttribute('aria-pressed', String(state.plan));
p.plan.textContent = state.plan ? COPY.planBack : COPY.planToggle;
p.chart.textContent = '';
p.fallback.hidden = true;
const labels = state.plan ? COPY.planTotals(s.taxYear + 1) : COPY.q5Totals;
for (const k of ['p10', 'p50', 'p90']) p[k].previousElementSibling.textContent = labels[k];
if (state.plan) {
if (planMemo.workspace !== w || planMemo.key !== key) {
planMemo = { workspace: w, key, value: planNextYear(w, s.taxYear, ctx.rows, ctx.c, w.seed, { draws: s.bootstrapDraws, confidence: s.setAsideConfidence }) };
}
const v = planMemo.value;
const empty = v.setAsideShare === null;
p.noHistory.hidden = !empty;
p.noHistory.textContent = COPY.planNoHistory;
p.result.hidden = empty;
p.result.textContent = empty ? '' : COPY.planResult(v.taxYear, pct(v.setAsideShare, 2), pct(v.confidence, 0), v.draws);
p.result.setAttribute('data-share', empty ? '' : String(v.setAsideShare));
for (const k of ['p10', 'p50', 'p90']) p[k].textContent = empty ? '' : formatCents(v[`${k}TotalCents`]);
p.history.textContent = empty ? '' : COPY.planBasis(v.taxYear, v.historyMonths);
if (!empty) {
p.fallback.hidden = !v.usesEarlierFigures;
p.fallback.textContent = v.usesEarlierFigures ? COPY.planFallback(v.figuresYear, v.taxYear) : '';
if (ctx.tools && ctx.tools.proof) ctx.tools.proof(p.chart, v, null, 'q5');
}
return;
}
p.noHistory.textContent = COPY.q5NoHistory;
const r = q5Memo.value;
const none = r.setAsideShare === null;
p.noHistory.hidden = !none;
p.result.hidden = none;
p.history.textContent = r.asOfMonth === 12 ? COPY.q5FullYear : COPY.q5History(r.historyMonths, r.asOfMonth);
p.result.textContent = none ? '' : COPY.q5Result(pct(r.setAsideShare, 2), pct(r.confidence, 0), r.draws);
p.result.setAttribute('data-share', none ? '' : String(r.setAsideShare));
for (const k of ['p10', 'p50', 'p90']) p[k].textContent = none ? '' : formatCents(r[`${k}TotalCents`]);
});
}
// ---- Q3: safe-harbor schedule ----
function buildQ3(root) {
const p = panel(root, 'q3-panel', COPY.q3Title);
p.savings = make('input', { id: 'q3-savings', type: 'text', inputmode: 'decimal', autocomplete: 'off', value: '0' });
p.body.appendChild(field('q3-savings', COPY.q3SavingsLabel, p.savings));
p.savingsError = p.body.appendChild(make('p', { id: 'q3-savings-error', class: 'inline-error', role: 'alert', hidden: true }, COPY.q3SavingsInvalid));
// J3: the comparison is said once, above the tables, not in every row.
p.stats = statRow(p.body, 'q3-stats', [['federal', COPY.whatIfStats.q3Federal], ['ky', COPY.whatIfStats.q3Ky]]);
p.body.appendChild(make('p', { id: 'q3-compare-lead' }, COPY.q3CompareLead));
p.holdLead = p.body.appendChild(make('p', { id: 'q3-hold-lead', class: 'hint', hidden: true }));
const cols = COPY.q3Columns;
for (const [key, title] of [['federal', COPY.q3FederalTitle], ['ky', COPY.q3KyTitle]]) {
p.body.appendChild(make('h4', {}, title));
p[`${key}Basis`] = p.body.appendChild(make('p', { id: `q3-${key}-basis` }));
p[`${key}Body`] = table(p.body, `q3-${key}`, [[cols.due], [cols.amount, true], [cols.skipCost, true], [cols.days, true], [cols.hold, true], [cols.status]]);
}
p.noPrior = p.body.appendChild(make('p', { id: 'q3-no-prior-note', class: 'hint', hidden: true }, COPY.noPriorLiabilityNote));
p.carried = p.body.appendChild(make('p', { id: 'q3-carried', class: 'hint', hidden: true }, COPY.rateCarriedForward));
p.body.appendChild(make('p', { class: 'hint' }, COPY.kyPriorYearNote));
p.body.appendChild(make('p', { class: 'hint' }, COPY.localEstimatesNote));
p.savings.addEventListener('input', () => {
const t = p.savings.value.trim().replace(/%$/, '');
const ok = /^\d+(\.\d+)?$/.test(t) && Number(t) <= 20;
p.savingsError.hidden = ok;
if (ok) {
state.savingsPct = Number(t);
renderQ3();
}
});
el.q3 = p;
}
function renderQ3() {
const p = el.q3;
const w = current;
p.empty.hidden = w.locations.length > 0;
if (w.locations.length === 0) {
p.body.hidden = true;
return;
}
guarded(p, () => {
let r;
try {
r = safeHarbor(w, w.settings.taxYear, ctx.rows, ctx.c);
} catch (e) {
if (!(e && /^missingConstant:/.test(e.message))) throw e;
p.federalBasis.textContent = COPY.calendarUnavailable(w.settings.taxYear);
p.kyBasis.textContent = '';
p.stats.federal.textContent = COPY.rateNone;
p.stats.ky.textContent = COPY.rateNone;
p.federalBody.textContent = '';
p.kyBody.textContent = '';
return;
}
p.stats.federal.textContent = formatCents(r.federal.installments[0].amountCents);
p.stats.ky.textContent = formatCents(r.ky.installments[0].amountCents);
const rate = (state.savingsPct || 0) / 100;
p.holdLead.hidden = !(rate > 0);
p.holdLead.textContent = rate > 0 ? COPY.q3HoldLead(`${state.savingsPct}%`) : '';
// J3: a due date that has passed says so, with what the tax jar's payments did for it.
const past = taxJar(w, w.settings.taxYear, ctx.rows, ctx.c, 0, ctx.todayIso).pastDue;
let carried = false;
for (const key of ['federal', 'ky']) {
const s = r[key];
p[`${key}Basis`].textContent = COPY.q3Required(COPY.q3Basis[s.basis], formatCents(s.requiredAnnualCents));
p[`${key}Basis`].setAttribute('data-basis', s.basis);
const body = p[`${key}Body`];
body.textContent = '';
for (const i of s.installments) {
carried = carried || i.carried;
const tr = body.appendChild(make('tr', { 'data-due': i.dueIso }));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(i.dueIso)));
tr.appendChild(make('td', { class: 'num q3-amount' }, formatCents(i.amountCents)));
tr.appendChild(make('td', { class: 'num q3-skip' }, formatCents(i.skipCostCents)));
tr.appendChild(make('td', { class: 'num' }, String(i.skipDays)));
const earned = Math.round(i.amountCents * rate * i.skipDays / 365);
tr.appendChild(make('td', { class: 'num q3-hold' }, rate > 0 && i.amountCents > 0 ? formatCents(earned) : COPY.rateNone));
const was = past.find((x) => x.office === key && x.dueIso === i.dueIso);
const status = !was ? 'due' : was.shortCents === 0 ? 'paid' : was.paidCents === 0 ? 'missed' : 'short';
tr.setAttribute('data-status', status);
tr.appendChild(make('td', { class: 'q3-status' }, status === 'due' ? COPY.q3Due : COPY.q3Passed(COPY.q3PassedStatus[status])));
}
}
p.noPrior.hidden = r.federal.basis !== 'noPriorLiability';
p.carried.hidden = !carried;
});
}
// ---- Q6: back-filing exposure ----
function buildQ6(root) {
const p = panel(root, 'q6-panel', COPY.q6Title);
p.asOf = p.body.appendChild(make('p', { id: 'q6-as-of', class: 'hint' }));
p.none = p.body.appendChild(make('p', { id: 'q6-none', hidden: true }, COPY.q6None));
const cols = COPY.q6Columns;
p.tbody = table(p.body, 'q6-table', [[cols.district], [cols.year], [cols.status], [cols.tax, true], [cols.months, true],
[cols.penalty, true], [cols.interest, true], [cols.total, true], [cols.action]]);
Object.assign(p, statRow(p.body, 'q6-stats', ['late', 'accrued', 'exposure'].map((k) => [k, COPY.q6Totals[k]]), 'q6'));
p.result = p.body.appendChild(make('p', { id: 'q6-result', 'aria-live': 'polite' }));
p.body.appendChild(make('h4', {}, COPY.q6CurveTitle));
p.curve = table(p.body, 'q6-curve', [[COPY.q6CurveColumns.date], [COPY.q6CurveColumns.exposure, true]]);
p.body.appendChild(make('p', { class: 'hint' }, COPY.assumptionDueDate));
p.tbody.addEventListener('click', (e) => {
const button = e.target.closest('button[data-district-id]');
if (!button) return;
ctx.commit(reduce(current, { type: 'filing/set', districtId: button.getAttribute('data-district-id'),
taxYear: Number(button.getAttribute('data-tax-year')), status: 'filed' }));
p.result.focus();
});
p.result.setAttribute('tabindex', '-1');
el.q6 = p;
}
function renderQ6() {
const p = el.q6;
const w = current;
p.empty.hidden = w.locations.length > 0;
if (w.locations.length === 0) {
p.body.hidden = true;
return;
}
guarded(p, () => {
const r = backFilingExposure(w, w.settings.taxYear, ctx.rows, ctx.c, ctx.todayIso);
p.asOf.textContent = COPY.q6AsOf(formatDate(r.asOfIso));
p.none.hidden = r.lines.length > 0;
p.tbody.textContent = '';
for (const l of r.lines) {
const tr = p.tbody.appendChild(make('tr', { 'data-district-id': l.districtId, 'data-tax-year': String(l.taxYear) }));
const custom = w.customRates.some((x) => x.districtId === l.districtId);
const row = ctx.rows.find((x) => x.districtId === l.districtId);
tr.appendChild(make('td', {}, custom ? `${l.name} (${COPY.notInTable})` : row ? shortDistrictName(row) : l.name));
tr.appendChild(make('td', {}, String(l.taxYear)));
tr.appendChild(make('td', {}, COPY.q6Status[l.status]));
tr.appendChild(make('td', { class: 'num' }, formatCents(l.taxCents)));
tr.appendChild(make('td', { class: 'num' }, String(l.monthsLate)));
const late = l.status === 'late';
tr.appendChild(make('td', { class: 'num' }, late && !l.penaltyKnown ? `${formatCents(l.penaltyCents)} (${COPY.q6RateUnknown})` : formatCents(l.penaltyCents)));
tr.appendChild(make('td', { class: 'num' }, late && !l.interestKnown ? `${formatCents(l.interestCents)} (${COPY.q6RateUnknown})` : formatCents(l.interestCents)));
tr.appendChild(make('td', { class: 'num q6-line-total' }, formatCents(l.totalCents)));
const actions = tr.appendChild(make('td', { class: 'nowrap' }));
actions.appendChild(make('button', { type: 'button', 'data-district-id': l.districtId, 'data-tax-year': String(l.taxYear),
class: 'mark-filed', 'aria-label': COPY.q6MarkFiledLabel(custom || !row ? l.name : shortDistrictName(row), l.taxYear) }, COPY.q6MarkFiled));
}
p.late.textContent = formatCents(r.lateTotalCents);
p.accrued.textContent = formatCents(r.accruedCents);
p.exposure.textContent = formatCents(r.exposureCents);
p.result.textContent = COPY.q6Result(formatCents(r.exposureCents), formatCents(r.perMonthCents));
p.curve.textContent = '';
for (const pt of r.curve) {
const tr = p.curve.appendChild(make('tr'));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(pt.dateIso)));
tr.appendChild(make('td', { class: 'num' }, formatCents(pt.exposureCents)));
}
});
}
// ---- Q4: annualized-income installments ----
function buildQ4(root) {
const p = panel(root, 'q4-panel', COPY.q4Title);
p.body.appendChild(make('p', { class: 'hint' }, COPY.q4Explain));
const cols = COPY.q4Columns;
p.stats = statRow(p.body, 'q4-stats', [['regular', COPY.whatIfStats.q4Regular], ['required', COPY.whatIfStats.q4Required]]);
for (const [key, title] of [['federal', COPY.q3FederalTitle], ['ky', COPY.q3KyTitle]]) {
p.body.appendChild(make('h4', {}, title));
p[`${key}None`] = p.body.appendChild(make('p', { id: `q4-${key}-none`, class: 'hint', hidden: true }, COPY.q4NoneDue));
p[`${key}Body`] = table(p.body, `q4-${key}`, [[cols.due], [cols.regular, true], [cols.required, true], [cols.deferred, true], [cols.status]]);
}
p.body.appendChild(make('p', { class: 'hint' }, COPY.assumptionAiWageBase));
el.q4 = p;
}
function renderQ4() {
const p = el.q4;
const w = current;
p.empty.hidden = w.locations.length > 0;
if (w.locations.length === 0) {
p.body.hidden = true;
return;
}
guarded(p, () => {
let r;
let harbor;
try {
r = annualizedInstallments(w, w.settings.taxYear, ctx.rows, ctx.c);
harbor = safeHarbor(w, w.settings.taxYear, ctx.rows, ctx.c);
} catch (e) {
if (!(e && /^missingConstant:/.test(e.message))) throw e;
p.federalBody.textContent = '';
p.kyBody.textContent = '';
return;
}
const first = r.federal.periods[0];
p.stats.regular.textContent = formatCents(harbor.federal.installments[0].amountCents);
p.stats.required.textContent = first && (first.available || r.federal.requiredAnnualCents === 0) ? formatCents(first.requiredInstallmentCents) : COPY.rateNone;
for (const key of ['federal', 'ky']) {
const s = r[key];
const none = s.requiredAnnualCents === 0;
p[`${key}None`].hidden = !none;
const body = p[`${key}Body`];
body.textContent = '';
s.periods.forEach((period, i) => {
const tr = body.appendChild(make('tr', { 'data-period': String(i + 1) }));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(period.dueIso)));
tr.appendChild(make('td', { class: 'num q4-regular' }, formatCents(harbor[key].installments[i].amountCents)));
const pending = !period.available && !none;
tr.appendChild(make('td', { class: 'num q4-required' }, pending ? '' : formatCents(period.requiredInstallmentCents)));
tr.appendChild(make('td', { class: 'num q4-deferred' }, pending ? '' : formatCents(s.deferredByDueCents[i])));
tr.appendChild(make('td', {}, pending ? COPY.q4Pending : COPY.q4Available));
});
}
});
}
function selectTab(key) {
state.tab = key;
for (const k of TABS) {
const tab = document.getElementById(`whatif-tab-${k}`);
tab.setAttribute('aria-selected', String(k === key));
tab.setAttribute('tabindex', k === key ? '0' : '-1');
el[k].sec.hidden = k !== key;
}
RENDER[key]();
}
function build(root) {
root.textContent = '';
root.appendChild(make('h3', { id: 'quant-title', tabindex: '-1' }, COPY.whatIfTitle));
root.appendChild(make('p', { class: 'hint' }, COPY.whatIfIntro));
const list = root.appendChild(make('div', { id: 'whatif-tabs', class: 'tab-list', role: 'tablist', 'aria-label': COPY.whatIfTitle }));
for (const k of TABS) {
const tab = list.appendChild(make('button', { id: `whatif-tab-${k}`, type: 'button', role: 'tab', 'aria-controls': `${k}-panel` }, COPY.whatIfTabs[k]));
tab.addEventListener('click', () => selectTab(k));
}
// Arrow keys move between tabs (the open tab is the one in the Tab order).
list.addEventListener('keydown', (e) => {
if (e.key !== 'ArrowRight' && e.key !== 'ArrowLeft') return;
const i = TABS.indexOf(state.tab);
const next = TABS[(i + (e.key === 'ArrowRight' ? 1 : TABS.length - 1)) % TABS.length];
selectTab(next);
document.getElementById(`whatif-tab-${next}`).focus();
e.preventDefault();
});
buildQ1(root);
buildQ2(root);
buildQ5(root);
buildQ3(root);
buildQ6(root);
buildQ4(root);
for (const k of TABS) {
el[k].sec.setAttribute('role', 'tabpanel');
el[k].sec.setAttribute('aria-labelledby', `whatif-tab-${k}`);
}
Object.assign(RENDER, { q1: renderQ1, q2: renderQ2, q5: renderQ5, q3: renderQ3, q6: renderQ6, q4: renderQ4 });
built = true;
}
// tools (J7, V3): { proof(parent, result, coveredCents, idPrefix), context(parent, stepCents, row) }, charts handed in by ui.js.
function renderQuant(root, workspace, rows, c, commit, todayIso, tools) {
current = workspace;
ctx = { rows, c, commit, todayIso, tools };
if (!built || !root.contains(el.q1.sec)) build(root);
selectTab(state.tab);
}
return { renderQuant };
})();
// ---- ui-quick ----
const ui_quick = (() => {
const { parseMoney, rebalanceShares, sharesWithPlaceAdded, sharesWithPlaceRemoved, quickEstimateWorkspace, QUICK_ESTIMATE_MAX_PLACES } = book;
const { RATE_ROWS, RATE_TABLE_META, candidatesForZip, buildDistrictIds, isMergedCounty, isSupplementalCountyRow } = jurisdictions;
const { COPY, shortDistrictName } = copy;
// ui-quick.js — layer 4, imported only by ui.js. WO-10 D3: the sixty-second Quick estimate card an empty workspace
// opens on. Five answers (income, expenses, up to five places by ZIP with a share of the work each, home county, and
// since WO-12 J9 whether local returns have ever been filed, with last year's income when it differed) become
// a workspace through book.quickEstimateWorkspace: ordinary locations and ledger entries, nothing new in the save file.
const MAX_AMOUNT_CENTS = 100000000000;
const OTHER_COUNTY = 'other';
let built = false;
let current = null;
let handlers = null;
let today = null;
// One entry per place: zip as typed, the chosen county (when the ZIP spans more than one), the city answer
// (undefined = not answered, '' = outside city limits, or a city districtId) and its whole-percent share.
let places = [];
// J9: the fifth answer ('all' | 'some' | 'none' | 'unsure', or null) and, for 'some', the offices ticked.
let filed = null;
let filedIds = new Set();
const el = {};
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
const rowOf = (districtId) => RATE_ROWS.find((r) => r.districtId === districtId) || null;
const nameOf = (districtId) => {
const row = rowOf(districtId);
return row ? shortDistrictName(row) : districtId;
};
function countyRows() {
const seen = new Set();
return RATE_ROWS.filter((r) => (r.kind === 'county' || r.kind === 'merged') && !isSupplementalCountyRow(r) && !seen.has(r.districtId) && seen.add(r.districtId));
}
// What a place's ZIP narrows to: { state: 'empty' | 'partial' | 'outside' | 'ok', counties, county, cities, merged }.
function resolve(place) {
const zip = place.zip.trim();
if (zip === '') return { state: 'empty' };
if (!/^\d{5}$/.test(zip)) return { state: 'partial' };
const candidates = candidatesForZip(zip);
if (!candidates || candidates.counties.length === 0) return { state: 'outside' };
const county = candidates.counties.includes(place.county) ? place.county : candidates.counties[0];
const merged = isMergedCounty(RATE_ROWS, county);
const cities = merged ? [] : candidates.cities.filter((id) => RATE_ROWS.some((r) => r.districtId === id && r.parentCountyId === county));
return { state: 'ok', counties: candidates.counties, county, cities, merged };
}
// -- messages under their own control (the D1 pattern) --
function clearError(controlId) {
const note = document.getElementById(`${controlId}-error`);
if (note) note.remove();
const control = document.getElementById(controlId);
if (control) {
control.removeAttribute('aria-invalid');
control.removeAttribute('aria-describedby');
}
}
function clearErrors() {
for (const note of Array.from(el.form.querySelectorAll('.field-error'))) clearError(note.id.replace(/-error$/, ''));
}
function showErrors(errors) {
errors.forEach(([controlId, text], i) => {
const control = document.getElementById(controlId);
if (!control) return;
const note = make('p', { id: `${controlId}-error`, class: 'field-error', role: 'alert' }, text);
const place = control.closest('.quick-place');
if (place) place.appendChild(note);
else if (control.getAttribute('role') === 'radiogroup') control.appendChild(note);
else (control.closest('.field') || control).after(note);
control.setAttribute('aria-invalid', 'true');
control.setAttribute('aria-describedby', note.id);
if (i === 0) (control.getAttribute('role') === 'radiogroup' ? control.querySelector('input') : control).focus();
});
}
// -- the fifth answer --
// Every local office the places resolve to so far, in order of first appearance.
function resolvedDistrictIds() {
const out = [];
for (const p of places) {
const r = resolve(p);
if (r.state !== 'ok' || p.city === undefined) continue;
for (const id of buildDistrictIds(RATE_ROWS, current.settings.taxYear, r.county, p.city || null)) if (!out.includes(id)) out.push(id);
}
return out;
}
// "Only with some": a box per office, once the ZIP codes have resolved.
function renderFiledWhich() {
if (!el.filedWhich) return;
el.filedWhich.textContent = '';
el.filedWhich.hidden = filed !== 'some';
if (filed !== 'some') return;
const ids = resolvedDistrictIds();
for (const id of Array.from(filedIds)) if (!ids.includes(id)) filedIds.delete(id);
if (ids.length === 0) {
el.filedWhich.appendChild(make('p', { id: 'quick-filed-which-none', class: 'hint' }, COPY.quickFiledWhichNone));
return;
}
el.filedWhich.appendChild(make('p', { id: 'quick-filed-which-label', class: 'hint' }, COPY.quickFiledWhich));
for (const id of ids) {
const label = el.filedWhich.appendChild(make('label', { class: 'radio' }));
const box = label.appendChild(make('input', { type: 'checkbox', id: `quick-filed-${id}`, value: id }));
box.checked = filedIds.has(id);
box.addEventListener('change', () => {
if (box.checked) filedIds.add(id);
else filedIds.delete(id);
});
label.appendChild(document.createTextNode(` ${nameOf(id)}`));
}
}
// -- the places --
function shareText(i) {
return COPY.quickShareValue(places[i].share);
}
function syncShares() {
places.forEach((p, i) => {
const slider = document.getElementById(`quick-share-${i + 1}`);
if (!slider) return;
slider.value = String(p.share);
slider.setAttribute('aria-valuetext', shareText(i));
document.getElementById(`quick-share-value-${i + 1}`).textContent = shareText(i);
});
}
function setShares(shares) {
shares.forEach((s, i) => { places[i].share = s; });
syncShares();
}
// The part of a place's row that follows its ZIP: the county (a choice when the ZIP spans several), then the
// city-limits answer, the merged-government line, or the outside-the-table message.
function renderResolved(i) {
const n = i + 1;
const box = document.getElementById(`quick-resolved-${n}`);
box.textContent = '';
const r = resolve(places[i]);
if (r.state === 'empty' || r.state === 'partial') return;
if (r.state === 'outside') {
box.appendChild(make('p', { id: `quick-outside-${n}`, class: 'inline-warning' }, COPY.quickErrors.zipOutside(RATE_TABLE_META.districtCount)));
return;
}
places[i].county = r.county;
if (r.counties.length > 1) {
const select = make('select', { id: `quick-county-${n}`, 'aria-label': COPY.quickCounty(n) });
for (const id of r.counties) select.appendChild(make('option', { value: id }, nameOf(id)));
select.value = r.county;
select.addEventListener('change', () => {
places[i].county = select.value;
places[i].city = undefined;
renderResolved(i);
renderFiledWhich();
});
box.appendChild(select);
} else {
box.appendChild(make('span', { id: `quick-county-${n}`, class: 'quick-county', 'data-value': r.county }, nameOf(r.county)));
}
if (r.merged) {
places[i].city = '';
box.appendChild(make('span', { id: `quick-merged-${n}`, class: 'hint' }, COPY.quickMerged));
return;
}
if (r.cities.length === 0) {
places[i].city = '';
return;
}
if (places[i].city !== undefined && places[i].city !== '' && !r.cities.includes(places[i].city)) places[i].city = undefined;
const select = make('select', { id: `quick-city-${n}`, 'aria-label': COPY.quickCity(n) });
select.appendChild(make('option', { value: 'unset' }, COPY.quickCityChoose));
for (const id of r.cities) select.appendChild(make('option', { value: id }, COPY.quickCityInside(nameOf(id).replace(/^City of /, ''))));
select.appendChild(make('option', { value: '' }, COPY.quickCityOutside));
select.value = places[i].city === undefined ? 'unset' : places[i].city;
select.addEventListener('change', () => {
places[i].city = select.value === 'unset' ? undefined : select.value;
clearError(`quick-city-${n}`);
renderFiledWhich();
});
box.appendChild(select);
}
function renderPlaces() {
el.places.textContent = '';
places.forEach((p, i) => {
const n = i + 1;
const row = el.places.appendChild(make('li', { class: 'quick-place', 'data-place': String(n) }));
const line = row.appendChild(make('div', { class: 'quick-place-line' }));
const zip = line.appendChild(make('input', { id: `quick-zip-${n}`, class: 'quick-zip', type: 'text', inputmode: 'numeric', maxlength: '5',
autocomplete: 'off', placeholder: COPY.quickZipPlaceholder, 'aria-label': COPY.quickZip(n) }));
zip.value = p.zip;
zip.addEventListener('input', () => {
places[i].zip = zip.value;
places[i].city = undefined;
clearError(`quick-zip-${n}`);
clearError(`quick-city-${n}`);
renderResolved(i);
renderFiledWhich();
});
line.appendChild(make('span', { id: `quick-resolved-${n}`, class: 'quick-resolved' }));
const share = row.appendChild(make('div', { class: 'quick-share' }));
const slider = share.appendChild(make('input', { id: `quick-share-${n}`, type: 'range', min: '0', max: '100', step: '1',
'aria-label': COPY.quickShare(n) }));
slider.disabled = places.length === 1;
slider.addEventListener('input', () => {
setShares(rebalanceShares(places.map((x) => x.share), i, Number(slider.value)));
clearError('quick-places');
});
share.appendChild(make('output', { id: `quick-share-value-${n}`, class: 'quick-share-value', for: `quick-share-${n}` }));
if (places.length > 1) {
const remove = share.appendChild(make('button', { id: `quick-remove-${n}`, type: 'button', class: 'link-button', 'aria-label': COPY.quickRemovePlace(n) }, COPY.quickRemove));
remove.addEventListener('click', () => {
const shares = sharesWithPlaceRemoved(places.map((x) => x.share), i);
places.splice(i, 1);
shares.forEach((s, k) => { places[k].share = s; });
renderPlaces();
el.add.focus();
});
}
renderResolved(i);
});
syncShares();
el.add.disabled = places.length >= QUICK_ESTIMATE_MAX_PLACES;
renderFiledWhich();
}
function addPlace(focus) {
const shares = sharesWithPlaceAdded(places.map((x) => x.share));
places.push({ zip: '', county: null, city: undefined, share: 0 });
shares.forEach((s, k) => { places[k].share = s; });
renderPlaces();
if (focus) document.getElementById(`quick-zip-${places.length}`).focus();
}
// -- reading the four answers --
function readForm() {
const errors = [];
const income = parseMoney(el.income.value);
if (income === null || income <= 0 || income > MAX_AMOUNT_CENTS) errors.push(['quick-income', COPY.quickErrors.income]);
const spentText = el.expenses.value.trim();
const spent = spentText === '' ? 0 : parseMoney(spentText);
if (spent === null || spent < 0 || spent > MAX_AMOUNT_CENTS) errors.push(['quick-expenses', COPY.quickErrors.expenses]);
const taxYear = current.settings.taxYear;
const out = [];
places.forEach((p, i) => {
const n = i + 1;
const r = resolve(p);
if (r.state === 'empty' || r.state === 'partial') {
errors.push([`quick-zip-${n}`, COPY.quickErrors.zip]);
return;
}
if (r.state === 'outside') {
errors.push([`quick-zip-${n}`, COPY.quickErrors.zipOutside(RATE_TABLE_META.districtCount)]);
return;
}
if (p.city === undefined) {
errors.push([`quick-city-${n}`, COPY.quickErrors.city]);
return;
}
const city = p.city || null;
out.push({
sharePct: p.share,
location: { name: COPY.quickPlaceName(nameOf(city || r.county), p.zip.trim()), zip: p.zip.trim(),
districtIds: buildDistrictIds(RATE_ROWS, taxYear, r.county, city), insideCityLimits: Boolean(city), confirmedBy: 'user' }
});
});
if (places.some((p) => p.share <= 0) && !errors.some((e) => /^quick-(zip|city)-/.test(e[0]))) errors.push(['quick-places', COPY.quickErrors.share]);
if (el.resident.value === '') errors.push(['quick-resident', COPY.quickErrors.resident]);
if (filed === null) errors.push(['quick-filed', COPY.quickErrors.filed]);
const lastText = el.lastYear.value.trim();
const lastYear = lastText === '' ? null : parseMoney(lastText);
if (lastText !== '' && (lastYear === null || lastYear <= 0 || lastYear > MAX_AMOUNT_CENTS)) errors.push(['quick-last-year', COPY.quickErrors.lastYear]);
if (errors.length) return { errors };
return { incomeCents: income, expenseCents: spent, places: out, residentCountyId: el.resident.value === OTHER_COUNTY ? null : el.resident.value,
filed, filedDistrictIds: Array.from(filedIds), lastYearIncomeCents: lastYear };
}
function build(root) {
root.textContent = '';
root.appendChild(make('h2', { id: 'quick-title', tabindex: '-1' }, COPY.quickTitle));
root.appendChild(make('p', { id: 'quick-intro', class: 'hint' }, COPY.quickIntro));
const form = root.appendChild(make('form', { id: 'quick-form', novalidate: '' }));
el.form = form;
const steps = form.appendChild(make('ol', { class: 'quick-steps' }));
const money = (id, label) => {
const li = steps.appendChild(make('li', { class: 'quick-step' }));
const wrap = li.appendChild(make('div', { class: 'field' }));
wrap.appendChild(make('label', { for: id }, label));
const input = wrap.appendChild(make('input', { id, type: 'text', inputmode: 'decimal', autocomplete: 'off' }));
input.addEventListener('input', () => clearError(id));
return input;
};
el.income = money('quick-income', COPY.quickIncome);
el.expenses = money('quick-expenses', COPY.quickExpenses);
const where = steps.appendChild(make('li', { class: 'quick-step' }));
where.appendChild(make('span', { id: 'quick-places-label', class: 'quick-step-label' }, COPY.quickPlaces));
where.appendChild(make('p', { class: 'hint' }, COPY.quickPlacesHint));
el.places = where.appendChild(make('ol', { id: 'quick-places', class: 'quick-places', 'aria-labelledby': 'quick-places-label' }));
el.add = where.appendChild(make('button', { id: 'quick-add-place', type: 'button' }, COPY.quickAddPlace));
el.add.addEventListener('click', () => addPlace(true));
const home = steps.appendChild(make('li', { class: 'quick-step' }));
const wrap = home.appendChild(make('div', { class: 'field' }));
wrap.appendChild(make('label', { for: 'quick-resident' }, COPY.quickResident));
el.resident = wrap.appendChild(make('select', { id: 'quick-resident' }));
el.resident.appendChild(make('option', { value: '' }, COPY.quickResidentChoose));
const counties = countyRows().map((r) => [r.districtId, shortDistrictName(r)]).sort((a, b) => (a[1] < b[1] ? -1 : 1));
for (const [id, name] of counties) el.resident.appendChild(make('option', { value: id }, name));
el.resident.appendChild(make('option', { value: OTHER_COUNTY }, COPY.quickResidentOther));
el.resident.addEventListener('change', () => clearError('quick-resident'));
// J9, the fifth answer: has a local return ever been filed? Then last year's income, when it differed.
const past = steps.appendChild(make('li', { class: 'quick-step' }));
past.appendChild(make('span', { id: 'quick-filed-label', class: 'quick-step-label' }, COPY.quickFiled));
el.filed = past.appendChild(make('div', { id: 'quick-filed', role: 'radiogroup', 'aria-labelledby': 'quick-filed-label' }));
for (const key of ['all', 'some', 'none', 'unsure']) {
const label = el.filed.appendChild(make('label', { class: 'radio' }));
const radio = label.appendChild(make('input', { type: 'radio', name: 'quick-filed', id: `quick-filed-${key}`, value: key }));
label.appendChild(document.createTextNode(` ${COPY.quickFiledOptions[key]}`));
radio.addEventListener('change', () => {
filed = key;
clearError('quick-filed');
renderFiledWhich();
});
if (key === 'some') el.filedWhich = el.filed.appendChild(make('div', { id: 'quick-filed-which', class: 'quick-filed-which', hidden: true }));
}
const lastWrap = past.appendChild(make('div', { class: 'field quick-optional' }));
lastWrap.appendChild(make('label', { for: 'quick-last-year' }, COPY.quickLastYear));
el.lastYear = lastWrap.appendChild(make('input', { id: 'quick-last-year', type: 'text', inputmode: 'decimal', autocomplete: 'off' }));
el.lastYear.addEventListener('input', () => clearError('quick-last-year'));
const actions = form.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'quick-show', type: 'submit', class: 'primary' }, COPY.quickShow));
actions.appendChild(make('button', { id: 'quick-skip', type: 'button', class: 'link-button' }, COPY.quickSkip))
.addEventListener('click', () => handlers.skip());
form.addEventListener('submit', (e) => {
e.preventDefault();
clearErrors();
const answers = readForm();
if (answers.errors) {
showErrors(answers.errors);
return;
}
handlers.show(quickEstimateWorkspace(current, Object.assign(answers, { todayIso: today })));
});
built = true;
}
function reset() {
places = [];
el.income.value = '';
el.expenses.value = '';
el.resident.value = '';
filed = null;
filedIds = new Set();
for (const radio of el.filed.querySelectorAll('input[type="radio"]')) radio.checked = false;
el.lastYear.value = '';
clearErrors();
addPlace(false);
}
// on = { show(workspace), skip() }. The card belongs to one empty workspace: a new one starts it over.
function renderQuick(root, workspace, todayIso, on) {
const fresh = !built || !root.contains(el.form) || current === null ||
(current !== workspace && workspace.locations.length === 0 && workspace.transactions.length === 0 && current.seed !== workspace.seed);
handlers = on;
today = todayIso;
if (!built || !root.contains(el.form)) build(root);
current = workspace;
if (fresh) reset();
}
return { renderQuick };
})();
// ---- ui-rates ----
const ui_rates = (() => {
const { RATE_TABLE_META, rowsForTaxYear } = jurisdictions;
const { COPY, formatDate, shortDistrictName } = copy;
// ui-rates.js — layer 4, imported only by ui.js. The Rate Browser: every row in force for a tax year, with its special
// rules in words, its source link, informational fees, and the jurisdictions dropped from this version.
const YEARS = [2024, 2025, 2026, 2027];
const state = { year: null, county: '', search: '', checks: false, open: new Set() };
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
const shortCity = (name) => name.replace(/^City of /, '');
// J5: plain names everywhere in the rows; the legal name is in the detail column.
function nameOf(rows, id) {
const r = rows.find((x) => x.districtId === id);
return r ? shortDistrictName(r) : id;
}
// A row's special rules in words.
function ruleWords(row, rows) {
const out = [];
const R = COPY.rateRules;
if (row.unincorporatedOnly === true) out.push(R.outsideCities);
if (Array.isArray(row.excludedWithinCityIds) && row.excludedWithinCityIds.length) {
out.push(R.notInside(row.excludedWithinCityIds.map((id) => shortCity(nameOf(rows, id))).join(', ')));
}
if (row.rateInsideCity) for (const [id, rate] of Object.entries(row.rateInsideCity)) out.push(R.insideRate(rate, shortCity(nameOf(rows, id))));
if (row.creditAgainst) out.push(R.creditAgainst(nameOf(rows, row.creditAgainst)));
if (row.requiresUserRate === true) out.push(R.userRate);
if (row.residentsOnlyNetProfit === true) out.push(R.residentsOnly);
if (row.filingRequired === true && row.ratePct === 0) out.push(R.fileAtZero);
return out;
}
function countyOptions(rows) {
const seen = new Map();
for (const r of rows) {
if ((r.kind === 'county' || r.kind === 'merged') && !seen.has(r.parentCountyId) && r.parentCountyId === r.districtId) {
seen.set(r.parentCountyId, shortDistrictName(r));
}
}
return [...seen.entries()].sort((a, b) => (a[1] < b[1] ? -1 : 1));
}
// J6: minimum, cap and exemption share one cell, each named; none of them shows as a dash.
function limitWords(r) {
const out = [];
const L = COPY.rateLimits;
// J9: a minimum equal to the cap is one flat amount.
if (r.minimumFeeCents > 0 && r.minimumFeeCents === r.capCents) out.push(L.flat(formatCents(r.capCents)));
else {
if (r.minimumFeeCents > 0) out.push(L.minimum(formatCents(r.minimumFeeCents)));
if (r.capCents > 0) out.push(L.cap(formatCents(r.capCents)));
}
if (r.exemptionCents > 0) out.push(L.exemption(formatCents(r.exemptionCents)));
return out;
}
// J6: seven columns that fit 1280 px with the source link always on show (Place, Taxed on, Rate, Limits, Special rules,
// Source, Checked on). Everything else about a row is in its detail row, opened by the row's own Details button or
// by the box that opens them all: the legal name, the kind, the dates in force, flat fees, and how it was checked.
function renderTable(body, rows, all, showing) {
body.textContent = '';
const year = state.year;
const q = state.search.trim().toLowerCase();
const list = rowsForTaxYear(all, year).filter((r) => (!state.county || r.parentCountyId === state.county)
&& (!q || r.name.toLowerCase().includes(q) || shortDistrictName(r).toLowerCase().includes(q)))
.sort((a, b) => (shortDistrictName(a) < shortDistrictName(b) ? -1 : shortDistrictName(a) > shortDistrictName(b) ? 1 : 0));
for (const r of list) {
const name = shortDistrictName(r);
const detailId = `rate-detail-${r.districtId}`;
const open = state.checks || state.open.has(r.districtId);
const tr = body.appendChild(make('tr', { class: 'rate-row', 'data-district-id': r.districtId }));
const th = tr.appendChild(make('th', { scope: 'row', class: 'rate-place' }));
th.appendChild(make('span', { class: 'rate-name' }, name));
tr.appendChild(make('td', {}, COPY.taxBase[r.base] || COPY.taxBase.none));
tr.appendChild(make('td', { class: 'num rate-pct' }, r.ratePct === null ? COPY.rateUserEntered : `${r.ratePct}%`));
const limits = limitWords(r);
tr.appendChild(make('td', { class: limits.length ? 'rate-limits' : 'rate-limits rate-limits-none' }, limits.length ? limits.join('; ') : COPY.rateNone));
const src = tr.appendChild(make('td', { class: 'rate-source' }));
if (r.sourceUrl) src.appendChild(make('a', { href: r.sourceUrl, target: '_blank', rel: 'noopener noreferrer', title: r.sourceTitle || r.sourceUrl }, COPY.rateSourceLink));
tr.appendChild(make('td', { class: 'nowrap rate-checked' }, r.verifiedOn ? formatDate(r.verifiedOn) : ''));
// V7: the details open from a chevron at the row's end.
tr.appendChild(make('td', { class: 'rate-more' })).appendChild(make('button', { type: 'button', class: 'plain rate-toggle', 'data-district-id': r.districtId,
'aria-expanded': String(open), 'aria-controls': detailId, 'aria-label': COPY.rateDetailLabel(name), title: COPY.rateDetail }))
.appendChild(make('span', { class: 'chevron', 'aria-hidden': 'true' }, COPY.rateChevron));
const dtr = body.appendChild(make('tr', { id: detailId, class: 'rate-detail', 'data-detail-for': r.districtId, hidden: !open }));
const cell = dtr.appendChild(make('td', { colspan: '7', class: 'rate-detail-cell' }));
const D = COPY.rateDetailLines;
const rules = ruleWords(r, all);
if (rules.length) cell.appendChild(make('div', { class: 'rate-rules' }, COPY.rateRulesLine(rules.join('; '))));
cell.appendChild(make('div', { class: 'rate-legal' }, COPY.rateLegalName(r.name)));
cell.appendChild(make('div', { class: 'rate-kind' }, D.kind(COPY.rateKinds[r.kind] || r.kind)));
cell.appendChild(make('div', { class: 'rate-dates' }, D.dates(COPY.rateDates(r.effectiveDate ? formatDate(r.effectiveDate) : COPY.rateBefore2024,
r.supersededDate ? formatDate(r.supersededDate) : COPY.rateInForce))));
const fees = cell.appendChild(make('div', { class: 'rate-fees' }));
for (const f of r.informationalFees || []) fees.appendChild(make('div', {}, COPY.rateFee(f.label, formatCents(f.cents))));
const checks = cell.appendChild(make('div', { class: 'rate-checks' }));
if ((r.flags || []).length) checks.appendChild(make('div', { class: 'rate-flags' }, D.flags(r.flags.join(', '))));
// The notes are quoted from the frozen table as recorded; data-quoted exempts them from the no-advice scan
// (WO-09 R2), as data-disclaimer exempts the disclaimer.
if (r.notes) {
checks.appendChild(make('div', { class: 'hint' }, COPY.rateNotesLead));
checks.appendChild(make('div', { class: 'rate-notes', 'data-quoted': '' }, r.notes));
}
}
showing.textContent = COPY.rateShowing(list.length);
}
// root: the Rate table view's body; workspace supplies the default tax year.
function renderRates(root, workspace, rows) {
if (state.year === null) state.year = workspace.settings.taxYear;
root.textContent = '';
const meta = RATE_TABLE_META;
root.appendChild(make('p', { id: 'rates-header' }, COPY.rateBrowserHeader(meta.rowCount, meta.districtCount, formatDate(meta.frozenOn))));
const filters = root.appendChild(make('div', { class: 'rate-filters' }));
const field = (id, label, control) => {
const wrap = filters.appendChild(make('div', { class: 'field' }));
wrap.appendChild(make('label', { for: id }, label));
wrap.appendChild(control);
return control;
};
const year = field('rates-year', COPY.rateYearLabel, make('select', { id: 'rates-year' }));
for (const y of YEARS) year.appendChild(make('option', { value: String(y) }, String(y)));
year.value = String(state.year);
const county = field('rates-county', COPY.rateCountyLabel, make('select', { id: 'rates-county' }));
county.appendChild(make('option', { value: '' }, COPY.rateCountyAll));
for (const [id, name] of countyOptions(rows)) county.appendChild(make('option', { value: id }, name));
county.value = state.county;
const search = field('rates-search', COPY.rateSearchLabel, make('input', { id: 'rates-search', type: 'search', autocomplete: 'off' }));
search.value = state.search;
const toggleWrap = filters.appendChild(make('label', { class: 'radio' }));
const toggle = toggleWrap.appendChild(make('input', { id: 'rates-checks', type: 'checkbox' }));
toggle.checked = state.checks;
toggleWrap.appendChild(document.createTextNode(` ${COPY.rateShowChecks}`));
const showing = root.appendChild(make('p', { id: 'rates-showing', class: 'hint', 'aria-live': 'polite' }));
const cols = COPY.rateColumns;
const wrap = root.appendChild(make('div', { class: 'table-wrap' }));
const t = wrap.appendChild(make('table', { id: 'rates-table' }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['name', 'base', 'rate', 'limits', 'source', 'verified']) {
head.appendChild(make('th', { scope: 'col', class: k === 'rate' ? 'num' : '' }, cols[k]));
}
head.appendChild(make('th', { scope: 'col' })).appendChild(make('span', { class: 'sr-only' }, COPY.rateDetail));
const body = t.appendChild(make('tbody'));
const refresh = () => renderTable(body, rows, rows, showing);
year.addEventListener('change', () => { state.year = Number(year.value); refresh(); });
county.addEventListener('change', () => { state.county = county.value; refresh(); });
search.addEventListener('input', () => { state.search = search.value; refresh(); });
toggle.addEventListener('change', () => {
state.checks = toggle.checked;
if (!state.checks) state.open.clear();
refresh();
});
// A row's own Details button opens and closes its detail row.
body.addEventListener('click', (e) => {
const button = e.target.closest('.rate-toggle');
if (!button) return;
const detail = document.getElementById(button.getAttribute('aria-controls'));
const open = detail.hidden;
detail.hidden = !open;
button.setAttribute('aria-expanded', String(open));
if (open) state.open.add(button.getAttribute('data-district-id'));
else state.open.delete(button.getAttribute('data-district-id'));
});
refresh();
// V7: what this version leaves out sits under a disclosure at the foot of the card.
const box = root.appendChild(make('details', { id: 'rates-dropped-box' }));
box.appendChild(make('summary', { id: 'dropped-title' }, COPY.droppedTitle));
const dropped = box.appendChild(make('ul', { id: 'rates-dropped' }));
for (const id of meta.droppedDistricts) {
const li = dropped.appendChild(make('li', { 'data-district-id': id }));
li.appendChild(make('strong', {}, COPY.droppedNames[id] || id));
li.appendChild(document.createTextNode(`: ${COPY.droppedReasons[id] || ''}`));
}
box.appendChild(make('p', { id: 'rates-not-in-table' }, COPY.notInTableHow));
}
return { ruleWords, renderRates };
})();
// ---- ui-tax ----
const ui_tax = (() => {
const { combined } = tax;
const { taxOffices, ledgerPeriod } = quant;
const { SCHEDULE_C_LINES, scheduleC } = book;
const { rowsForTaxYear, fallbackRow } = jurisdictions;
const { COPY, shortDistrictName } = copy;
// ui-tax.js — layer 4, imported only by ui.js. The Taxes tab (WO-13 V5), read-only, for settings.taxYear: the hero (tax
// owed so far), the local occupational taxes in one table grouped by county, everything else, the Schedule C totals
// (moved here from the ledger), the way to the CPA packet, and the assumptions behind the figures in a disclosure.
let built = false;
const el = {};
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function percent(x, digits) {
return `${(x * 100).toFixed(digits)}%`;
}
function card(root, id, titleId, title, attrs) {
const sec = root.appendChild(make('section', { id, class: 'card', 'aria-labelledby': titleId }));
sec.appendChild(make('h3', Object.assign({ id: titleId }, attrs || {}), title));
return sec;
}
function addTotal(list, id, label, strong) {
list.appendChild(make('dt', strong ? { class: 'strong' } : {}, label));
return list.appendChild(make('dd', { id, class: strong ? 'num strong' : 'num' }));
}
function build(root, on) {
root.textContent = '';
root.appendChild(make('h2', { id: 'tax-title', class: 'sr-only', tabindex: '-1' }, COPY.taxTitle));
el.unsupported = root.appendChild(make('p', { id: 'tax-unsupported', class: 'inline-warning', hidden: true }, COPY.taxUnsupported));
el.body = root.appendChild(make('div', { id: 'tax-body', class: 'tab-body' }));
// 1. The hero: the year's total in whole dollars, then what it is a share of.
const hero = el.body.appendChild(make('section', { id: 'tax-hero-card', class: 'card hero-card', 'aria-labelledby': 'tax-hero-label' }));
el.heroLabel = hero.appendChild(make('p', { id: 'tax-hero-label', class: 'caption' }));
el.hero = hero.appendChild(make('p', { id: 'tax-hero', class: 'hero-number' }));
const sub = hero.appendChild(make('p', { id: 'tax-hero-sub', class: 'hero-sub' }));
const [a, b, c2, d] = COPY.taxHeroSub;
sub.appendChild(document.createTextNode(a));
el.profit = sub.appendChild(make('span', { id: 'tax-profit' }));
sub.appendChild(document.createTextNode(b));
el.shareNet = sub.appendChild(make('span', { id: 'tax-share-net' }));
sub.appendChild(document.createTextNode(c2));
el.shareGross = sub.appendChild(make('span', { id: 'tax-share-gross' }));
sub.appendChild(document.createTextNode(d));
el.note = hero.appendChild(make('p', { id: 'tax-year-note', class: 'caption' }));
// 2. Local occupational taxes: one table, grouped by county.
const local = card(el.body, 'tax-local-card', 'tax-local-title', COPY.taxLocalTitle, { 'data-tip': 'olt' });
const wrap = local.appendChild(make('div', { class: 'table-wrap' }));
const table = wrap.appendChild(make('table', { id: 'tax-local-table', class: 'two-line', 'aria-labelledby': 'tax-local-title' }));
const head = table.appendChild(make('thead')).appendChild(make('tr'));
for (const k of ['district', 'rate', 'factor', 'liability', 'status']) {
head.appendChild(make('th', { scope: 'col', class: k === 'rate' || k === 'factor' || k === 'liability' ? 'num' : '' }, COPY.taxLocalColumns[k]));
}
// W4: the column of chevrons that open each row's arithmetic.
head.appendChild(make('th', { scope: 'col', class: 'math-col' })).appendChild(make('span', { class: 'sr-only' }, COPY.math.column));
el.localBody = table.appendChild(make('tbody'));
local.appendChild(make('p', { id: 'tax-local-note', class: 'caption' }, COPY.taxLocalCaption));
// J5: the tip sits on a line under the table, so the column header stays a plain header.
local.appendChild(make('p', { id: 'tax-local-share-note', class: 'caption', 'data-tip': 'apportioned' }, COPY.taxLocalShareNote));
// 3. Everything else.
const rest = card(el.body, 'tax-rest-card', 'tax-rest-title', COPY.taxRestTitle);
const totals = rest.appendChild(make('dl', { class: 'totals tax-totals' }));
el.se = addTotal(totals, 'tax-se', COPY.taxSe);
el.federal = addTotal(totals, 'tax-federal', COPY.taxFederal);
el.ky = addTotal(totals, 'tax-ky', COPY.taxKy);
el.localSum = addTotal(totals, 'tax-local-sum', COPY.taxLocalTotal);
el.combined = addTotal(totals, 'tax-combined', COPY.taxCombined, true);
el.qbi = rest.appendChild(make('p', { id: 'tax-qbi-note', class: 'caption', hidden: true }, COPY.qbiAboveThreshold));
// 4. Schedule C totals (moved from the ledger).
const sc = card(el.body, 'schedule-c', 'schedule-c-title', COPY.scheduleCTitle, { 'data-tip': 'scheduleC' });
el.scheduleC = sc.appendChild(make('dl', { id: 'schedule-c-list', class: 'totals' }));
// 5. For your tax preparer.
const packet = card(el.body, 'packet-card', 'packet-card-title', COPY.packetCardTitle);
packet.appendChild(make('p', { id: 'packet-card-text' }, COPY.packetCardText));
const actions = packet.appendChild(make('div', { class: 'form-actions' }));
actions.appendChild(make('button', { id: 'packet-button', type: 'button', class: 'primary' }, COPY.packetButton)).addEventListener('click', () => on.openPacket());
// 6. The assumptions, folded away at the bottom.
const box = el.body.appendChild(make('details', { id: 'tax-assumptions-box' }));
box.appendChild(make('summary', { id: 'tax-assumptions-title' }, COPY.taxAssumptionsTitle));
const list = box.appendChild(make('ul', { id: 'tax-assumptions', class: 'hint' }));
for (const key of ['assumptionPropertyFactor', 'assumptionTaxTable', 'assumptionLocalNotDeducted', 'assumptionSeFloor']) {
list.appendChild(make('li', {}, COPY[key]));
}
el.assumptions = list;
el.paducah = make('li', { id: 'assumption-paducah-credit' }, COPY.assumptionPaducahCredit);
built = true;
}
// D4: why a row's tax is not simply rate x share: an exemption, a cap, a minimum or a credit that applied.
function reasons(l) {
const out = [];
if (l.exemptionCents > 0) out.push(COPY.taxReasons.exemption(formatCents(l.exemptionCents)));
if (l.afterCapCents < l.computedCents) out.push(COPY.taxReasons.cap(formatCents(l.afterCapCents)));
if (l.afterMinimumCents > l.afterCapCents) out.push(COPY.taxReasons.minimum(formatCents(l.afterMinimumCents)));
if (l.creditCents > 0) out.push(COPY.taxReasons.credit(formatCents(l.creditCents)));
return out;
}
// The county a district belongs to, by its short name ("Fayette" for the merged Lexington-Fayette government).
function countyOf(row, all) {
if (!row || row.custom) return { id: '~', name: COPY.taxGroupOther };
const county = all.find((r) => r.districtId === row.parentCountyId) || row;
if (county.kind === 'merged') {
const slug = county.districtId.replace(/^ky-/, '').split('-')[0];
return { id: county.districtId, name: slug.charAt(0).toUpperCase() + slug.slice(1) };
}
return { id: county.districtId, name: county.name.replace(/ County$/, '') };
}
const TONE = { filed: 'ok', paymentsMissed: 'warn', paymentsShort: 'warn', neverFiled: 'danger', notDue: 'neutral' };
// lines: tax.combined's local lines. offices: quant.taxOffices' offices (for each one's filing status), or null.
function renderLocal(lines, all, offices, localTotalCents, on) {
el.localBody.textContent = '';
if (lines.length === 0) {
el.localBody.appendChild(make('tr', { class: 'empty' })).appendChild(make('td', { colspan: '6' }, COPY.taxLocalNone));
return;
}
// Counties by their total, largest first; within a county the offices by amount.
const groups = [];
for (const l of lines) {
const county = countyOf(all.find((r) => r.districtId === l.districtId) || (l.custom ? { custom: true } : null), all);
let g = groups.find((x) => x.id === county.id);
if (!g) groups.push(g = { id: county.id, name: county.name, lines: [], totalCents: 0 });
g.lines.push(l);
g.totalCents += l.liabilityCents;
}
groups.sort((x, y) => y.totalCents - x.totalCents || (x.name < y.name ? -1 : 1));
for (const g of groups) {
el.localBody.appendChild(make('tr', { class: 'group-row', 'data-county': g.name })).appendChild(make('th', { colspan: '6', scope: 'colgroup' }, g.name));
for (const l of g.lines.slice().sort((x, y) => y.liabilityCents - x.liabilityCents || (x.districtId < y.districtId ? -1 : 1))) {
const tr = el.localBody.appendChild(make('tr', { 'data-district-id': l.districtId, 'data-county': g.name }));
const office = tr.appendChild(make('th', { scope: 'row', class: 'tax-office tl-name' }));
office.appendChild(make('span', { class: 'tax-office-name' }, l.custom ? `${l.name} (${COPY.notInTable})` : shortDistrictName(l)));
for (const reason of reasons(l)) office.appendChild(make('span', { class: 'tax-reason' }, reason));
tr.appendChild(make('td', { class: 'num tax-rate tl-a' }, typeof l.ratePct === 'number' ? `${l.ratePct.toFixed(2)}%` : COPY.rateNone));
tr.appendChild(make('td', { class: 'num tax-factor tl-b' }, percent(l.factor, 2)));
tr.appendChild(make('td', { class: 'num liability tl-value' }, formatCents(l.liabilityCents)));
const o = offices ? offices.find((x) => x.districtId === l.districtId) : null;
const cell = tr.appendChild(make('td', { class: 'tax-status tl-meta' }));
if (o) cell.appendChild(make('span', { class: `pill pill-${TONE[o.status] || 'neutral'} office-chip chip-${o.status}` }, COPY.officeStatus[o.status] || ''));
// W4: the row opens to its arithmetic and its source.
on.math(tr, 'local', { key: l.districtId, line: l, colspan: 6 });
}
}
const total = el.localBody.appendChild(make('tr', { class: 'total-row' }));
total.appendChild(make('th', { scope: 'row' }, COPY.taxLocalTotal));
total.appendChild(make('td', {}));
total.appendChild(make('td', {}));
total.appendChild(make('td', { id: 'tax-local-total', class: 'num strong' }, formatCents(localTotalCents)));
total.appendChild(make('td', {}));
total.appendChild(make('td', {}));
}
function totalRow(key, label, cents, strong) {
const dt = make('dt', { 'data-total': key }, label);
if (key === 'net') dt.setAttribute('data-tip', 'netProfit');
const dd = make('dd', { id: `schedule-c-${key}`, class: strong ? 'num strong' : 'num' }, formatCents(cents));
el.scheduleC.appendChild(dt);
el.scheduleC.appendChild(dd);
}
function renderScheduleC(workspace, taxYear) {
const s = scheduleC(workspace, taxYear);
el.scheduleC.textContent = '';
totalRow('gross', COPY.scheduleCGross, s.grossReceiptsCents);
totalRow('other', COPY.scheduleCOther, s.otherIncomeCents);
const lines = SCHEDULE_C_LINES.filter((l) => s.expensesByLine[l]);
if (lines.length === 0) {
el.scheduleC.appendChild(make('dt', { class: 'hint' }, COPY.scheduleCNoExpenses));
el.scheduleC.appendChild(make('dd'));
}
for (const line of lines) totalRow(`line-${line}`, `${line} — ${COPY.scheduleCLabels[line]}`, s.expensesByLine[line]);
totalRow('total-expenses', COPY.scheduleCTotalExpenses, s.totalExpensesCents, true);
totalRow('net', COPY.scheduleCNet, s.netProfitCents, true);
}
// on = { openPacket(), math(tr, table, { key, line, colspan }) }
function renderTaxSummary(root, workspace, rows, c, todayIso, on) {
if (!built || !root.contains(el.body)) build(root, on);
const taxYear = workspace.settings.taxYear;
el.note.textContent = COPY.taxYearNote(taxYear);
renderScheduleC(workspace, taxYear);
let r;
try {
r = combined(workspace, taxYear, rows, c);
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
el.unsupported.hidden = false;
for (const id of ['tax-hero-card', 'tax-local-card', 'tax-rest-card']) document.getElementById(id).hidden = true;
return;
}
el.unsupported.hidden = true;
for (const id of ['tax-hero-card', 'tax-local-card', 'tax-rest-card']) document.getElementById(id).hidden = false;
let offices = null;
try {
offices = taxOffices(workspace, taxYear, rows, c, todayIso).offices;
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
}
const period = ledgerPeriod(workspace, taxYear);
const through = period && period.monthsElapsed < 12 ? COPY.throughLabel(period.month, period.day, period.monthEnd) : null;
// Whole dollars in the hero; cents in the tables and lists below.
el.heroLabel.textContent = COPY.taxHeroLabel(through);
el.hero.textContent = COPY.fmtDollars0(r.totalCents);
el.profit.textContent = COPY.fmtDollars0(r.scheduleC.netProfitCents);
el.shareGross.textContent = r.setAsideShareOfGross === null ? COPY.taxShareNone : percent(r.setAsideShareOfGross, 2);
el.shareNet.textContent = r.setAsideShareOfNet === null ? COPY.taxShareNone : percent(r.setAsideShareOfNet, 2);
const all = rowsForTaxYear(rows.concat(workspace.customRates.map(fallbackRow)), taxYear);
renderLocal(r.local, all, offices, r.localTotalCents, on);
el.se.textContent = formatCents(r.se.totalCents);
el.federal.textContent = formatCents(r.federal.taxCents);
el.ky.textContent = formatCents(r.ky.taxCents);
el.localSum.textContent = formatCents(r.localTotalCents);
el.combined.textContent = formatCents(r.totalCents);
el.qbi.hidden = !r.federal.qbiAboveThreshold;
// Listed only while a location is in McCracken County, where the Paducah credit question arises.
const mccracken = workspace.locations.some((l) => l.districtIds.includes('ky-mccracken-county'));
if (mccracken && !el.assumptions.contains(el.paducah)) el.assumptions.appendChild(el.paducah);
if (!mccracken && el.assumptions.contains(el.paducah)) el.paducah.remove();
}
return { renderTaxSummary };
})();
// ---- ui-tour ----
const ui_tour = (() => {
const { safeHarbor, taxJar } = quant;
const { isQuickEstimate, scheduleC } = book;
const { combined } = tax;
const { COPY, formatDate } = copy;
// ui-tour.js — layer 4, imported only by ui.js. Two cards of the Plan tab (WO-13 V6), built from what was the tour's
// third screen: "Set aside 19% of every invoice" (the chart) and "Quarterly payments" (the one schedule). (Screens 1 and 2 became the Overview tab:
// ui-overview.js, WO-13 V3.) Charts are inline SVG built with createElementNS; every chart has a title, role="img",
// an aria-label and a visually hidden table with the same numbers.
// J7: whether screen 3 is showing next year's plan in place of this year's chart.
let planOn = false;
const SVG = 'http://www.w3.org/2000/svg';
function make(tag, attrs, text) {
const node = document.createElement(tag);
for (const k of Object.keys(attrs || {})) {
if (k === 'hidden') node.hidden = Boolean(attrs[k]);
else node.setAttribute(k, attrs[k]);
}
if (text !== undefined) node.textContent = text;
return node;
}
function svg(tag, attrs, text) {
const node = document.createElementNS(SVG, tag);
for (const k of Object.keys(attrs || {})) node.setAttribute(k, attrs[k]);
if (text !== undefined) node.textContent = text;
return node;
}
function formatCents(cents) {
const sign = cents < 0 ? '-' : '';
const abs = Math.abs(cents);
const dollars = String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${sign}$${dollars}.${String(abs % 100).padStart(2, '0')}`;
}
function formatDollars(cents) {
return `$${String(Math.round(cents / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
}
// A visually hidden table holding a chart's numbers. The wrapper is what is hidden: a table sizes to its content and
// would widen the page.
function srTable(parent, id, columns, rows) {
const t = parent.appendChild(make('div', { class: 'sr-only' })).appendChild(make('table', { id }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const c of columns) head.appendChild(make('th', { scope: 'col' }, c));
const body = t.appendChild(make('tbody'));
for (const r of rows) {
const tr = body.appendChild(make('tr'));
for (const cell of r) tr.appendChild(make('td', {}, cell));
}
return t;
}
function isDemoWorkspace(w) {
return w.locations.length > 0 && w.locations.every((l) => l.confirmedBy === 'fixture');
}
const pctText = (x, digits) => `${(x * 100).toFixed(digits)}%`;
// Q5 (the set-aside simulation) is run once by ui.js and shared with the tax jar: on.withQ5(onReady, onUnsupported)
// calls onReady at once when the run is kept (and returns true), else after the screen has painted.
// D3: a ledger built from the four quick answers says so and offers the way to exact figures. prefix: the ids of the
// banner on Overview ('quick-banner') and of its twin at the top of Plan.
function quickBanner(sec, workspace, on, prefix) {
if (!isQuickEstimate(workspace)) return;
const box = sec.appendChild(make('div', { id: prefix, class: 'tour-banner' }));
// J9: with last year written in from the fifth answer, say whether its income was entered or assumed.
const taxYear = workspace.settings.taxYear;
const hasLastYear = workspace.transactions.some((t) => t.date.startsWith(`${taxYear - 1}-`));
const same = scheduleC(workspace, taxYear - 1).grossReceiptsCents === scheduleC(workspace, taxYear).grossReceiptsCents;
box.appendChild(make('p', { id: `${prefix}-text` }, !hasLastYear ? COPY.quickBanner : same ? COPY.quickBannerAssumed : COPY.quickBannerEntered));
box.appendChild(make('button', { id: `${prefix}-link`, type: 'button', class: 'link-button' }, COPY.quickBannerLink))
.addEventListener('click', on.toLedger);
}
// ---- screen 3 ----
function niceStep(raw) {
const p = 10 ** Math.floor(Math.log10(Math.max(raw, 1)));
for (const m of [1, 2, 2.5, 5, 10]) if (m * p >= raw) return m * p;
return 10 * p;
}
// Per-month nearest-rank percentile across the paths.
function monthPercentile(paths, m, q) {
const sorted = paths.map((p) => p[m]).sort((a, b) => a - b);
return sorted[Math.max(1, Math.ceil(q * sorted.length)) - 1];
}
// id (J7): the prefix of every element id in the chart, so "How much to save" can draw one too (ui.js hands it this
// function). With no actual month (asOfMonth 0, a planned year) the band runs the whole year and there is no "today".
// The proof chart (WO-11 J4): month by month, the tax built up against the money set aside at the share. The tax
// line is the median simulated path (the actual figure through the ledger's last month); the set-aside line is the
// share x the median cumulative receipts. Where the set-aside line is above the tax line, the area between them is
// marked covered. Projected months carry the 10th-90th percentile band around the tax line. "Today" (the last month
// the ledger reaches) divides actual from projected. coveredCents: what is actually paid and saved (a dashed level),
// or null to leave it out. The y-axis fits the data: top = the largest value x 1.15, rounded up.
function proofChart(parent, r, coveredCents, id = 'screen3') {
// WO-13 V6: at card width the chart is over 320 px tall; on a phone it is drawn taller for its width, so it still is.
const narrow = window.matchMedia('(max-width: 639px)').matches;
const W = narrow ? 360 : 900;
const H = narrow ? 340 : 400;
const L = narrow ? 52 : 64;
const R = 16;
const T = 34;
const B = 28;
const pw = W - L - R;
const ph = H - T - B;
const tax = [];
const p10 = [];
const p90 = [];
const set = [];
for (let m = 0; m < 12; m++) {
tax.push(monthPercentile(r.paths, m, 0.5));
p10.push(monthPercentile(r.paths, m, 0.1));
p90.push(monthPercentile(r.paths, m, 0.9));
set.push(Math.round(r.setAsideShare * monthPercentile(r.grossPaths, m, 0.5)));
}
const rawTop = Math.max(1, p90[11], set[11], coveredCents === null ? 0 : coveredCents) * 1.15;
const unit = 10 ** Math.max(0, Math.floor(Math.log10(rawTop)) - 1);
const ymax = Math.ceil(rawTop / unit) * unit;
const step = niceStep(ymax / 5);
const x = (m) => L + m * (pw / 11);
const y = (v) => T + ph - Math.min(v, ymax) / ymax * ph;
const pct = COPY.fmtPctAbout(r.setAsideShare);
const s = parent.appendChild(svg('svg', { id: `${id}-proof`, class: 'fan-chart proof-chart', viewBox: `0 0 ${W} ${H}`, role: 'img', 'data-ymax': String(ymax),
'aria-label': COPY.proofLabel(formatCents(tax[11]), formatCents(set[11]), pct) }));
s.appendChild(svg('title', {}, COPY.proofTitle));
for (let v = 0; v <= ymax; v += step) {
const gy = y(v);
s.appendChild(svg('line', { class: 'fan-grid', x1: String(L), x2: String(W - R), y1: gy.toFixed(1), y2: gy.toFixed(1) }));
s.appendChild(svg('text', { class: 'fan-axis', x: String(L - 6), y: (gy + 4).toFixed(1), 'text-anchor': 'end' }, formatDollars(v)));
}
COPY.monthsShort.forEach((name, m) => {
s.appendChild(svg('text', { class: 'fan-axis', x: x(m).toFixed(1), y: String(H - 8), 'text-anchor': 'middle' }, narrow ? name.charAt(0) : name));
});
const pt = (v, m) => `${x(m).toFixed(1)},${y(v).toFixed(1)}`;
const d = (vals) => vals.map((v, m) => `${m === 0 ? 'M' : 'L'}${pt(v, m)}`).join(' ');
const back = (vals, from) => vals.map((v, m) => (m >= from ? `L${pt(v, m)}` : '')).reverse().join(' ');
// Covered: between the two lines wherever the set-aside line is the higher one.
const top = set.map((v, m) => Math.max(v, tax[m]));
const covered = s.appendChild(svg('path', { id: `${id}-covered`, class: 'proof-covered', d: `${d(top)} ${back(tax, 0)} Z` }));
covered.appendChild(svg('title', {}, COPY.proofCovered));
// The band: projected months only, from the last actual month on.
const a = Math.min(Math.max(r.asOfMonth, 1), 12) - 1;
if (a < 11) {
const upper = p90.map((v, m) => (m >= a ? `${m === a ? 'M' : 'L'}${pt(v, m)}` : '')).join(' ');
s.appendChild(svg('path', { id: `${id}-band`, class: 'fan-band proof-band', d: `${upper} ${back(p10, a)} Z`, 'data-from': String(a + 1) }));
}
s.appendChild(svg('path', { id: `${id}-set-line`, class: 'proof-line proof-set', d: d(set) }));
s.appendChild(svg('path', { id: `${id}-tax-line`, class: 'proof-line proof-tax', d: d(tax) }));
const tx = x(a);
if (coveredCents !== null) {
const py = y(coveredCents).toFixed(1);
s.appendChild(svg('line', { id: `${id}-paid-line`, class: 'proof-paid', x1: String(L), x2: String(W - R), y1: py, y2: py, 'data-cents': String(coveredCents) }));
s.appendChild(svg('circle', { class: 'proof-paid-dot', cx: tx.toFixed(1), cy: py, r: '4' }));
}
if (r.asOfMonth >= 1 && r.asOfMonth < 12) {
s.appendChild(svg('line', { id: `${id}-today`, class: 'fan-today', x1: tx.toFixed(1), x2: tx.toFixed(1), y1: String(T - 6), y2: String(T + ph), 'data-month': String(r.asOfMonth) }));
s.appendChild(svg('text', { class: 'fan-today-label', x: tx.toFixed(1), y: '11', 'text-anchor': 'middle' }, COPY.fanToday));
s.appendChild(svg('text', { id: `${id}-actual`, class: 'fan-side-label', x: (tx - 8).toFixed(1), y: '26', 'text-anchor': 'end' }, COPY.fanActual));
s.appendChild(svg('text', { id: `${id}-projected`, class: 'fan-side-label', x: (tx + 8).toFixed(1), y: '26', 'text-anchor': 'start' }, COPY.fanProjected));
}
// The key under the chart names every mark.
const key = parent.appendChild(make('ul', { id: `${id}-proof-key`, class: 'proof-key' }));
const item = (kind, label) => {
const li = key.appendChild(make('li', { 'data-mark': kind }));
li.appendChild(make('span', { class: `proof-swatch proof-swatch-${kind}`, 'aria-hidden': 'true' }));
li.appendChild(make('span', {}, label));
};
// V6: three items on one line; the covered band and the simulated range are explained in the line underneath.
item('tax', r.asOfMonth === 0 ? COPY.proofTaxPlan : COPY.proofTax);
item('set', COPY.proofSet(COPY.fmtPct0(r.setAsideShare)));
if (coveredCents !== null) item('paid', COPY.proofPaid(COPY.fmtDollars0(coveredCents)));
parent.appendChild(make('p', { id: `${id}-proof-note`, class: 'caption' }, COPY.proofLegendNote(a < 11)));
const cols = COPY.proofColumns;
srTable(parent, `${id}-proof-data`, [cols.month, cols.tax, cols.set, cols.p10, cols.p90],
COPY.monthsShort.map((name, m) => [name, formatCents(tax[m]), formatCents(set[m]), formatCents(p10[m]), formatCents(p90[m])]));
}
// plainShare: the year's total over the year's receipts, for a ledger with no earlier month to resample.
// paidSaved(share): what is actually paid and saved today, or null. (WO-13 V2: the tax jar card that sat under this
// chart is gone: the Tax jar itself is the next card on the Plan tab.)
// planShown (J7): next year's plan holds the heading and the chart, so this year's run draws nothing.
function fillScreen3(workspace, r, plainShare, on, paidSaved, planShown) {
const left = document.getElementById('screen3-left');
const heading = document.getElementById('screen3-heading');
if (!left || !heading || planShown) return;
left.textContent = '';
if (r.setAsideShare === null) {
heading.textContent = plainShare === null ? COPY.q5Title : COPY.setAsideTitle(COPY.fmtPct0(plainShare));
left.appendChild(make('p', { id: 'screen3-no-history' }, COPY.screen3NoHistory));
return;
}
heading.textContent = COPY.setAsideTitle(COPY.fmtPct0(r.setAsideShare));
const covered = paidSaved(r.setAsideShare);
proofChart(left, r, covered !== null && covered > 0 ? covered : null);
left.appendChild(make('p', { id: 'screen3-caption', class: 'proof-caption' }, COPY.proofCaption(COPY.fmtPctAbout(r.setAsideShare), pctText(r.confidence, 0))));
const basis = isDemoWorkspace(workspace) ? COPY.screen3Basis : COPY.yoursScreen3Basis;
left.appendChild(make('p', { id: 'screen3-basis', class: 'hint' }, basis(r.historyMonths, r.draws)));
}
// J7: next year's plan in the chart's place: the share for that year, the chart with a band over all twelve months,
// the three simulated totals, and which year's federal and Kentucky figures it used.
function fillPlan(workspace, v) {
const left = document.getElementById('screen3-left');
const heading = document.getElementById('screen3-heading');
if (!left || !heading) return;
left.textContent = '';
if (v.setAsideShare === null) {
heading.textContent = COPY.planNoHistory;
return;
}
const pct = COPY.fmtPctAbout(v.setAsideShare);
const conf = pctText(v.confidence, 0);
heading.textContent = COPY.planHeading(v.taxYear, pct, conf);
proofChart(left, v, null);
left.appendChild(make('p', { id: 'screen3-caption', class: 'proof-caption' }, COPY.planCaption(v.taxYear, pct, conf)));
const labels = COPY.planTotals(v.taxYear);
const dl = left.appendChild(make('dl', { id: 'screen3-plan-totals', class: 'totals' }));
for (const k of ['p10', 'p50', 'p90']) {
dl.appendChild(make('dt', {}, labels[k]));
dl.appendChild(make('dd', { id: `screen3-plan-${k}`, class: 'num' }, formatCents(v[`${k}TotalCents`])));
}
if (v.usesEarlierFigures) left.appendChild(make('p', { id: 'screen3-plan-fallback', class: 'hint' }, COPY.planFallback(v.figuresYear, v.taxYear)));
left.appendChild(make('p', { id: 'screen3-basis', class: 'hint' }, COPY.planBasis(v.taxYear, v.historyMonths)));
}
// on = { whyTheseDates(), toLedger(), withQ5(onReady, onUnsupported), withPlan(onReady, onUnsupported) }
// Plan, card 1: "Set aside 19% of every invoice": the chart at card width, its caption, and next year's plan.
function renderPlanIntro(root, workspace, rows, c, todayIso, on) {
root.textContent = '';
root.appendChild(make('h2', { id: 'plan-title', class: 'sr-only' }, COPY.tabs.plan));
if (workspace.locations.length === 0) return;
quickBanner(root, workspace, on, 'plan-quick-banner');
const taxYear = workspace.settings.taxYear;
const sec = root.appendChild(make('section', { id: 'screen-3', class: 'card', 'aria-labelledby': 'screen3-heading' }));
sec.appendChild(make('h3', { id: 'screen3-heading', tabindex: '-1' }, COPY.computing));
const left = sec.appendChild(make('div', { id: 'screen3-left', 'aria-live': 'polite' }));
let r;
try {
r = combined(workspace, taxYear, rows, c);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
}
const paidSaved = (share) => {
try {
return taxJar(workspace, taxYear, rows, c, share, todayIso).coveredCents;
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
return null;
}
};
const unsupported = () => {
const h = document.getElementById('screen3-heading');
if (h) h.textContent = COPY.taxUnsupported;
};
// This year: the chart. With the plan on, next year's plan fills its place.
const thisYear = () => on.withQ5((value) => fillScreen3(workspace, value, r ? r.setAsideShareOfGross : null, on, paidSaved, planOn), unsupported);
const plan = () => on.withPlan((value) => {
if (planOn) fillPlan(workspace, value);
}, unsupported);
const toggle = make('button', { id: 'screen3-plan', type: 'button', 'aria-pressed': String(planOn) }, planOn ? COPY.planBack : COPY.planToggle);
sec.appendChild(make('div', { class: 'form-actions' })).appendChild(toggle);
toggle.addEventListener('click', () => {
planOn = !planOn;
toggle.setAttribute('aria-pressed', String(planOn));
toggle.textContent = planOn ? COPY.planBack : COPY.planToggle;
const slot = document.getElementById('screen3-left');
if (slot) {
slot.textContent = '';
slot.appendChild(make('p', { id: 'screen3-computing' }, COPY.computing));
}
if (planOn) plan();
else thisYear();
});
const ready = thisYear();
if (planOn) plan();
if (!ready || planOn) left.appendChild(make('p', { id: 'screen3-computing' }, COPY.computing));
}
// Plan, card 3: "Quarterly payments": the one schedule (Due, IRS, Kentucky, Status) and why its dates are what they are.
function renderQuarterly(root, workspace, rows, c, todayIso, on) {
root.textContent = '';
if (workspace.locations.length === 0) return;
const taxYear = workspace.settings.taxYear;
let sh;
try {
sh = safeHarbor(workspace, taxYear, rows, c);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
return;
}
const sec = root.appendChild(make('section', { id: 'plan-quarterly-card', class: 'card', 'aria-labelledby': 'screen3-dates-title' }));
sec.appendChild(make('h3', { id: 'screen3-dates-title', 'data-tip': 'estimated' }, COPY.quarterlyTitle));
const cols = COPY.screen3DateColumns;
const t = sec.appendChild(make('div', { class: 'table-wrap' })).appendChild(make('table', { id: 'screen3-dates', 'aria-labelledby': 'screen3-dates-title' }));
const head = t.appendChild(make('thead')).appendChild(make('tr'));
for (const [label, num] of [[cols.due], [cols.federal, true], [cols.ky, true], [cols.status]]) head.appendChild(make('th', { scope: 'col', class: num ? 'num' : '' }, label));
const body = t.appendChild(make('tbody'));
// J9: each date carries the tax jar's own status: Paid, Short or Missed once it has come due, Upcoming before.
let pastDue = [];
try {
pastDue = taxJar(workspace, taxYear, rows, c, 0, todayIso).pastDue;
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
}
const statusOf = (office, inst) => {
if (inst.amountCents === 0) return null;
const was = pastDue.find((x) => x.office === office && x.dueIso === inst.dueIso);
return !was ? 'upcoming' : was.shortCents === 0 ? 'paid' : was.paidCents === 0 ? 'missed' : 'short';
};
sh.federal.installments.forEach((f, i) => {
const k = sh.ky.installments[i];
const tr = body.appendChild(make('tr', { 'data-due': f.dueIso }));
tr.appendChild(make('td', { class: 'nowrap' }, formatDate(f.dueIso)));
tr.appendChild(make('td', { class: 'num screen3-fed' }, formatCents(f.amountCents)));
tr.appendChild(make('td', { class: 'num screen3-ky' }, formatCents(k.amountCents)));
const cell = tr.appendChild(make('td', { class: 'screen3-status' }));
const fed = statusOf('federal', f);
const ky = statusOf('ky', k);
const both = [fed, ky].filter(Boolean);
tr.setAttribute('data-status', both.join(' '));
tr.setAttribute('data-federal', fed || '');
tr.setAttribute('data-ky', ky || '');
// A part-paid installment says how much is short (the six-row table this schedule replaced said so per office).
const words = (office, inst, state) => {
if (state !== 'short') return COPY.jarStatus[state];
const was = pastDue.find((x) => x.office === office && x.dueIso === inst.dueIso);
return `${COPY.jarStatus.short} ${COPY.jarShortBy(formatCents(was.shortCents))}`;
};
if (both.length === 0) cell.textContent = COPY.rateNone;
else if ((both.length === 1 || fed === ky) && both[0] !== 'short') cell.appendChild(make('span', { class: `jar-chip jar-chip-${both[0]}` }, COPY.jarStatus[both[0]]));
else {
for (const [office, inst, state] of [['federal', f, fed], ['ky', k, ky]]) {
if (!state) continue;
if (cell.firstChild) cell.appendChild(document.createTextNode(' '));
cell.appendChild(make('span', { class: `jar-chip jar-chip-${state}` }, COPY.screen3DateStatus(COPY.jarOffices[office], words(office, inst, state))));
}
}
});
const why = sec.appendChild(make('details', { id: 'screen3-why' }));
why.appendChild(make('summary', { id: 'screen3-why-summary' }, COPY.whyTheseDates));
why.appendChild(make('p', { id: 'screen3-why-text' }, COPY.whyTheseDatesText));
why.appendChild(make('button', { id: 'screen3-why-link', type: 'button', class: 'link-button' }, COPY.whyTheseDatesLink)).addEventListener('click', on.whyTheseDates);
}
return { isDemoWorkspace, proofChart, renderPlanIntro, renderQuarterly };
})();
// ---- ui ----
const ui = (() => {
const { emptyWorkspace, reduce, APP_VERSION } = book;
const { serialize, parse, suggestedFileName, MAX_FILE_BYTES, SAVE_MIME } = io;
const { COPY, shortDistrictName } = copy;
const { renderLedger, openAddSheet, addJobDirect } = ui_ledger;
const { openImportDialog } = ui_import;
const { renderLocations } = ui_locations;
const { renderTaxSummary } = ui_tax;
const { renderPacket } = ui_packet;
const { renderQuant } = ui_quant;
const { renderPlanIntro, renderQuarterly, proofChart } = ui_tour;
const { renderOverview, contextChart, entryCount, resetTryRow, marginalBars, exampleJobDate } = ui_overview;
const { whatChanged, renderChanged } = ui_changed;
const { countTo, motionAfter, resetMotion } = ui_motion;
const { mathDisclosure, fillLocalMath, fillFormSentence, officeShortName } = ui_math;
const { renderQuick } = ui_quick;
const { renderJar } = ui_jar;
const { bootstrapSetAside, planNextYear } = quant;
const { combined } = tax;
const { renderRates } = ui_rates;
const { renderAssumptions, renderCredits } = ui_info;
const { CONSTANTS, FACTS } = constants;
const { RATE_ROWS, RATE_TABLE_META, rowsForTaxYear, fallbackRow } = jurisdictions;
const { DEMO_WORKSPACE } = data_demo;
// ui.js — layer 4. The only module that touches the DOM, the clock, storage and randomness.
const DISCLAIMER_STORAGE_KEY = 'kylt.disclaimerAccepted.v1';
const TAX_YEARS = [2024, 2025, 2026, 2027];
const FILING_STATUSES = ['single', 'mfj', 'mfs', 'hoh'];
const UNSUPPORTED_STATUSES = ['mfs', 'hoh'];
const PRIOR_YEAR_FIELDS = [['prior-year-tax', 'priorYearTaxCents'], ['prior-year-agi', 'priorYearAgiCents']];
// '' -> null; '10,000' or '10000.50' -> cents; anything else -> undefined (invalid).
function dollarsToCents(text) {
const t = String(text).trim().replace(/^\$/, '').replace(/,/g, '');
if (t === '') return null;
if (!/^\d+(\.\d{1,2})?$/.test(t)) return undefined;
const [whole, frac] = t.split('.');
return Number(whole) * 100 + Number((frac || '').padEnd(2, '0') || 0);
}
function centsToDollars(cents) {
if (cents === null || cents === undefined) return '';
return (cents / 100).toFixed(2).replace(/\.00$/, '');
}
let workspace = null;
let dirty = false;
let pendingOpen = null;
let firstRenderDone = false;
// WO-13 V2: one shell. Five tabs, one in the layout at a time. Ledger and Rates switch sub-sections with a segmented
// control; Taxes opens the CPA packet as a view of its own. The place is kept in location.hash (#ledger, #rates/about).
const TABS = ['overview', 'ledger', 'taxes', 'plan', 'rates'];
const SUBS = { ledger: ['entries', 'places', 'import', 'settings'], taxes: ['summary', 'packet'], rates: ['rates', 'assumptions', 'about'] };
let tab = 'overview';
// Under 640 px the tabs sit at the bottom and Save is inside More (the same breakpoint as styles.css).
const PHONE = window.matchMedia('(max-width: 639px)');
const sub = { ledger: 'entries', taxes: 'summary', rates: 'rates' };
function byId(id) {
return document.getElementById(id);
}
function setText(id, text) {
byId(id).textContent = text;
}
// meta.added: the entry this commit added (W2). Any other change puts the what-changed card away.
function commit(next, meta) {
if (next !== workspace) {
lastChange = meta && meta.added ? changeOf(workspace, next, meta.added) : null;
workspace = next;
dirty = true;
}
render();
}
// ---- WO-14 W4: show the math ----
// The rows that are open, as "<table>:<office>", kept across redraws; another workspace starts with none open.
const mathOpen = new Set();
// Adds the chevron and the detail to an office row. A local office (line: its line of tax.combined) shows its
// arithmetic, source and checked date; the IRS and Kentucky (no line) one sentence and the way to Assumptions.
function mathRow(tr, table, { key, name, line, colspan }) {
const id = `${table}:${key}`;
const taxYear = workspace.settings.taxYear;
const label = name || (line ? officeShortName(line) : key);
mathDisclosure(tr, table, key, label, colspan, mathOpen.has(id), (open) => {
if (open) mathOpen.add(id);
else mathOpen.delete(id);
}, (cell) => {
if (!line) {
fillFormSentence(cell, key, () => go('rates', 'assumptions', 'assumptions-title'));
return;
}
const all = rowsForTaxYear(RATE_ROWS.concat(workspace.customRates.map(fallbackRow)), taxYear);
const rowOf = (districtId) => all.find((r) => r.districtId === districtId) || null;
fillLocalMath(cell, line, rowOf(line.districtId), (districtId) => (rowOf(districtId) ? shortDistrictName(rowOf(districtId)) : districtId));
});
}
// ---- WO-14 W2: what the entry just added changed ----
// The last add's effect, office by office (ui-changed.whatChanged); null when there is none to show. It belongs to
// the workspace as that add left it, is replaced by the next add, and is never saved.
let lastChange = null;
// Where a job was, as the Overview's by-place bars name the place's set of districts ("Georgetown").
function placeWords(w, txn) {
const loc = w.locations.find((l) => l.id === txn.locationId);
if (!loc) return null;
try {
const key = loc.districtIds.join('|');
const bar = marginalBars(w, RATE_ROWS, CONSTANTS).find((b) => b.districtIds.join('|') === key);
return bar ? bar.name : loc.name;
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
return loc.name;
}
}
function changeOf(before, after, txn) {
return whatChanged(before, after, txn, RATE_ROWS, CONSTANTS, txn.category === 'income' ? placeWords(after, txn) : null);
}
function currentChange() {
return lastChange && lastChange.after === workspace ? lastChange : null;
}
function dismissChange() {
lastChange = null;
hideToast();
const card = byId('changed-card');
if (card) {
card.remove();
byId('screen1-headline').focus({ preventScroll: true });
}
}
// ---- WO-13 V4: visible recalculation ----
// The toast: one line at the bottom of the screen, gone after 4 seconds.
let toastTimer = null;
function showToast(text) {
const toast = byId('toast');
toast.className = 'toast';
toast.textContent = text;
toast.hidden = false;
clearTimeout(toastTimer);
toastTimer = setTimeout(() => {
toast.hidden = true;
}, 4000);
}
function hideToast() {
clearTimeout(toastTimer);
byId('toast').hidden = true;
}
// W2: an add made from another tab is confirmed with the what-changed card itself, in the toast's place. It stays
// until it is dismissed, the next add replaces it, or the Overview (where the same card is) is opened.
function showChangeToast(change) {
const toast = byId('toast');
clearTimeout(toastTimer);
toast.textContent = '';
toast.className = 'toast toast-card';
renderChanged(toast, change, 'toast-changed', 'changed-card', dismissChange);
toast.hidden = false;
}
// What is kept so far (net profit less every tax), in whole dollars; null when this version cannot compute the year.
function keptSoFar() {
try {
const r = combined(workspace, workspace.settings.taxYear, RATE_ROWS, CONSTANTS);
return COPY.fmtDollars0(r.scheduleC.netProfitCents - r.totalCents);
} catch (e) {
if (!(e && (e.message === 'unsupportedFilingStatus' || /^missingConstant:/.test(e.message)))) throw e;
return null;
}
}
// A hero or stat whose value changed is tinted for 600 ms (not under reduced motion). The last value each one showed is
// kept by its id; "Computing…" is not a value. Nothing is tinted for a workspace just opened.
const lastValues = new Map();
const REDUCED_MOTION = window.matchMedia('(prefers-reduced-motion: reduce)');
function noteValues() {
for (const node of document.querySelectorAll('.hero-number[id], .stat-value[id], .jar-figure dd[id]')) {
const text = node.textContent;
if (text === '' || text === COPY.computing) continue;
const was = lastValues.get(node.id);
lastValues.set(node.id, text);
if (was === undefined || was === text || REDUCED_MOTION.matches) continue;
node.classList.add('changed');
setTimeout(() => node.classList.remove('changed'), 600);
// W3: a hero or stat value counts from what it showed to what it shows now.
if (node.matches('.hero-number, .stat-value')) countTo(node, was, text);
}
}
// What the ledger's sheet reports back: an entry added (the toast names it and what is now kept), an entry changed or
// deleted, and the way to Ledger, Places from a job with no place to tie it to.
const ledgerHooks = {
onAdded(info) {
// W2: with the what-changed card on show (Overview) the toast is one short line; from another tab the card is
// the confirmation.
const change = currentChange();
if (change && tab === 'overview' && !packetOpen()) {
showToast(COPY.addedSeeChanged);
return;
}
if (change) {
showChangeToast(change);
return;
}
const kept = keptSoFar();
const line = COPY.addedLine(info.amountText, COPY.addKindWords[info.kind], info.name);
showToast(kept === null ? line : `${line} ${COPY.addedKept(kept)}`);
},
onChanged(text) {
showToast(text);
},
toPlaces() {
go('ledger', 'places', 'locations-title');
}
};
function render() {
setText('workspace-summary', COPY.workspaceSummary(workspace.transactions.length, workspace.locations.length));
if (document.activeElement !== byId('workspace-name')) byId('workspace-name').value = workspace.name;
byId('tax-year').value = String(workspace.settings.taxYear);
byId('filing-status').value = workspace.settings.filingStatus;
for (const [id, key] of PRIOR_YEAR_FIELDS) {
const input = byId(id);
if (document.activeElement !== input) input.value = centsToDollars(workspace.settings[key]);
}
// V2: the unsaved state is a dot on Save (and on More, where a phone keeps Save).
byId('unsaved-indicator').hidden = !dirty;
byId('more-dot').hidden = !dirty;
// The names are set outright ("Save, unsaved changes"): a name built from the button's content gains a stray space at the dot.
// On a phone Save is inside More, so More carries the dot and the words.
for (const [id, label, marked] of [['save-button', COPY.save, dirty], ['more-button', COPY.more, dirty && PHONE.matches]]) {
if (marked) byId(id).setAttribute('aria-label', `${label}${COPY.unsaved}`);
else byId(id).removeAttribute('aria-label');
}
byId('example-banner').hidden = !isDemo(workspace);
// W1: the banner counts the entries the figures are computed from, so it moves with every add.
setText('example-banner-text', COPY.exampleBanner(COPY.fmtCount(entryCount(workspace, workspace.settings.taxYear))));
if (workspace.settings.priorYearTaxCents !== null || workspace.settings.priorYearAgiCents !== null) byId('settings-optional').open = true;
// Each tab's content. Every tab is kept drawn (a hidden tab's figures are current the moment it is shown), but on
// first load only the tab on show is drawn before the first paint; the other four follow at once.
const draw = {
overview() {
// D3: an empty workspace of your own opens on the Quick estimate card, at the top of Overview.
// V7: it is a sheet over the dimmed view.
const quickOpen = !quickDismissed && workspace.locations.length === 0 && workspace.transactions.length === 0;
const sheet = byId('quick-sheet');
if (quickOpen) {
renderQuick(byId('quick-section'), workspace, todayIso(), quickHandlers);
if (!sheet.open) showDialog(sheet);
} else if (sheet.open) {
sheet.close();
}
renderOverview(byId('overview-body'), workspace, RATE_ROWS, CONSTANTS, todayIso(), shellHandlers);
},
ledger() {
renderLocations(byId('locations-section'), workspace, commit);
renderLedger(byId('ledger-section'), workspace, commit, todayIso(), ledgerHooks);
},
taxes() {
renderTaxSummary(byId('tax-section'), workspace, RATE_ROWS, CONSTANTS, todayIso(), { openPacket, math: mathRow });
},
// The set-aside run, the tax jar and the What if panels.
plan: renderPlan,
// The rate table, Assumptions and About are drawn while they are on show (renderRoute).
rates() {}
};
if (firstRenderDone) {
for (const t of TABS) draw[t]();
} else {
draw[tab]();
const rest = TABS.filter((t) => t !== tab);
setTimeout(() => {
for (const t of rest) draw[t]();
decorateTips();
}, 0);
}
renderRoute();
decorateTips();
if (!firstRenderDone) {
firstRenderDone = true;
performance.mark('first-render');
}
}
function renderPlan() {
renderPlanIntro(byId('plan-body'), workspace, RATE_ROWS, CONSTANTS, todayIso(), shellHandlers);
renderJar(byId('jar-section'), workspace, RATE_ROWS, CONSTANTS, todayIso(), commit, withShare);
renderQuarterly(byId('plan-quarterly'), workspace, RATE_ROWS, CONSTANTS, todayIso(), shellHandlers);
renderQuant(byId('quant-section'), workspace, RATE_ROWS, CONSTANTS, commit, todayIso(),
{ proof: proofChart, context: (parent, stepCents, row) => contextChart(parent, workspace, RATE_ROWS, CONSTANTS, stepCents, row) });
decorateTips();
}
// ---- WO-11 J5: jargon tips ----
// Any element marked data-tip="<key>" gets a small "?" button after its text; the button opens the one-sentence
// explanation (COPY.tips) in place. A label's tip goes after the label, so a click on it does not move focus to
// the label's control. Enter and Space toggle it (it is a button); Escape closes it.
let tipSeq = 0;
function decorateTips() {
for (const host of document.querySelectorAll('[data-tip]')) {
const isLabel = host.tagName === 'LABEL';
const has = isLabel ? host.nextElementSibling && host.nextElementSibling.classList.contains('tip') : host.querySelector(':scope > .tip');
const tip = COPY.tips[host.getAttribute('data-tip')];
if (has || !tip) continue;
tipSeq += 1;
const wrap = document.createElement('span');
wrap.className = 'tip';
const button = document.createElement('button');
button.type = 'button';
button.className = 'tip-button';
button.textContent = '?';
button.setAttribute('aria-label', COPY.tipButton(tip.term));
button.setAttribute('aria-expanded', 'false');
button.setAttribute('aria-controls', `tip-${tipSeq}`);
button.setAttribute('data-tip-key', host.getAttribute('data-tip'));
const text = document.createElement('span');
text.id = `tip-${tipSeq}`;
text.className = 'tip-text';
text.setAttribute('role', 'note');
text.hidden = true;
text.textContent = tip.text;
wrap.appendChild(button);
wrap.appendChild(text);
if (isLabel) host.after(wrap);
else host.appendChild(wrap);
}
}
function toggleTip(button, open) {
const text = document.getElementById(button.getAttribute('aria-controls'));
if (!text) return;
const show = open === undefined ? text.hidden : open;
text.hidden = !show;
button.setAttribute('aria-expanded', String(show));
}
// ---- WO-13 V2: routing ----
// '#ledger/places' -> { tab: 'ledger', sub: 'places' }; a tab with no sub named gets its first; anything else -> null.
function parseRoute(hash) {
const [t, s] = String(hash || '').replace(/^#/, '').split('/');
if (!TABS.includes(t)) return null;
const subs = SUBS[t];
return { tab: t, sub: subs ? (subs.includes(s) ? s : subs[0]) : null };
}
function routeHash() {
const subs = SUBS[tab];
return subs && sub[tab] !== subs[0] ? `#${tab}/${sub[tab]}` : `#${tab}`;
}
function packetOpen() {
return tab === 'taxes' && sub.taxes === 'packet';
}
// Puts the current place on screen: one tab panel and, inside it, one sub-section. Everything else is hidden.
function applyRoute() {
for (const t of TABS) {
byId(`panel-${t}`).hidden = t !== tab;
if (t === tab) byId(`tab-${t}`).setAttribute('aria-current', 'page');
else byId(`tab-${t}`).removeAttribute('aria-current');
}
for (const t of Object.keys(SUBS)) {
for (const s of SUBS[t]) {
byId(`sub-${t}-${s}`).hidden = s !== sub[t];
const seg = byId(`seg-${t}-${s}`);
if (seg) seg.setAttribute('aria-pressed', String(s === sub[t]));
}
}
document.body.classList.toggle('packet-mode', packetOpen());
if (!packetOpen()) byId('packet-body').textContent = '';
closeMore();
// W2: the confirmation card gives way to the Overview's own.
if (tab === 'overview' && byId('toast').classList.contains('toast-card')) hideToast();
}
// The parts drawn only while they are on screen: the rate table, Assumptions, About and the CPA packet.
function renderRoute() {
if (packetOpen()) renderPacket(byId('packet-body'), workspace, RATE_ROWS, CONSTANTS, todayIso());
if (tab !== 'rates') return;
if (sub.rates === 'rates') renderRates(byId('rates-body'), workspace, RATE_ROWS);
if (sub.rates === 'assumptions') renderAssumptions(byId('assumptions-body'), CONSTANTS, () => go('rates', 'rates', 'rates-title'), FACTS);
if (sub.rates === 'about') renderCredits(byId('credits-body'), testSummary(), RATE_TABLE_META.districtCount);
}
function focusHeading(id) {
const heading = byId(id);
if (!heading) return;
heading.setAttribute('tabindex', '-1');
heading.scrollIntoView();
heading.focus();
}
// Goes to a tab (and a sub-section of it; without one, the sub-section last shown there). The page scrolls to its top
// unless a heading is named, which then takes focus. Leaving Taxes closes the packet.
function go(t, s, focusId) {
tab = t;
if (SUBS[t]) sub[t] = s || (t === 'taxes' ? 'summary' : sub[t]);
if (t !== 'taxes') sub.taxes = 'summary';
const hash = routeHash();
if (window.location.hash !== hash) window.location.hash = hash;
applyRoute();
renderRoute();
window.scrollTo(0, 0);
if (focusId) focusHeading(focusId);
}
// Back, Forward and a hand-edited address: the hash names the place.
function onHashChange() {
const r = parseRoute(window.location.hash) || { tab: 'overview', sub: null };
if (r.tab === tab && (!SUBS[r.tab] || r.sub === sub[r.tab])) return;
tab = r.tab;
if (r.sub) sub[r.tab] = r.sub;
if (tab !== 'taxes') sub.taxes = 'summary';
applyRoute();
renderRoute();
window.scrollTo(0, 0);
}
// ---- WO-13 V2: the More menu ----
function closeMore() {
// Focus leaves the menu before it hides, so a dialog opened from one of its entries returns focus to More.
if (byId('more-menu').contains(document.activeElement)) byId('more-button').focus();
byId('more-menu').hidden = true;
byId('more-button').setAttribute('aria-expanded', 'false');
}
function toggleMore() {
const open = byId('more-menu').hidden;
byId('more-menu').hidden = !open;
byId('more-button').setAttribute('aria-expanded', String(open));
}
// Every body cell carries its column's heading, which CSS shows beside the value when a table stacks into cards on a
// phone; the explicit roles keep the table a table for assistive technology once its rows are blocks.
function labelTables() {
for (const table of document.querySelectorAll('table:not(.packet-frame)')) {
const heads = Array.from(table.querySelectorAll('thead th')).map((th) => th.textContent);
if (heads.length === 0) continue;
table.setAttribute('role', 'table');
for (const group of table.querySelectorAll('thead, tbody')) group.setAttribute('role', 'rowgroup');
for (const tr of table.rows) {
tr.setAttribute('role', 'row');
for (const cell of tr.cells) {
const inHead = tr.parentNode.tagName === 'THEAD';
cell.setAttribute('role', inHead ? 'columnheader' : cell.tagName === 'TH' ? 'rowheader' : 'cell');
if (!inHead && cell.colSpan === 1 && heads[cell.cellIndex] !== undefined) cell.setAttribute('data-label', heads[cell.cellIndex]);
}
}
}
}
function announce(text) {
setText('status', text);
}
function localDateIso(d) {
const pad = (n) => String(n).padStart(2, '0');
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
}
// "Today" for as-of dates: the local date, or window.__kyltToday when an e2e test sets it. ui is the only module that
// reads the clock; pure modules get this ISO string as an argument.
function todayIso() {
const hook = window.__kyltToday;
return typeof hook === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(hook) ? hook : localDateIso(new Date());
}
// The test figure the build inlined from prompts/test-summary.json, or null.
function testSummary() {
const node = document.getElementById('test-summary');
if (!node) return null;
try {
return JSON.parse(node.textContent);
} catch (e) {
return null;
}
}
// The CPA packet is a view of its own inside Taxes; it opens at its top with focus on Print (J6: focus moves without
// scrolling, so the heading stays below the bar on a phone).
function openPacket() {
go('taxes', 'packet');
byId('packet-print').focus({ preventScroll: true });
}
function closePacket() {
go('taxes', 'summary');
byId('packet-button').focus();
}
// ---- disclaimer ----
// R6: shown on first load until Continue; acceptance remembered under kylt.disclaimerAccepted.v1 when storage works,
// otherwise shown on every open.
function disclaimerAccepted() {
try {
return window.localStorage.getItem(DISCLAIMER_STORAGE_KEY) === '1';
} catch (e) {
return false;
}
}
// Safari does not focus a button when it is clicked, so the control last clicked is remembered too.
let lastClicked = null;
// Opens a modal dialog and returns focus to the control that opened it when it closes. An entry of the More menu hands
// focus back to More; a choice in the "Use my numbers" sheet hands it back to that button.
function showDialog(dialog) {
if (dialog.open) return;
let opener = document.activeElement && document.activeElement !== document.body ? document.activeElement : lastClicked;
if (opener && opener.closest('#more-menu')) opener = byId('more-button');
if (opener && opener.closest('#start-sheet')) opener = byId('use-my-numbers');
dialog.addEventListener('close', () => {
if (opener && opener !== document.body && document.contains(opener)) opener.focus();
}, { once: true });
dialog.showModal();
}
// J1: the dialog opens on its two short paragraphs; from the footer's "Read the full disclaimer" it opens expanded.
function openDisclaimer(full) {
byId('disclaimer-more').open = full === true;
showDialog(byId('disclaimer-dialog'));
}
function acceptDisclaimer() {
try {
window.localStorage.setItem(DISCLAIMER_STORAGE_KEY, '1');
} catch (e) {
// Storage can be unavailable on file: pages; the dialog then shows again on the next load.
}
byId('disclaimer-dialog').close();
}
// ---- save ----
// R2: Save button and Ctrl+S / Cmd+S both download the work as a .kyledger.json file (Blob + object URL + <a download>).
function saveWorkspace() {
const now = new Date();
const savedAt = now.toISOString();
// The file is now written by this version, so a reopened file isn't remapped again (io.migrate, line 27a).
const text = serialize(Object.assign({}, workspace, { appVersion: APP_VERSION }), savedAt);
const fileName = suggestedFileName(localDateIso(now));
const url = URL.createObjectURL(new Blob([text], { type: SAVE_MIME }));
const a = document.createElement('a');
a.href = url;
a.download = fileName;
a.hidden = true;
document.body.appendChild(a);
a.click();
a.remove();
setTimeout(() => URL.revokeObjectURL(url), 0);
workspace = Object.assign({}, workspace, { appVersion: APP_VERSION, savedAt: savedAt });
dirty = false;
announce(COPY.saved(fileName));
render();
}
// ---- open ----
// R2: open by file picker or drag-and-drop; File.text() then io.parse; a bad file leaves the work untouched (R4).
// V7: a file that cannot be opened says why in a sheet; the work on screen is untouched.
function showFileError(fileName, field, code) {
setText('file-error', `${COPY.fileErrorLead(fileName, field)} ${COPY.fileErrors[code]} ${COPY.workUnchanged}`);
announce('');
showDialog(byId('file-error-dialog'));
}
function clearFileError() {
setText('file-error', '');
if (byId('file-error-dialog').open) byId('file-error-dialog').close();
}
// skipQuick: "Start empty" goes straight to Ledger, Places; otherwise an empty workspace opens on the Quick estimate.
function applyOpened(next, fileName, skipQuick) {
workspace = next;
lastValues.clear();
resetMotion();
resetTryRow();
mathOpen.clear();
lastChange = null;
hideToast();
dirty = false;
quickDismissed = skipQuick === true;
clearFileError();
announce(fileName === null ? COPY.startedOwn : COPY.opened(fileName, next.transactions.length, next.locations.length));
render();
if (skipQuick === true) {
go('ledger', 'places', 'locations-title');
return;
}
go('overview');
// D3: "Quick estimate" lands on the Quick estimate card.
if (fileName === null && byId('quick-sheet').open) byId('quick-title').focus();
}
// ---- WO-10 D3: quick estimate ----
let quickDismissed = false;
const quickHandlers = {
// "Show my numbers": the built workspace becomes the work on screen, shown on Overview.
show(next) {
commit(next);
announce(COPY.quickBuilt(next.locations.length));
go('overview', null, 'screen1-headline');
},
// "Enter everything myself": the card steps aside for this workspace.
skip() {
quickDismissed = true;
render();
go('ledger', 'places', 'locations-title');
}
};
// ---- WO-11 J3: one set-aside run (Q5), shared by the tour and the tax jar ----
// Q5 runs after the screen has painted, never during a render, and is kept until what it depends on changes: the
// ledger, the locations, the hand-entered rates and four settings. Payments, the savings balance and the name don't
// touch it. Everyone who asks while a run is waiting gets the same result.
let q5Cache = null;
let q5Pending = null;
function q5Same(a, w) {
const s = w.settings;
return a !== null && a.transactions === w.transactions && a.locations === w.locations && a.customRates === w.customRates && a.seed === w.seed &&
a.key === [s.taxYear, s.filingStatus, s.itemizedOverrideCents, s.residentCountyId, s.bootstrapDraws, s.setAsideConfidence].join('|');
}
function q5Tag(w) {
const s = w.settings;
return { transactions: w.transactions, locations: w.locations, customRates: w.customRates, seed: w.seed,
key: [s.taxYear, s.filingStatus, s.itemizedOverrideCents, s.residentCountyId, s.bootstrapDraws, s.setAsideConfidence].join('|') };
}
// onReady(result) at once when the run is kept (returns true), else after it has run. onUnsupported: the filing status
// is one this version does not compute.
function withQ5(onReady, onUnsupported) {
const w = workspace;
if (q5Same(q5Cache, w)) {
onReady(q5Cache.value);
return true;
}
if (q5Same(q5Pending, w)) {
q5Pending.waiters.push([onReady, onUnsupported]);
return false;
}
const pending = q5Pending = Object.assign(q5Tag(w), { waiters: [[onReady, onUnsupported]] });
setTimeout(() => {
if (q5Pending !== pending) return;
q5Pending = null;
let value;
try {
value = bootstrapSetAside(w, w.settings.taxYear, RATE_ROWS, CONSTANTS, w.seed,
{ draws: w.settings.bootstrapDraws, confidence: w.settings.setAsideConfidence });
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
for (const [, unsupported] of pending.waiters) if (unsupported) unsupported();
return;
}
q5Cache = Object.assign(q5Tag(w), { value });
for (const [ready] of pending.waiters) ready(value);
}, 0);
return false;
}
// J7: the same for next year's plan (quant.planNextYear), kept on the same terms as the set-aside run.
let planCache = null;
let planPending = null;
function withPlan(onReady, onUnsupported) {
const w = workspace;
if (q5Same(planCache, w)) {
onReady(planCache.value);
return true;
}
if (q5Same(planPending, w)) {
planPending.waiters.push([onReady, onUnsupported]);
return false;
}
const pending = planPending = Object.assign(q5Tag(w), { waiters: [[onReady, onUnsupported]] });
setTimeout(() => {
if (planPending !== pending) return;
planPending = null;
let value;
try {
value = planNextYear(w, w.settings.taxYear, RATE_ROWS, CONSTANTS, w.seed,
{ draws: w.settings.bootstrapDraws, confidence: w.settings.setAsideConfidence });
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
for (const [, unsupported] of pending.waiters) if (unsupported) unsupported();
return;
}
planCache = Object.assign(q5Tag(w), { value });
for (const [ready] of pending.waiters) ready(value);
}, 0);
return false;
}
// The set-aside share in use: Q5's, or (with no earlier month to resample) the year's total over the year's receipts;
// null when neither exists.
function withShare(onReady) {
const w = workspace;
const plain = () => {
try {
return combined(w, w.settings.taxYear, RATE_ROWS, CONSTANTS).setAsideShareOfGross;
} catch (e) {
if (!(e && e.message === 'unsupportedFilingStatus')) throw e;
return null;
}
};
withQ5((v) => onReady(v.setAsideShare === null ? plain() : v.setAsideShare), () => onReady(null));
}
const shellHandlers = {
withQ5(onReady, onUnsupported) {
return withQ5(onReady, onUnsupported);
},
withPlan(onReady, onUnsupported) {
return withPlan(onReady, onUnsupported);
},
// "Why these dates" opens Assumptions.
whyTheseDates() {
go('rates', 'assumptions', 'assumptions-title');
},
// W4: an office row's chevron and detail.
math: mathRow,
// W5: the trust card's counts, none of them typed: the rate table's jurisdictions, the worked examples of the test
// summary the build inlined (null without one), and the places the table leaves out, by name.
trustFacts() {
const summary = testSummary();
return { offices: RATE_TABLE_META.districtCount, examples: summary && Number.isInteger(summary.golden) ? summary.golden : null,
leftOut: RATE_TABLE_META.droppedDistricts.map((id) => COPY.droppedNames[id] || id) };
},
// W5: "Show the math": Taxes, with the first local office's row opened.
showMath() {
go('taxes');
const first = document.querySelector('#tax-local-table tbody tr[data-district-id] button.math-toggle');
if (!first) return;
if (first.getAttribute('aria-expanded') !== 'true') first.click();
first.focus({ preventScroll: true });
first.scrollIntoView({ block: 'center' });
},
// W2: the what-changed card, drawn under the hero while the last add is the last thing that happened.
changedCard(parent) {
const change = currentChange();
if (change) renderChanged(parent, change, 'changed', 'card changed-card', dismissChange);
},
// W1: the Overview's try-it row: a job through the ledger's own path. Null, or the problem in words. WO-15 X3: dated
// today, except in the example, where it takes the ledger's last date of the year (the + Add sheet keeps today).
addJob(amountText, locationId) {
const last = isDemo(workspace) ? exampleJobDate(workspace) : null;
return addJobDirect(amountText, locationId, last || todayIso());
},
// D3: the quick-estimate banner's link.
toLedger() {
go('ledger', 'entries', 'ledger-title');
},
// V3: the Overview's links. A What if panel is opened by its own tab.
toRates() {
go('rates', 'rates', 'rates-title');
},
toWhatIf(key) {
go('plan');
const whatIfTab = byId(`whatif-tab-${key}`);
if (!whatIfTab) return;
whatIfTab.click();
whatIfTab.scrollIntoView();
whatIfTab.focus();
},
// The empty Overview's way back to the Quick estimate.
quick() {
quickDismissed = false;
render();
if (byId('quick-sheet').open) byId('quick-title').focus();
}
};
// ---- U1: the demo fixture and "Start with my own data" ----
// The demo: every location was placed by the fixture. Any other workspace is the user's own.
function isDemo(w) {
return w.locations.length > 0 && w.locations.every((l) => l.confirmedBy === 'fixture');
}
function freshWorkspace() {
return emptyWorkspace({ seed: crypto.getRandomValues(new Uint32Array(1))[0] });
}
// Replaces the workspace with an empty one; unsaved changes first go through the Replace / Keep dialog.
function startOwn(skipQuick) {
if (dirty) {
pendingOpen = { workspace: freshWorkspace(), fileName: null, skipQuick: skipQuick === true };
setText('replace-body', COPY.startOwnReplaceBody);
showDialog(byId('replace-dialog'));
return;
}
applyOpened(freshWorkspace(), null, skipQuick === true);
}
async function openFile(file) {
if (file.size > MAX_FILE_BYTES) {
showFileError(file.name, '(file)', 'tooLarge');
return;
}
let text;
try {
text = await file.text();
} catch (e) {
showFileError(file.name, '(file)', 'json');
return;
}
const result = parse(text);
if (!result.ok) {
showFileError(file.name, result.field, result.code);
return;
}
if (dirty) {
pendingOpen = { workspace: result.workspace, fileName: file.name };
setText('replace-body', COPY.replaceBody);
showDialog(byId('replace-dialog'));
return;
}
applyOpened(result.workspace, file.name);
}
function resolveReplace(replace) {
const pending = pendingOpen;
pendingOpen = null;
byId('replace-dialog').close();
if (replace && pending && pending.example) applyExample(pending.workspace);
else if (replace && pending) applyOpened(pending.workspace, pending.fileName, pending.skipQuick);
}
// ---- WO-11 J1: back to the example ----
// "See the example" loads the demo again, from its first screen; unsaved work first goes through the Replace / Keep dialog.
function seeExample() {
const demo = JSON.parse(JSON.stringify(DEMO_WORKSPACE));
if (dirty) {
pendingOpen = { workspace: demo, fileName: null, example: true };
setText('replace-body', COPY.seeExampleReplaceBody);
showDialog(byId('replace-dialog'));
return;
}
applyExample(demo);
}
function applyExample(demo) {
workspace = demo;
lastValues.clear();
resetMotion();
resetTryRow();
mathOpen.clear();
lastChange = null;
hideToast();
dirty = false;
quickDismissed = false;
clearFileError();
announce(COPY.openedExample);
render();
go('overview', null, 'screen1-headline');
}
// ---- setup ----
function fillSelect(select, values, labelOf) {
for (const v of values) {
const option = document.createElement('option');
option.value = String(v);
option.textContent = labelOf(v);
select.appendChild(option);
}
}
// J6: the mark, drawn from COPY.brandMark. Decorative: the name beside it is the label.
function brandMark() {
const NS = 'http://www.w3.org/2000/svg';
const s = document.createElementNS(NS, 'svg');
s.setAttribute('class', 'brand-mark');
s.setAttribute('viewBox', COPY.brandMark.viewBox);
s.setAttribute('aria-hidden', 'true');
s.setAttribute('focusable', 'false');
for (const [cls, d] of [['mark-first', COPY.brandMark.first], ['mark-second', COPY.brandMark.second]]) {
const path = s.appendChild(document.createElementNS(NS, 'path'));
path.setAttribute('class', cls);
path.setAttribute('d', d);
}
return s;
}
function setupText() {
document.title = COPY.pageTitle;
setText('app-name', COPY.productName);
byId('brand-mark').appendChild(brandMark());
setText('tabs-label', COPY.navLabel);
for (const t of TABS) setText(`tab-${t}`, COPY.tabs[t]);
for (const s of SUBS.ledger) setText(`seg-ledger-${s}`, COPY.ledgerSegments[s]);
for (const s of SUBS.rates) setText(`seg-rates-${s}`, COPY.ratesSegments[s]);
setText('add-button', COPY.add);
setText('save-label', COPY.save);
setText('unsaved-text', COPY.unsaved);
setText('more-dot-text', COPY.unsaved);
byId('save-button').title = COPY.saveShortcutHint;
setText('more-label', COPY.more);
setText('more-save', COPY.save);
setText('open-button', COPY.moreItems.open);
setText('start-own', COPY.moreItems.startEmpty);
setText('see-example', COPY.moreItems.seeExample);
setText('more-packet', COPY.moreItems.printPacket);
setText('more-disclaimer', COPY.moreItems.disclaimer);
setText('save-shortcut-hint', COPY.saveShortcutHint);
setText('use-my-numbers', COPY.useMyNumbers);
setText('start-sheet-title', COPY.useMyNumbers);
setText('start-quick', COPY.startSheet.quick);
setText('start-empty', COPY.startSheet.empty);
setText('start-open', COPY.startSheet.open);
setText('start-cancel', COPY.startSheet.cancel);
setText('open-drop-hint', COPY.openDrop);
setText('settings-optional-summary', COPY.settingsOptional);
setText('import-heading', COPY.importTitle);
setText('import-intro', COPY.importIntro);
setText('import-button', COPY.importButton);
setText('rates-title', COPY.rateBrowserTitle);
setText('assumptions-title', COPY.assumptionsHeading);
setText('credits-title', COPY.creditsTitle);
setText('packet-title', COPY.packetTitle);
setText('packet-print', COPY.packetPrint);
setText('packet-close', COPY.packetClose);
setText('settings-title', COPY.settingsTitle);
setText('workspace-name-label', COPY.settingsNameLabel);
setText('tax-year-label', COPY.taxYearLabel);
setText('filing-status-label', COPY.filingStatusLabel);
setText('prior-year-tax-label', COPY.priorYearTaxLabel);
setText('prior-year-agi-label', COPY.priorYearAgiLabel);
setText('prior-year-error', COPY.priorYearInvalid);
setText('footer-text', COPY.footer);
setText('footer-privacy', COPY.footerPrivacy);
setText('privacy-text', COPY.privacy);
setText('footer-disclaimer-button', COPY.footerDisclaimerShort);
setText('disclaimer-title', COPY.disclaimerTitle);
setText('disclaimer-full', COPY.disclaimerFull);
setText('disclaimer-short-1', COPY.disclaimerShort[0]);
setText('disclaimer-short-2', COPY.disclaimerShort[1]);
setText('disclaimer-more-summary', COPY.disclaimerMore);
setText('disclaimer-continue', COPY.disclaimerContinue);
setText('replace-title', COPY.replaceTitle);
setText('file-error-title', COPY.fileErrorTitle);
setText('file-error-ok', COPY.fileErrorOk);
setText('replace-body', COPY.replaceBody);
setText('replace-confirm', COPY.replaceConfirm);
setText('replace-cancel', COPY.replaceCancel);
}
function setupControls() {
const taxYear = byId('tax-year');
fillSelect(taxYear, TAX_YEARS, (y) => String(y));
taxYear.addEventListener('change', () => commit(reduce(workspace, { type: 'settings/set', key: 'taxYear', value: Number(taxYear.value) })));
const filingStatus = byId('filing-status');
fillSelect(filingStatus, FILING_STATUSES, (s) => (UNSUPPORTED_STATUSES.includes(s)
? `${COPY.filingStatus[s]} (${COPY.filingStatusUnsupported})` : COPY.filingStatus[s]));
for (const option of filingStatus.options) option.disabled = UNSUPPORTED_STATUSES.includes(option.value);
filingStatus.addEventListener('change', () => commit(reduce(workspace, { type: 'settings/set', key: 'filingStatus', value: filingStatus.value })));
// Q3: prior-year federal figures write the existing priorYearTaxCents / priorYearAgiCents settings (schema unchanged).
for (const [id, key] of PRIOR_YEAR_FIELDS) {
byId(id).addEventListener('change', () => {
const cents = dollarsToCents(byId(id).value);
byId('prior-year-error').hidden = cents !== undefined;
if (cents !== undefined) commit(reduce(workspace, { type: 'settings/set', key, value: cents }));
});
}
byId('save-button').addEventListener('click', saveWorkspace);
byId('more-save').addEventListener('click', () => {
closeMore();
saveWorkspace();
});
// J3: the workspace's name (schema 2), set from Settings.
byId('workspace-name').addEventListener('change', () => commit(reduce(workspace, { type: 'name/set', name: byId('workspace-name').value })));
// V2: the five tabs are links to their hash; a plain click switches at once.
for (const t of TABS) {
byId(`tab-${t}`).addEventListener('click', (e) => {
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.button !== 0) return;
e.preventDefault();
go(t);
});
}
for (const t of ['ledger', 'rates']) {
for (const s of SUBS[t]) byId(`seg-${t}-${s}`).addEventListener('click', () => go(t, s));
}
window.addEventListener('hashchange', onHashChange);
PHONE.addEventListener('change', render);
// + Add: the add-entry sheet, on whatever tab is on show.
byId('add-button').addEventListener('click', () => openAddSheet('job', byId('add-button')));
byId('import-button').addEventListener('click', () => openImportDialog(workspace, commit));
byId('more-button').addEventListener('click', toggleMore);
document.addEventListener('click', (e) => {
lastClicked = e.target instanceof Element ? e.target.closest('button, a, summary') : null;
}, true);
document.addEventListener('click', (e) => {
if (!byId('more-menu').hidden && e.target instanceof Element && !e.target.closest('.more')) closeMore();
});
// Tables are labelled as soon as their rows change (labelTables changes attributes only, which are not observed).
new MutationObserver((records) => {
labelTables();
noteValues();
motionAfter(records);
}).observe(document.body, { childList: true, subtree: true });
byId('more-packet').addEventListener('click', () => {
closeMore();
openPacket();
});
byId('packet-close').addEventListener('click', closePacket);
byId('start-own').addEventListener('click', () => {
closeMore();
startOwn(true);
});
byId('see-example').addEventListener('click', () => {
closeMore();
seeExample();
});
byId('more-disclaimer').addEventListener('click', () => {
closeMore();
openDisclaimer(true);
});
byId('file-error-ok').addEventListener('click', () => byId('file-error-dialog').close());
// Escape on the quick estimate puts it away for this workspace, as "Enter everything myself" does without leaving the tab.
byId('quick-sheet').addEventListener('close', () => {
if (quickDismissed || workspace.locations.length > 0 || workspace.transactions.length > 0) return;
quickDismissed = true;
render();
});
// The example banner's "Use my numbers": three ways in.
const startSheet = byId('start-sheet');
byId('use-my-numbers').addEventListener('click', () => showDialog(startSheet));
byId('start-cancel').addEventListener('click', () => startSheet.close());
byId('start-quick').addEventListener('click', () => {
startSheet.close();
startOwn(false);
});
byId('start-empty').addEventListener('click', () => {
startSheet.close();
startOwn(true);
});
byId('start-open').addEventListener('click', () => {
startSheet.close();
byId('open-input').click();
});
byId('packet-print').addEventListener('click', () => window.print());
document.addEventListener('click', (e) => {
const button = e.target instanceof Element ? e.target.closest('.tip-button') : null;
if (!button) return;
e.preventDefault();
toggleTip(button);
});
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && e.target instanceof Element && e.target.classList.contains('tip-button')
&& e.target.getAttribute('aria-expanded') === 'true') {
toggleTip(e.target, false);
e.stopPropagation();
return;
}
if (e.key === 'Escape' && !byId('more-menu').hidden) {
closeMore();
byId('more-button').focus();
return;
}
if ((e.ctrlKey || e.metaKey) && !e.altKey && typeof e.key === 'string' && e.key.toLowerCase() === 's') {
e.preventDefault();
saveWorkspace();
}
});
const input = byId('open-input');
byId('open-button').addEventListener('click', () => {
closeMore();
input.click();
});
input.addEventListener('change', () => {
const file = input.files && input.files[0];
input.value = '';
if (file) openFile(file);
});
document.addEventListener('dragover', (e) => e.preventDefault());
document.addEventListener('drop', (e) => {
e.preventDefault();
const files = e.dataTransfer && e.dataTransfer.files;
if (files && files.length === 1) openFile(files[0]);
});
// Escape closes the disclaimer without recording acceptance, so it shows again on the next load.
byId('disclaimer-continue').addEventListener('click', acceptDisclaimer);
byId('footer-disclaimer-button').addEventListener('click', () => openDisclaimer(true));
const replaceDialog = byId('replace-dialog');
replaceDialog.addEventListener('cancel', (e) => {
e.preventDefault();
resolveReplace(false);
});
byId('replace-confirm').addEventListener('click', () => resolveReplace(true));
byId('replace-cancel').addEventListener('click', () => resolveReplace(false));
// R3: unsaved-changes guard (beforeunload + visible indicator).
window.addEventListener('beforeunload', (e) => {
if (dirty) {
e.preventDefault();
e.returnValue = '';
}
});
}
function main() {
// U1: first open shows the Marcus demo, clean (a deep copy, so the embedded fixture is never changed).
workspace = JSON.parse(JSON.stringify(DEMO_WORKSPACE));
dirty = false;
// V2: reload keeps the place.
const route = parseRoute(window.location.hash);
if (route) {
tab = route.tab;
if (route.sub) sub[route.tab] = route.sub;
}
setupText();
setupControls();
applyRoute();
render();
if (!disclaimerAccepted()) openDisclaimer(false);
}
return { main };
})();
ui.main();
</script>
</body>
</html>
Websites this page contacts when it runs — fonts, chart libraries, data. Found by reading its source.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Roland Songer. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.