Pub 946 Compliance
This commit is contained in:
58
server/db.js
58
server/db.js
@@ -358,6 +358,32 @@ function initialize() {
|
||||
updated_at TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- §280F passenger-automobile annual depreciation caps (IRS Rev. Proc., indexed yearly).
|
||||
CREATE TABLE IF NOT EXISTS section_280f_limits (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
pis_year INTEGER NOT NULL UNIQUE,
|
||||
year1_no_bonus REAL NOT NULL DEFAULT 0,
|
||||
year1_bonus REAL NOT NULL DEFAULT 0,
|
||||
year2 REAL NOT NULL DEFAULT 0,
|
||||
year3 REAL NOT NULL DEFAULT 0,
|
||||
year4plus REAL NOT NULL DEFAULT 0,
|
||||
created_at TEXT NOT NULL,
|
||||
updated_at TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- §179 taxable-income limitation: per company+book+year entered income and computed carryover.
|
||||
CREATE TABLE IF NOT EXISTS section_179_carryover (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
entity_id INTEGER REFERENCES entities(id),
|
||||
book_code TEXT NOT NULL DEFAULT 'FEDERAL',
|
||||
tax_year INTEGER NOT NULL,
|
||||
taxable_income REAL,
|
||||
carryover_to_next REAL NOT NULL DEFAULT 0,
|
||||
updated_by INTEGER REFERENCES users(id),
|
||||
updated_at TEXT NOT NULL,
|
||||
UNIQUE(entity_id, book_code, tax_year)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS app_settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
@@ -889,6 +915,17 @@ function migrate() {
|
||||
ensureColumn('gl_account_defaults', 'proceeds_account', 'TEXT');
|
||||
ensureColumn('gl_account_defaults', 'retained_earnings_account', 'TEXT');
|
||||
ensureColumn('entities', 'capitalization_threshold', 'REAL NOT NULL DEFAULT 0');
|
||||
// §280F: flag passenger automobiles subject to the annual luxury-auto depreciation caps.
|
||||
ensureColumn('assets', 'passenger_auto', 'INTEGER NOT NULL DEFAULT 0');
|
||||
// Depreciation-recapture characterization stored on disposals (Form 4797).
|
||||
ensureColumn('disposals', 'recapture_section', 'TEXT');
|
||||
ensureColumn('disposals', 'ordinary_recapture', 'REAL NOT NULL DEFAULT 0');
|
||||
ensureColumn('disposals', 'section_1231_gain', 'REAL NOT NULL DEFAULT 0');
|
||||
ensureColumn('disposals', 'unrecaptured_1250_gain', 'REAL NOT NULL DEFAULT 0');
|
||||
// Refresh stale §179 limits seeded before the 2025 OBBBA increase (only touch the old seed values,
|
||||
// never a figure an administrator has deliberately raised). 2026 per IRS Pub 946 (2025 ed.).
|
||||
run('UPDATE section_179_limits SET base_limit = 2500000, phaseout_threshold = 4000000 WHERE tax_year = 2025 AND base_limit < 2000000');
|
||||
run('UPDATE section_179_limits SET base_limit = 2560000, phaseout_threshold = 4090000 WHERE tax_year = 2026 AND base_limit < 2000000');
|
||||
backfillCompanyScope();
|
||||
}
|
||||
|
||||
@@ -1245,8 +1282,9 @@ function seed() {
|
||||
[2011, 500000, 2000000], [2012, 500000, 2000000], [2013, 500000, 2000000],
|
||||
[2014, 500000, 2000000], [2015, 500000, 2000000], [2016, 500000, 2010000], [2017, 510000, 2030000],
|
||||
[2018, 1000000, 2500000], [2019, 1020000, 2550000], [2020, 1040000, 2590000], [2021, 1050000, 2620000],
|
||||
[2022, 1080000, 2700000], [2023, 1160000, 2890000], [2024, 1220000, 3050000], [2025, 1250000, 3130000],
|
||||
[2026, 1250000, 3130000]
|
||||
[2022, 1080000, 2700000], [2023, 1160000, 2890000], [2024, 1220000, 3050000],
|
||||
// 2025+ reflect the 2025 OBBBA increase; 2026 per IRS Pub 946 (2025 ed.), "What's New for 2026".
|
||||
[2025, 2500000, 4000000], [2026, 2560000, 4090000]
|
||||
];
|
||||
for (const [year, limit, threshold] of section179Limits) {
|
||||
run(
|
||||
@@ -1255,6 +1293,22 @@ function seed() {
|
||||
[year, limit, threshold, createdAt, createdAt]
|
||||
);
|
||||
}
|
||||
// §280F passenger-automobile depreciation caps [year, y1-no-bonus, y1-bonus, y2, y3, y4+]. Published
|
||||
// IRS figures (Rev. Proc. 2023-14 / 2024-13); out-years are estimates — these are editable data.
|
||||
const section280fLimits = [
|
||||
[2022, 11200, 19200, 18000, 10800, 6460],
|
||||
[2023, 12200, 20200, 19500, 11700, 6960],
|
||||
[2024, 12400, 20400, 19800, 11900, 7160],
|
||||
[2025, 12600, 20600, 20200, 12100, 7260],
|
||||
[2026, 12800, 20800, 20600, 12300, 7360]
|
||||
];
|
||||
for (const [year, y1nb, y1b, y2, y3, y4] of section280fLimits) {
|
||||
run(
|
||||
`INSERT OR IGNORE INTO section_280f_limits (pis_year, year1_no_bonus, year1_bonus, year2, year3, year4plus, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
[year, y1nb, y1b, y2, y3, y4, createdAt, createdAt]
|
||||
);
|
||||
}
|
||||
if (!one('SELECT id FROM teams LIMIT 1')) {
|
||||
run('INSERT INTO teams (name, description, created_at) VALUES (?, ?, ?)', [
|
||||
'Finance Operations',
|
||||
|
||||
Reference in New Issue
Block a user