@paro.io/expert-shared-components 1.14.67 → 1.14.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,808 +1,410 @@
1
1
  "use strict";
2
- // Tax Axis Document Field Catalog (frontend)
3
- //
4
- // Single source of truth for field labels and section groupings used by
5
- // DocumentReviewModal. Derived from paro-graphql-api/src/tax-axis/catalog/documentCatalog.ts.
6
- //
7
- // KEEP IN SYNC with the backend catalog when fields are added or renamed.
8
- // Only scalar fields (type: number | string | boolean | date | enum) are
9
- // listed — array/dict fields are skipped as they cannot be inline-edited.
2
+ // documentFieldCatalogper-documentType section/field metadata for the Review modal.
3
+ // Sections group extracted fields into labeled categories (Revenue, Expenses, etc.).
4
+ // Field defs provide human-readable labels and source line references.
5
+ // Built from backend extraction schemas in paro-graphql-api/src/tax-axis/catalog/documentCatalog.ts.
10
6
  Object.defineProperty(exports, "__esModule", { value: true });
11
7
  exports.DOCUMENT_FIELD_CATALOG = void 0;
12
- // ---------------------------------------------------------------------------
13
- // profit_loss
14
- // ---------------------------------------------------------------------------
15
- const PROFIT_LOSS = {
16
- fields: {
17
- total_revenue: { label: "Total Revenue" },
18
- cost_of_goods_sold: { label: "Cost of Goods Sold" },
19
- gross_profit: { label: "Gross Profit", sourceRef: "Computed" },
20
- officer_compensation: { label: "Officer Compensation" },
21
- salaries_wages_staff: { label: "Salaries & Wages (Staff)" },
22
- employee_benefits: { label: "Employee Benefits" },
23
- payroll_taxes_employer: { label: "Payroll Taxes (Employer)" },
24
- employer_retirement_contribution: { label: "Employer Retirement Contribution" },
25
- rent_expense: { label: "Rent / Lease" },
26
- utilities: { label: "Utilities" },
27
- software_subscriptions: { label: "Software & Subscriptions" },
28
- professional_fees: { label: "Professional Fees" },
29
- advertising_marketing: { label: "Advertising & Marketing" },
30
- travel: { label: "Travel" },
31
- business_meals: { label: "Business Meals" },
32
- office_supplies: { label: "Office Supplies" },
33
- insurance_nonhealth: { label: "Insurance (Non-health)" },
34
- repairs_maintenance: { label: "Repairs & Maintenance" },
35
- bank_fees: { label: "Bank Fees" },
36
- contract_labor: { label: "Contract Labor" },
37
- mortgage_interest: { label: "Mortgage Interest" },
38
- property_tax: { label: "Property Tax" },
39
- business_interest_nonmortgage: { label: "Business Interest (Non-mortgage)" },
40
- depreciation_expense: { label: "Depreciation" },
41
- amortization_expense: { label: "Amortization" },
42
- other_expenses: { label: "Other Expenses" },
43
- total_operating_expenses: { label: "Total Operating Expenses" },
44
- net_operating_income: { label: "Net Operating Income" },
45
- income_tax_provision: { label: "Income Tax Provision" },
46
- net_income: { label: "Net Income" },
47
- },
48
- sections: [
49
- {
50
- head: "Revenue",
51
- fields: ["total_revenue", "cost_of_goods_sold", "gross_profit"],
52
- },
53
- {
54
- head: "Compensation & Payroll",
55
- fields: [
56
- "officer_compensation", "salaries_wages_staff", "employee_benefits",
57
- "payroll_taxes_employer", "employer_retirement_contribution",
58
- ],
59
- },
60
- {
61
- head: "Operating Expenses",
62
- fields: [
63
- "rent_expense", "utilities", "software_subscriptions", "professional_fees",
64
- "advertising_marketing", "travel", "business_meals", "office_supplies",
65
- "insurance_nonhealth", "repairs_maintenance", "bank_fees", "contract_labor",
66
- "mortgage_interest", "property_tax", "business_interest_nonmortgage",
67
- "depreciation_expense", "amortization_expense", "other_expenses",
68
- ],
69
- },
70
- {
71
- head: "Summary",
72
- fields: ["total_operating_expenses", "net_operating_income", "income_tax_provision", "net_income"],
73
- },
74
- ],
75
- };
76
- // ---------------------------------------------------------------------------
77
- // balance_sheet
78
- // ---------------------------------------------------------------------------
79
- const BALANCE_SHEET = {
80
- fields: {
81
- cash_and_equivalents: { label: "Cash & Equivalents" },
82
- accounts_receivable: { label: "Accounts Receivable" },
83
- allowance_for_doubtful_accounts: { label: "Allowance for Doubtful Accounts" },
84
- prepaid_expenses: { label: "Prepaid Expenses" },
85
- inventory: { label: "Inventory" },
86
- total_current_assets: { label: "Total Current Assets" },
87
- property_equipment_gross: { label: "Property & Equipment (Gross)" },
88
- accumulated_depreciation: { label: "Accumulated Depreciation" },
89
- property_equipment_net: { label: "Property & Equipment (Net)" },
90
- intangible_assets_gross: { label: "Intangible Assets (Gross)" },
91
- accumulated_amortization: { label: "Accumulated Amortization" },
92
- intangible_assets_net: { label: "Intangible Assets (Net)" },
93
- security_deposits_held_as_asset: { label: "Security Deposits (Asset)" },
94
- total_assets: { label: "Total Assets" },
95
- accounts_payable: { label: "Accounts Payable" },
96
- accrued_liabilities: { label: "Accrued Liabilities" },
97
- deferred_revenue: { label: "Deferred Revenue" },
98
- short_term_debt: { label: "Short-term Debt" },
99
- long_term_debt_current_portion: { label: "Long-term Debt (Current Portion)" },
100
- total_current_liabilities: { label: "Total Current Liabilities" },
101
- long_term_debt: { label: "Long-term Debt" },
102
- total_liabilities: { label: "Total Liabilities" },
103
- common_stock_par_value: { label: "Common Stock (Par Value)" },
104
- additional_paid_in_capital: { label: "Additional Paid-in Capital" },
105
- retained_earnings: { label: "Retained Earnings" },
106
- aaa_balance: { label: "AAA Balance" },
107
- owners_equity: { label: "Owner's Equity" },
108
- total_equity: { label: "Total Equity" },
109
- total_liabilities_and_equity: { label: "Total Liabilities & Equity" },
110
- },
111
- sections: [
112
- {
113
- head: "Current Assets",
114
- fields: [
115
- "cash_and_equivalents", "accounts_receivable", "allowance_for_doubtful_accounts",
116
- "prepaid_expenses", "inventory", "total_current_assets",
117
- ],
118
- },
119
- {
120
- head: "Fixed & Other Assets",
121
- fields: [
122
- "property_equipment_gross", "accumulated_depreciation", "property_equipment_net",
123
- "intangible_assets_gross", "accumulated_amortization", "intangible_assets_net",
124
- "security_deposits_held_as_asset", "total_assets",
125
- ],
126
- },
127
- {
128
- head: "Liabilities",
129
- fields: [
130
- "accounts_payable", "accrued_liabilities", "deferred_revenue",
131
- "short_term_debt", "long_term_debt_current_portion", "total_current_liabilities",
132
- "long_term_debt", "total_liabilities",
133
- ],
134
- },
135
- {
136
- head: "Equity",
137
- fields: [
138
- "common_stock_par_value", "additional_paid_in_capital", "retained_earnings",
139
- "aaa_balance", "owners_equity", "total_equity", "total_liabilities_and_equity",
140
- ],
141
- },
142
- ],
143
- };
144
- // ---------------------------------------------------------------------------
145
- // federal_tax_return (1120S / 1065 / 1120 / Schedule C)
146
- // ---------------------------------------------------------------------------
147
- const FEDERAL_TAX_RETURN = {
148
- fields: {
149
- entity_tax_classification: { label: "Entity Classification" },
150
- ein: { label: "EIN" },
151
- date_incorporated: { label: "Date Incorporated" },
152
- total_assets: { label: "Total Assets" },
153
- accounting_method_box: { label: "Accounting Method" },
154
- industry_naics: { label: "NAICS Code" },
155
- gross_receipts_L1a: { label: "Gross Receipts", sourceRef: "L1a" },
156
- returns_and_allowances_L1b: { label: "Returns & Allowances", sourceRef: "L1b" },
157
- revenue: { label: "Net Revenue", sourceRef: "L1c" },
158
- cost_of_goods_sold: { label: "Cost of Goods Sold", sourceRef: "L2" },
159
- gross_profit: { label: "Gross Profit", sourceRef: "L3" },
160
- total_income: { label: "Total Income", sourceRef: "L6–L11" },
161
- compensation_of_officers_line: { label: "Compensation of Officers", sourceRef: "L7/L12" },
162
- salaries_wages_line: { label: "Salaries & Wages", sourceRef: "L8/L13" },
163
- repairs_maintenance: { label: "Repairs & Maintenance", sourceRef: "L9/L14" },
164
- rent_expense_line: { label: "Rent", sourceRef: "L11/L16" },
165
- taxes_and_licenses_line: { label: "Taxes & Licenses", sourceRef: "L12/L17" },
166
- interest_expense_line: { label: "Interest Expense", sourceRef: "L13/L18" },
167
- charitable_contributions: { label: "Charitable Contributions", sourceRef: "L19" },
168
- depreciation_line: { label: "Depreciation", sourceRef: "L14/L20" },
169
- advertising_expense: { label: "Advertising", sourceRef: "L16/L22" },
170
- pension_profit_sharing: { label: "Pension / Profit Sharing", sourceRef: "L17/L23" },
171
- employee_benefit_programs: { label: "Employee Benefit Programs", sourceRef: "L18/L24" },
172
- other_deductions_line: { label: "Other Deductions", sourceRef: "L19/L26" },
173
- total_deductions: { label: "Total Deductions", sourceRef: "L20/L27" },
174
- net_income: { label: "Net Income / Ordinary Income", sourceRef: "L21/L28/L30" },
175
- nol_deduction: { label: "NOL Deduction", sourceRef: "L29a" },
176
- total_tax: { label: "Total Tax", sourceRef: "L31" },
177
- estimated_tax_payments: { label: "Estimated Tax Payments", sourceRef: "L32b" },
178
- tax_due_or_overpayment: { label: "Tax Due / Overpayment" },
179
- self_emp_hi: { label: "Self-Employed Health Insurance" },
180
- number_of_k1s_attached: { label: "Number of K-1s Attached" },
181
- },
182
- sections: [
183
- {
184
- head: "Entity Info",
185
- fields: ["entity_tax_classification", "ein", "date_incorporated", "accounting_method_box", "industry_naics"],
186
- },
187
- {
188
- head: "Income",
189
- fields: ["gross_receipts_L1a", "returns_and_allowances_L1b", "revenue", "cost_of_goods_sold", "gross_profit", "total_income", "total_assets"],
190
- },
191
- {
192
- head: "Deductions",
193
- fields: [
194
- "compensation_of_officers_line", "salaries_wages_line", "repairs_maintenance",
195
- "rent_expense_line", "taxes_and_licenses_line", "interest_expense_line",
196
- "charitable_contributions", "depreciation_line", "advertising_expense",
197
- "pension_profit_sharing", "employee_benefit_programs", "other_deductions_line",
198
- "total_deductions",
199
- ],
200
- },
201
- {
202
- head: "Tax Summary",
203
- fields: ["net_income", "nol_deduction", "total_tax", "estimated_tax_payments", "tax_due_or_overpayment", "self_emp_hi", "number_of_k1s_attached"],
204
- },
205
- ],
206
- };
207
- // ---------------------------------------------------------------------------
208
- // w3
209
- // ---------------------------------------------------------------------------
210
- const W3 = {
211
- fields: {
212
- wages_tips_other_compensation_box1: { label: "Wages, Tips & Other Compensation", sourceRef: "Box 1" },
213
- federal_income_tax_withheld_box2: { label: "Federal Income Tax Withheld", sourceRef: "Box 2" },
214
- social_security_wages_box3: { label: "Social Security Wages", sourceRef: "Box 3" },
215
- social_security_tax_withheld_box4: { label: "Social Security Tax Withheld", sourceRef: "Box 4" },
216
- medicare_wages_box5: { label: "Medicare Wages", sourceRef: "Box 5" },
217
- medicare_tax_withheld_box6: { label: "Medicare Tax Withheld", sourceRef: "Box 6" },
218
- social_security_tips_box7: { label: "Social Security Tips", sourceRef: "Box 7" },
219
- allocated_tips_box8: { label: "Allocated Tips", sourceRef: "Box 8" },
220
- dependent_care_benefits_box10: { label: "Dependent Care Benefits", sourceRef: "Box 10" },
221
- nonqualified_plans_box11: { label: "Nonqualified Plans", sourceRef: "Box 11" },
222
- local_wages_box18: { label: "Local Wages", sourceRef: "Box 18" },
223
- local_income_tax_box19: { label: "Local Income Tax", sourceRef: "Box 19" },
224
- employees: { label: "Total Employees", sourceRef: "Box d" },
225
- owner_w2_comp: { label: "Officer / Owner W-2 Compensation", sourceRef: "Box 1 (officers)" },
226
- officer_health_insurance_included: { label: "Officer Health Insurance Included (Code DD)" },
227
- },
228
- sections: [
229
- {
230
- head: "Wages & Withholding",
231
- fields: [
232
- "wages_tips_other_compensation_box1", "federal_income_tax_withheld_box2",
233
- "social_security_wages_box3", "social_security_tax_withheld_box4",
234
- "medicare_wages_box5", "medicare_tax_withheld_box6",
235
- "social_security_tips_box7", "allocated_tips_box8",
236
- ],
237
- },
238
- {
239
- head: "Benefits & Other",
240
- fields: [
241
- "dependent_care_benefits_box10", "nonqualified_plans_box11",
242
- "local_wages_box18", "local_income_tax_box19",
243
- "officer_health_insurance_included",
244
- ],
245
- },
246
- {
247
- head: "Summary",
248
- fields: ["employees", "owner_w2_comp"],
249
- },
250
- ],
251
- };
252
- // ---------------------------------------------------------------------------
253
- // payroll_records
254
- // ---------------------------------------------------------------------------
255
- const PAYROLL_RECORDS = {
256
- fields: {
257
- employees: { label: "Total Employees" },
258
- w2_wages_paid_total: { label: "W-2 Wages Paid (Total)" },
259
- total_federal_withholding: { label: "Federal Income Tax Withheld" },
260
- total_ss_withholding: { label: "Social Security Tax Withheld" },
261
- total_medicare_withholding: { label: "Medicare Tax Withheld" },
262
- employer_fica_match: { label: "Employer FICA Match" },
263
- employer_futa_paid: { label: "Employer FUTA Paid" },
264
- employer_401k_match_total: { label: "Employer 401(k) Match (Total)" },
265
- dependent_care_benefits_paid: { label: "Dependent Care Benefits Paid" },
266
- bonuses_paid_total: { label: "Bonuses Paid (Total)" },
267
- commissions_paid_total: { label: "Commissions Paid (Total)" },
268
- overtime_pay_total: { label: "Overtime Pay (Total)" },
269
- tip_income_reported: { label: "Tip Income Reported" },
270
- taxable_fringe_benefits_total: { label: "Taxable Fringe Benefits (Total)" },
271
- },
272
- sections: [
273
- {
274
- head: "Wages & Withholding",
275
- fields: [
276
- "employees", "w2_wages_paid_total", "total_federal_withholding",
277
- "total_ss_withholding", "total_medicare_withholding", "employer_fica_match",
278
- "employer_futa_paid",
279
- ],
280
- },
281
- {
282
- head: "Benefits & Compensation",
283
- fields: [
284
- "employer_401k_match_total", "dependent_care_benefits_paid",
285
- "bonuses_paid_total", "commissions_paid_total", "overtime_pay_total",
286
- "tip_income_reported", "taxable_fringe_benefits_total",
287
- ],
288
- },
289
- ],
290
- };
291
- // ---------------------------------------------------------------------------
292
- // schedule_k1_s_corp
293
- // ---------------------------------------------------------------------------
294
- const SCHEDULE_K1_S_CORP = {
295
- fields: {
296
- shareholder_ownership_pct: { label: "Shareholder Ownership %" },
297
- ordinary_business_income_L1: { label: "Ordinary Business Income", sourceRef: "L1" },
298
- net_rental_real_estate_income_L2: { label: "Net Rental Real Estate Income", sourceRef: "L2" },
299
- other_net_rental_income_L3: { label: "Other Net Rental Income", sourceRef: "L3" },
300
- interest_income_L4: { label: "Interest Income", sourceRef: "L4" },
301
- ordinary_dividends_L5a: { label: "Ordinary Dividends", sourceRef: "L5a" },
302
- qualified_dividends_L5b: { label: "Qualified Dividends", sourceRef: "L5b" },
303
- royalties_L6: { label: "Royalties", sourceRef: "L6" },
304
- net_short_term_capital_gain_L7: { label: "Net Short-term Capital Gain", sourceRef: "L7" },
305
- net_long_term_capital_gain_L8a: { label: "Net Long-term Capital Gain", sourceRef: "L8a" },
306
- unrecaptured_1250_gain_L8c: { label: "Unrecaptured §1250 Gain", sourceRef: "L8c" },
307
- net_section_1231_gain_L9: { label: "Net §1231 Gain", sourceRef: "L9" },
308
- other_income_L10: { label: "Other Income", sourceRef: "L10" },
309
- section_179_deduction_L11: { label: "§179 Deduction", sourceRef: "L11" },
310
- charitable_contributions_L12A: { label: "Charitable Contributions", sourceRef: "L12A" },
311
- post_1986_depreciation_adjustment_L15A: { label: "Post-1986 Depreciation Adjustment", sourceRef: "L15A" },
312
- tax_exempt_interest_L16A: { label: "Tax-exempt Interest", sourceRef: "L16A" },
313
- other_tax_exempt_income_L16B: { label: "Other Tax-exempt Income", sourceRef: "L16B" },
314
- nondeductible_expenses_L16C: { label: "Nondeductible Expenses", sourceRef: "L16C" },
315
- cash_distributions_L16D: { label: "Cash Distributions", sourceRef: "L16D" },
316
- property_distributions_L16E: { label: "Property Distributions", sourceRef: "L16E" },
317
- qbi_ordinary_income_L17D: { label: "QBI Ordinary Income", sourceRef: "L17D" },
318
- qbi_w2_wages_L17E: { label: "QBI W-2 Wages", sourceRef: "L17E" },
319
- qbi_ubia_L17F: { label: "QBI UBIA of Qualified Property", sourceRef: "L17F" },
320
- health_insurance_2pct_shareholder_L17V: { label: "Health Insurance (2% Shareholder)", sourceRef: "L17V" },
321
- beginning_stock_basis: { label: "Beginning Stock Basis" },
322
- ending_stock_basis: { label: "Ending Stock Basis" },
323
- },
324
- sections: [
325
- {
326
- head: "Ownership",
327
- fields: ["shareholder_ownership_pct", "beginning_stock_basis", "ending_stock_basis"],
328
- },
329
- {
330
- head: "Income & Gains",
331
- fields: [
332
- "ordinary_business_income_L1", "net_rental_real_estate_income_L2", "other_net_rental_income_L3",
333
- "interest_income_L4", "ordinary_dividends_L5a", "qualified_dividends_L5b",
334
- "royalties_L6", "net_short_term_capital_gain_L7", "net_long_term_capital_gain_L8a",
335
- "unrecaptured_1250_gain_L8c", "net_section_1231_gain_L9", "other_income_L10",
336
- ],
337
- },
338
- {
339
- head: "Deductions & Credits",
340
- fields: ["section_179_deduction_L11", "charitable_contributions_L12A", "post_1986_depreciation_adjustment_L15A"],
341
- },
342
- {
343
- head: "QBI & Distributions",
344
- fields: [
345
- "qbi_ordinary_income_L17D", "qbi_w2_wages_L17E", "qbi_ubia_L17F",
346
- "health_insurance_2pct_shareholder_L17V",
347
- "tax_exempt_interest_L16A", "other_tax_exempt_income_L16B",
348
- "nondeductible_expenses_L16C", "cash_distributions_L16D", "property_distributions_L16E",
349
- ],
350
- },
351
- ],
352
- };
353
- // ---------------------------------------------------------------------------
354
- // schedule_k1_partnership
355
- // ---------------------------------------------------------------------------
356
- const SCHEDULE_K1_PARTNERSHIP = {
357
- fields: {
358
- ordinary_business_income_L1: { label: "Ordinary Business Income", sourceRef: "L1" },
359
- net_rental_real_estate_income_L2: { label: "Net Rental Real Estate Income", sourceRef: "L2" },
360
- other_net_rental_income_L3: { label: "Other Net Rental Income", sourceRef: "L3" },
361
- guaranteed_payments_services_L4a: { label: "Guaranteed Payments (Services)", sourceRef: "L4a" },
362
- guaranteed_payments_capital_L4b: { label: "Guaranteed Payments (Capital)", sourceRef: "L4b" },
363
- interest_income_L5: { label: "Interest Income", sourceRef: "L5" },
364
- ordinary_dividends_L6a: { label: "Ordinary Dividends", sourceRef: "L6a" },
365
- qualified_dividends_L6b: { label: "Qualified Dividends", sourceRef: "L6b" },
366
- royalties_L7: { label: "Royalties", sourceRef: "L7" },
367
- net_short_term_capital_gain_L8: { label: "Net Short-term Capital Gain", sourceRef: "L8" },
368
- net_long_term_capital_gain_L9a: { label: "Net Long-term Capital Gain", sourceRef: "L9a" },
369
- unrecaptured_1250_gain_L9c: { label: "Unrecaptured §1250 Gain", sourceRef: "L9c" },
370
- net_section_1231_gain_L10: { label: "Net §1231 Gain", sourceRef: "L10" },
371
- other_income_L11: { label: "Other Income", sourceRef: "L11" },
372
- section_179_deduction_L12: { label: "§179 Deduction", sourceRef: "L12" },
373
- self_employment_earnings_L14A: { label: "Self-Employment Earnings", sourceRef: "L14A" },
374
- nonrecourse_liabilities_box_K: { label: "Nonrecourse Liabilities", sourceRef: "Box K1" },
375
- qualified_nonrecourse_financing_box_K: { label: "Qualified Nonrecourse Financing", sourceRef: "Box K2" },
376
- recourse_liabilities_box_K: { label: "Recourse Liabilities", sourceRef: "Box K3" },
377
- capital_account_beginning_L: { label: "Capital Account (Beginning)", sourceRef: "Item L" },
378
- capital_contributions_L: { label: "Capital Contributions", sourceRef: "Item L" },
379
- capital_current_year_L: { label: "Current Year Increase (Decrease)", sourceRef: "Item L" },
380
- capital_withdrawals_distributions_L: { label: "Withdrawals & Distributions", sourceRef: "Item L" },
381
- capital_account_ending_L: { label: "Capital Account (Ending)", sourceRef: "Item L" },
382
- cash_distributions_L19A: { label: "Cash Distributions", sourceRef: "L19a" },
383
- qbi_w2_wages_statement_a: { label: "QBI W-2 Wages", sourceRef: "L20 Stmt A" },
384
- qbi_ubia_L20c: { label: "QBI UBIA of Qualified Property", sourceRef: "L20c" },
385
- },
386
- sections: [
387
- {
388
- head: "Income & Gains",
389
- fields: [
390
- "ordinary_business_income_L1", "net_rental_real_estate_income_L2", "other_net_rental_income_L3",
391
- "guaranteed_payments_services_L4a", "guaranteed_payments_capital_L4b",
392
- "interest_income_L5", "ordinary_dividends_L6a", "qualified_dividends_L6b",
393
- "royalties_L7", "net_short_term_capital_gain_L8", "net_long_term_capital_gain_L9a",
394
- "unrecaptured_1250_gain_L9c", "net_section_1231_gain_L10", "other_income_L11",
395
- ],
396
- },
397
- {
398
- head: "Deductions",
399
- fields: ["section_179_deduction_L12", "self_employment_earnings_L14A"],
400
- },
401
- {
402
- head: "Capital Account",
403
- fields: [
404
- "capital_account_beginning_L", "capital_contributions_L", "capital_current_year_L",
405
- "capital_withdrawals_distributions_L", "capital_account_ending_L",
406
- "nonrecourse_liabilities_box_K", "qualified_nonrecourse_financing_box_K", "recourse_liabilities_box_K",
407
- ],
408
- },
409
- {
410
- head: "QBI & Distributions",
411
- fields: ["qbi_w2_wages_statement_a", "qbi_ubia_L20c", "cash_distributions_L19A"],
8
+ /**
9
+ * Keyed by documentType string returned by the backend in parsedData.documentType.
10
+ * When DocumentReviewModal receives parsedData, it looks up the documentType here
11
+ * to get section groupings and field labels. Falls back to flat rendering if no entry.
12
+ */
13
+ exports.DOCUMENT_FIELD_CATALOG = {
14
+ // ── Profit & Loss ──
15
+ profit_loss: {
16
+ sections: [
17
+ { head: "Revenue", fields: ["total_revenue", "cost_of_goods_sold", "gross_profit"] },
18
+ {
19
+ head: "Operating Expenses",
20
+ fields: [
21
+ "officer_compensation", "salaries_wages_staff", "employee_benefits",
22
+ "payroll_taxes_employer", "employer_retirement_contribution",
23
+ "rent_expense", "utilities", "software_subscriptions",
24
+ "professional_fees", "advertising_marketing", "travel",
25
+ "business_meals", "office_supplies", "insurance_nonhealth",
26
+ "repairs_maintenance", "bank_fees", "contract_labor",
27
+ "mortgage_interest", "business_interest_nonmortgage",
28
+ "depreciation_expense", "amortization_expense", "other_expenses",
29
+ "total_operating_expenses",
30
+ ],
31
+ },
32
+ { head: "Net Income", fields: ["net_operating_income", "income_tax_provision", "net_income"] },
33
+ ],
34
+ fields: {
35
+ total_revenue: { label: "Total Revenue", sourceRef: "Line 1a" },
36
+ cost_of_goods_sold: { label: "Cost of Goods Sold", sourceRef: "Line 2" },
37
+ gross_profit: { label: "Gross Profit", sourceRef: "Computed" },
38
+ officer_compensation: { label: "Officer Compensation", sourceRef: "Line 7" },
39
+ salaries_wages_staff: { label: "Wages & Salaries", sourceRef: "Line 13" },
40
+ employee_benefits: { label: "Employee Benefits", sourceRef: "" },
41
+ payroll_taxes_employer: { label: "Payroll Taxes", sourceRef: "" },
42
+ employer_retirement_contribution: { label: "Retirement Contributions", sourceRef: "" },
43
+ rent_expense: { label: "Rent / Lease", sourceRef: "Line 15" },
44
+ utilities: { label: "Utilities", sourceRef: "" },
45
+ software_subscriptions: { label: "Software & Subscriptions", sourceRef: "" },
46
+ professional_fees: { label: "Professional Fees", sourceRef: "Line 17" },
47
+ advertising_marketing: { label: "Advertising & Marketing", sourceRef: "" },
48
+ travel: { label: "Travel", sourceRef: "" },
49
+ business_meals: { label: "Meals & Entertainment", sourceRef: "Line 19" },
50
+ office_supplies: { label: "Office Supplies", sourceRef: "" },
51
+ insurance_nonhealth: { label: "Insurance (Non-Health)", sourceRef: "" },
52
+ repairs_maintenance: { label: "Repairs & Maintenance", sourceRef: "" },
53
+ bank_fees: { label: "Bank Fees", sourceRef: "" },
54
+ contract_labor: { label: "Contract Labor", sourceRef: "" },
55
+ mortgage_interest: { label: "Mortgage Interest", sourceRef: "" },
56
+ business_interest_nonmortgage: { label: "Business Interest", sourceRef: "" },
57
+ depreciation_expense: { label: "Depreciation", sourceRef: "Line 14" },
58
+ amortization_expense: { label: "Amortization", sourceRef: "" },
59
+ other_expenses: { label: "Other Expenses", sourceRef: "" },
60
+ total_operating_expenses: { label: "Total Operating Expenses", sourceRef: "" },
61
+ net_operating_income: { label: "Net Operating Income", sourceRef: "Line 21" },
62
+ income_tax_provision: { label: "Income Tax Provision", sourceRef: "" },
63
+ net_income: { label: "Net Income", sourceRef: "Line 30" },
412
64
  },
413
- ],
414
- };
415
- // ---------------------------------------------------------------------------
416
- // state_tax_return
417
- // ---------------------------------------------------------------------------
418
- const STATE_TAX_RETURN = {
419
- fields: {
420
- il_replacement_tax: { label: "IL Replacement Tax" },
421
- pte_tax_paid: { label: "PTE Tax Paid (by state)" },
422
65
  },
423
- sections: [
424
- {
425
- head: "State Tax",
426
- fields: ["il_replacement_tax", "pte_tax_paid"],
66
+ // ── Balance Sheet ──
67
+ balance_sheet: {
68
+ sections: [
69
+ {
70
+ head: "Assets",
71
+ fields: [
72
+ "cash_and_equivalents", "accounts_receivable",
73
+ "allowance_for_doubtful_accounts", "prepaid_expenses", "inventory",
74
+ "total_current_assets", "property_equipment_gross",
75
+ "accumulated_depreciation", "property_equipment_net",
76
+ "intangible_assets_gross", "accumulated_amortization",
77
+ "intangible_assets_net", "security_deposits_held_as_asset", "total_assets",
78
+ ],
79
+ },
80
+ {
81
+ head: "Liabilities",
82
+ fields: [
83
+ "accounts_payable", "accrued_liabilities", "deferred_revenue",
84
+ "short_term_debt", "long_term_debt_current_portion",
85
+ "total_current_liabilities", "long_term_debt", "total_liabilities",
86
+ ],
87
+ },
88
+ {
89
+ head: "Equity",
90
+ fields: [
91
+ "common_stock_par_value", "additional_paid_in_capital",
92
+ "retained_earnings", "aaa_balance", "owners_equity",
93
+ "total_equity", "total_liabilities_and_equity",
94
+ ],
95
+ },
96
+ ],
97
+ fields: {
98
+ cash_and_equivalents: { label: "Cash & Equivalents", sourceRef: "Line 1" },
99
+ accounts_receivable: { label: "Accounts Receivable", sourceRef: "Line 2" },
100
+ allowance_for_doubtful_accounts: { label: "Allowance for Doubtful Accts", sourceRef: "" },
101
+ prepaid_expenses: { label: "Prepaid Expenses", sourceRef: "" },
102
+ inventory: { label: "Inventory", sourceRef: "Line 3" },
103
+ total_current_assets: { label: "Total Current Assets", sourceRef: "" },
104
+ property_equipment_gross: { label: "Property & Equipment (Gross)", sourceRef: "" },
105
+ accumulated_depreciation: { label: "Accumulated Depreciation", sourceRef: "" },
106
+ property_equipment_net: { label: "Property & Equipment (Net)", sourceRef: "" },
107
+ intangible_assets_gross: { label: "Intangible Assets (Gross)", sourceRef: "" },
108
+ accumulated_amortization: { label: "Accumulated Amortization", sourceRef: "" },
109
+ intangible_assets_net: { label: "Intangible Assets (Net)", sourceRef: "" },
110
+ security_deposits_held_as_asset: { label: "Security Deposits", sourceRef: "" },
111
+ total_assets: { label: "Total Assets", sourceRef: "Line 11" },
112
+ accounts_payable: { label: "Accounts Payable", sourceRef: "Line 15" },
113
+ accrued_liabilities: { label: "Accrued Liabilities", sourceRef: "" },
114
+ deferred_revenue: { label: "Deferred Revenue", sourceRef: "" },
115
+ short_term_debt: { label: "Short-Term Debt", sourceRef: "" },
116
+ long_term_debt_current_portion: { label: "Current Portion of LT Debt", sourceRef: "" },
117
+ total_current_liabilities: { label: "Total Current Liabilities", sourceRef: "" },
118
+ long_term_debt: { label: "Long-Term Debt", sourceRef: "Line 17" },
119
+ total_liabilities: { label: "Total Liabilities", sourceRef: "Line 22" },
120
+ common_stock_par_value: { label: "Common Stock", sourceRef: "" },
121
+ additional_paid_in_capital: { label: "Additional Paid-in Capital", sourceRef: "" },
122
+ retained_earnings: { label: "Retained Earnings", sourceRef: "Line 24" },
123
+ aaa_balance: { label: "AAA Balance", sourceRef: "" },
124
+ owners_equity: { label: "Owner's Equity", sourceRef: "" },
125
+ total_equity: { label: "Total Equity", sourceRef: "Line 27" },
126
+ total_liabilities_and_equity: { label: "Total Liabilities & Equity", sourceRef: "" },
427
127
  },
428
- ],
429
- };
430
- // ---------------------------------------------------------------------------
431
- // form_4562
432
- // ---------------------------------------------------------------------------
433
- const FORM_4562 = {
434
- fields: {
435
- section_179_max_amount_L1: { label: "§179 Maximum Amount", sourceRef: "L1" },
436
- section_179_cost_placed_L2: { label: "§179 Property Cost Placed in Service", sourceRef: "L2" },
437
- threshold_reduction_L3: { label: "Threshold Cost Reduction", sourceRef: "L3" },
438
- dollar_limitation_L5: { label: "§179 Dollar Limitation", sourceRef: "L5" },
439
- section_179_expense_L12: { label: "§179 Expense Elected", sourceRef: "L12" },
440
- section_179_carryover_to_next_year_L13: { label: "§179 Carryover to Next Year", sourceRef: "L13" },
441
- bonus_depreciation_claimed_L14: { label: "Bonus Depreciation Claimed", sourceRef: "L14" },
442
- macrs_prior_year_assets_L17: { label: "MACRS Prior-year Assets", sourceRef: "L17" },
443
- macrs_current_year_gds: { label: "MACRS Current-year (GDS)" },
444
- macrs_current_year_ads: { label: "MACRS Current-year (ADS)" },
445
- amortization_starting_this_year_L42: { label: "Amortization Starting This Year", sourceRef: "L42" },
446
- amortization_continuing_L43: { label: "Amortization (Continuing)", sourceRef: "L43" },
447
- total_depreciation_L22: { label: "Total Depreciation", sourceRef: "L22" },
448
- fixed_asset_additions: { label: "Fixed Asset Additions (Current Year)" },
449
- qualifying_asset_cost: { label: "Qualifying Asset Cost (≤20yr life)" },
450
- qip_present: { label: "QIP Present" },
451
128
  },
452
- sections: [
453
- {
454
- head: "§179 Expensing",
455
- fields: [
456
- "section_179_max_amount_L1", "section_179_cost_placed_L2", "threshold_reduction_L3",
457
- "dollar_limitation_L5", "section_179_expense_L12", "section_179_carryover_to_next_year_L13",
458
- ],
459
- },
460
- {
461
- head: "Bonus & MACRS Depreciation",
462
- fields: [
463
- "bonus_depreciation_claimed_L14", "macrs_prior_year_assets_L17",
464
- "macrs_current_year_gds", "macrs_current_year_ads",
465
- "amortization_starting_this_year_L42", "amortization_continuing_L43",
466
- "total_depreciation_L22",
467
- ],
129
+ // ── Federal Tax Return (1120S, 1120, 1065, Schedule C) ──
130
+ federal_tax_return: {
131
+ sections: [
132
+ {
133
+ head: "Entity & Filing",
134
+ fields: [
135
+ "entity_tax_classification", "ein", "date_incorporated",
136
+ "accounting_method_box", "industry_naics",
137
+ "amended_return_flag", "initial_return_flag", "final_return_flag",
138
+ ],
139
+ },
140
+ {
141
+ head: "Income",
142
+ fields: [
143
+ "gross_receipts_L1a", "returns_and_allowances_L1b", "revenue",
144
+ "cost_of_goods_sold", "gross_profit", "total_income",
145
+ ],
146
+ },
147
+ {
148
+ head: "Deductions",
149
+ fields: [
150
+ "compensation_of_officers_line", "salaries_wages_line",
151
+ "repairs_maintenance", "rent_expense_line",
152
+ "taxes_and_licenses_line", "interest_expense_line",
153
+ "charitable_contributions", "depreciation_line",
154
+ "advertising_expense", "pension_profit_sharing",
155
+ "employee_benefit_programs", "other_deductions_line",
156
+ "total_deductions",
157
+ ],
158
+ },
159
+ {
160
+ head: "Tax Computation",
161
+ fields: [
162
+ "net_income", "nol_deduction", "total_tax",
163
+ "estimated_tax_payments", "tax_due_or_overpayment",
164
+ "self_emp_hi",
165
+ ],
166
+ },
167
+ ],
168
+ fields: {
169
+ entity_tax_classification: { label: "Entity Classification", sourceRef: "Form Title" },
170
+ ein: { label: "EIN", sourceRef: "Box B" },
171
+ date_incorporated: { label: "Date Incorporated", sourceRef: "Box E" },
172
+ accounting_method_box: { label: "Accounting Method", sourceRef: "Sch B Q1" },
173
+ industry_naics: { label: "NAICS Code", sourceRef: "Box A" },
174
+ amended_return_flag: { label: "Amended Return", sourceRef: "Header" },
175
+ initial_return_flag: { label: "Initial Return", sourceRef: "Header" },
176
+ final_return_flag: { label: "Final Return", sourceRef: "Header" },
177
+ gross_receipts_L1a: { label: "Gross Receipts", sourceRef: "Line 1a" },
178
+ returns_and_allowances_L1b: { label: "Returns & Allowances", sourceRef: "Line 1b" },
179
+ revenue: { label: "Revenue", sourceRef: "Line 1c" },
180
+ cost_of_goods_sold: { label: "Cost of Goods Sold", sourceRef: "Line 2" },
181
+ gross_profit: { label: "Gross Profit", sourceRef: "Line 3" },
182
+ total_income: { label: "Total Income", sourceRef: "Line 6" },
183
+ compensation_of_officers_line: { label: "Officer Compensation", sourceRef: "Line 7" },
184
+ salaries_wages_line: { label: "Salaries & Wages", sourceRef: "Line 8" },
185
+ repairs_maintenance: { label: "Repairs & Maintenance", sourceRef: "Line 9" },
186
+ rent_expense_line: { label: "Rent Expense", sourceRef: "Line 11" },
187
+ taxes_and_licenses_line: { label: "Taxes & Licenses", sourceRef: "Line 12" },
188
+ interest_expense_line: { label: "Interest Expense", sourceRef: "Line 13" },
189
+ charitable_contributions: { label: "Charitable Contributions", sourceRef: "Line 19" },
190
+ depreciation_line: { label: "Depreciation", sourceRef: "Line 14" },
191
+ advertising_expense: { label: "Advertising", sourceRef: "Line 16" },
192
+ pension_profit_sharing: { label: "Pension & Profit Sharing", sourceRef: "Line 17" },
193
+ employee_benefit_programs: { label: "Employee Benefits", sourceRef: "Line 18" },
194
+ other_deductions_line: { label: "Other Deductions", sourceRef: "Line 19" },
195
+ total_deductions: { label: "Total Deductions", sourceRef: "Line 20" },
196
+ net_income: { label: "Net Income", sourceRef: "Line 21" },
197
+ nol_deduction: { label: "NOL Deduction", sourceRef: "Line 29a" },
198
+ total_tax: { label: "Total Tax", sourceRef: "Line 31" },
199
+ estimated_tax_payments: { label: "Estimated Tax Payments", sourceRef: "Line 32b" },
200
+ tax_due_or_overpayment: { label: "Tax Due / Overpayment", sourceRef: "" },
201
+ self_emp_hi: { label: "Self-Employed Health Insurance", sourceRef: "Sch 1 L17" },
468
202
  },
469
- {
470
- head: "Asset Summary",
471
- fields: ["fixed_asset_additions", "qualifying_asset_cost", "qip_present"],
472
- },
473
- ],
474
- };
475
- // ---------------------------------------------------------------------------
476
- // fixed_asset_schedule
477
- // ---------------------------------------------------------------------------
478
- const FIXED_ASSET_SCHEDULE = {
479
- fields: {
480
- total_original_cost: { label: "Total Original Cost" },
481
- total_accumulated_depreciation: { label: "Total Accumulated Depreciation" },
482
- total_net_book_value: { label: "Total Net Book Value" },
483
- fixed_asset_additions_current_year: { label: "Fixed Asset Additions (Current Year)" },
484
- qualifying_asset_cost: { label: "Qualifying Asset Cost (≤20yr life)" },
485
- ubia_total: { label: "UBIA of Qualified Property" },
486
- qip_value: { label: "QIP Value" },
487
- total_section_179_claimed: { label: "Total §179 Claimed" },
488
- total_bonus_depreciation_claimed: { label: "Total Bonus Depreciation Claimed" },
489
203
  },
490
- sections: [
491
- {
492
- head: "Asset Totals",
493
- fields: [
494
- "total_original_cost", "total_accumulated_depreciation", "total_net_book_value",
495
- "fixed_asset_additions_current_year", "qualifying_asset_cost",
496
- "ubia_total", "qip_value",
497
- "total_section_179_claimed", "total_bonus_depreciation_claimed",
498
- ],
204
+ // ── W-3 (Payroll Summary) ──
205
+ w3: {
206
+ sections: [
207
+ {
208
+ head: "Wages & Withholding",
209
+ fields: [
210
+ "wages_tips_other_compensation_box1", "federal_income_tax_withheld_box2",
211
+ "social_security_wages_box3", "social_security_tax_withheld_box4",
212
+ "medicare_wages_box5", "medicare_tax_withheld_box6",
213
+ "social_security_tips_box7", "allocated_tips_box8",
214
+ ],
215
+ },
216
+ {
217
+ head: "Benefits & Other",
218
+ fields: [
219
+ "dependent_care_benefits_box10", "nonqualified_plans_box11",
220
+ "owner_w2_comp", "employees",
221
+ ],
222
+ },
223
+ ],
224
+ fields: {
225
+ wages_tips_other_compensation_box1: { label: "Wages, Tips & Compensation", sourceRef: "Box 1" },
226
+ federal_income_tax_withheld_box2: { label: "Federal Income Tax Withheld", sourceRef: "Box 2" },
227
+ social_security_wages_box3: { label: "Social Security Wages", sourceRef: "Box 3" },
228
+ social_security_tax_withheld_box4: { label: "SS Tax Withheld", sourceRef: "Box 4" },
229
+ medicare_wages_box5: { label: "Medicare Wages", sourceRef: "Box 5" },
230
+ medicare_tax_withheld_box6: { label: "Medicare Tax Withheld", sourceRef: "Box 6" },
231
+ social_security_tips_box7: { label: "Social Security Tips", sourceRef: "Box 7" },
232
+ allocated_tips_box8: { label: "Allocated Tips", sourceRef: "Box 8" },
233
+ dependent_care_benefits_box10: { label: "Dependent Care Benefits", sourceRef: "Box 10" },
234
+ nonqualified_plans_box11: { label: "Nonqualified Plans", sourceRef: "Box 11" },
235
+ owner_w2_comp: { label: "Owner W-2 Compensation", sourceRef: "Box 1 (Officer)" },
236
+ employees: { label: "Number of Employees", sourceRef: "Box d" },
499
237
  },
500
- ],
501
- };
502
- // ---------------------------------------------------------------------------
503
- // schedule_se
504
- // ---------------------------------------------------------------------------
505
- const SCHEDULE_SE = {
506
- fields: {
507
- net_profit_from_schedule_c_L1a: { label: "Net Profit from Schedule C", sourceRef: "L1a" },
508
- partnership_se_income: { label: "Partnership SE Income", sourceRef: "L2" },
509
- se_net_earnings_L3: { label: "SE Net Earnings", sourceRef: "L3" },
510
- ss_wage_base_portion_L4a: { label: "SS Wage Base Portion", sourceRef: "L4a" },
511
- medicare_portion_L4b: { label: "Medicare Portion", sourceRef: "L4b" },
512
- se_tax_amount_L4: { label: "SE Tax Amount", sourceRef: "L4" },
513
- se_half_deduction_L5: { label: "SE Half Deduction", sourceRef: "L5" },
514
- additional_medicare_tax: { label: "Additional Medicare Tax (0.9%)" },
515
238
  },
516
- sections: [
517
- {
518
- head: "Self-Employment Tax",
519
- fields: [
520
- "net_profit_from_schedule_c_L1a", "partnership_se_income",
521
- "se_net_earnings_L3", "ss_wage_base_portion_L4a", "medicare_portion_L4b",
522
- "se_tax_amount_L4", "se_half_deduction_L5", "additional_medicare_tax",
523
- ],
239
+ // ── Payroll Records ──
240
+ payroll_records: {
241
+ sections: [
242
+ {
243
+ head: "Totals",
244
+ fields: [
245
+ "employees", "w2_wages_paid_total",
246
+ "total_federal_withholding", "total_ss_withholding",
247
+ "total_medicare_withholding",
248
+ ],
249
+ },
250
+ {
251
+ head: "Employer Costs",
252
+ fields: [
253
+ "employer_fica_match", "employer_futa_paid",
254
+ "employer_401k_match_total", "bonuses_paid_total",
255
+ "commissions_paid_total", "overtime_pay_total",
256
+ "tip_income_reported",
257
+ ],
258
+ },
259
+ ],
260
+ fields: {
261
+ employees: { label: "Number of Employees", sourceRef: "" },
262
+ w2_wages_paid_total: { label: "Total W-2 Wages Paid", sourceRef: "" },
263
+ total_federal_withholding: { label: "Federal Withholding", sourceRef: "" },
264
+ total_ss_withholding: { label: "Social Security Withholding", sourceRef: "" },
265
+ total_medicare_withholding: { label: "Medicare Withholding", sourceRef: "" },
266
+ employer_fica_match: { label: "Employer FICA Match", sourceRef: "" },
267
+ employer_futa_paid: { label: "FUTA Paid", sourceRef: "" },
268
+ employer_401k_match_total: { label: "401(k) Match Total", sourceRef: "" },
269
+ bonuses_paid_total: { label: "Bonuses Paid", sourceRef: "" },
270
+ commissions_paid_total: { label: "Commissions Paid", sourceRef: "" },
271
+ overtime_pay_total: { label: "Overtime Pay", sourceRef: "" },
272
+ tip_income_reported: { label: "Tip Income Reported", sourceRef: "" },
524
273
  },
525
- ],
526
- };
527
- // ---------------------------------------------------------------------------
528
- // form_8829 (Home Office)
529
- // ---------------------------------------------------------------------------
530
- const FORM_8829 = {
531
- fields: {
532
- home_office_method: { label: "Home Office Method" },
533
- home_office_sqft_L1: { label: "Home Office Sq Ft", sourceRef: "L1" },
534
- total_home_sqft_L2: { label: "Total Home Sq Ft", sourceRef: "L2" },
535
- business_use_pct_home_L3: { label: "Business Use %", sourceRef: "L3" },
536
- tentative_profit_L8: { label: "Tentative Profit (Schedule C L29)", sourceRef: "L8" },
537
- mortgage_interest_direct_L11: { label: "Mortgage Interest (Direct)", sourceRef: "L11" },
538
- real_estate_taxes_direct_L12: { label: "Real Estate Taxes (Direct)", sourceRef: "L12" },
539
- insurance_indirect_L17: { label: "Insurance (Indirect)", sourceRef: "L17" },
540
- rent_paid_indirect_L18: { label: "Rent Paid (Indirect)", sourceRef: "L18" },
541
- repairs_maintenance_indirect_L19: { label: "Repairs & Maintenance (Indirect)", sourceRef: "L19" },
542
- utilities_indirect_L20: { label: "Utilities (Indirect)", sourceRef: "L20" },
543
- total_indirect_expenses_L21: { label: "Total Indirect Expenses", sourceRef: "L21" },
544
- carryover_from_prior_year_L23: { label: "Carryover from Prior Year", sourceRef: "L23" },
545
- depreciation_of_home_L28: { label: "Depreciation of Home", sourceRef: "L28" },
546
- carryover_to_next_year_L29: { label: "Carryover to Next Year", sourceRef: "L29" },
547
- home_office_deduction_L30: { label: "Home Office Deduction", sourceRef: "L30" },
548
- own_or_rent_home: { label: "Own or Rent Home" },
549
274
  },
550
- sections: [
551
- {
552
- head: "Usage",
553
- fields: ["home_office_method", "own_or_rent_home", "home_office_sqft_L1", "total_home_sqft_L2", "business_use_pct_home_L3"],
275
+ // ── Fixed Asset Schedule ──
276
+ fixed_asset_schedule: {
277
+ sections: [
278
+ {
279
+ head: "Summary",
280
+ fields: [
281
+ "total_original_cost", "total_accumulated_depreciation",
282
+ "total_net_book_value", "fixed_asset_additions_current_year",
283
+ "qualifying_asset_cost",
284
+ ],
285
+ },
286
+ {
287
+ head: "Depreciation & Amortization",
288
+ fields: [
289
+ "total_section_179_claimed", "total_bonus_depreciation_claimed",
290
+ "qip_value", "ubia_total",
291
+ ],
292
+ },
293
+ ],
294
+ fields: {
295
+ total_original_cost: { label: "Total Original Cost", sourceRef: "" },
296
+ total_accumulated_depreciation: { label: "Accumulated Depreciation", sourceRef: "" },
297
+ total_net_book_value: { label: "Net Book Value", sourceRef: "" },
298
+ fixed_asset_additions_current_year: { label: "Current Year Additions", sourceRef: "" },
299
+ qualifying_asset_cost: { label: "Qualifying Asset Cost", sourceRef: "≤20yr life" },
300
+ total_section_179_claimed: { label: "Section 179 Claimed", sourceRef: "" },
301
+ total_bonus_depreciation_claimed: { label: "Bonus Depreciation Claimed", sourceRef: "" },
302
+ qip_value: { label: "QIP Value", sourceRef: "" },
303
+ ubia_total: { label: "UBIA Total", sourceRef: "" },
554
304
  },
555
- {
556
- head: "Expenses",
557
- fields: [
558
- "tentative_profit_L8", "mortgage_interest_direct_L11", "real_estate_taxes_direct_L12",
559
- "insurance_indirect_L17", "rent_paid_indirect_L18", "repairs_maintenance_indirect_L19",
560
- "utilities_indirect_L20", "total_indirect_expenses_L21",
561
- ],
562
- },
563
- {
564
- head: "Deduction",
565
- fields: ["carryover_from_prior_year_L23", "depreciation_of_home_L28", "carryover_to_next_year_L29", "home_office_deduction_L30"],
566
- },
567
- ],
568
- };
569
- // ---------------------------------------------------------------------------
570
- // form_8889 (HSA)
571
- // ---------------------------------------------------------------------------
572
- const FORM_8889 = {
573
- fields: {
574
- hdhp_coverage_L1: { label: "HDHP Coverage", sourceRef: "L1" },
575
- hsa_contributions_L2: { label: "HSA Contributions", sourceRef: "L2" },
576
- age_55_catchup_contribution_L3: { label: "Age 55+ Catch-up Contribution", sourceRef: "L3" },
577
- archer_msa_contributions_L4: { label: "Archer MSA Contributions", sourceRef: "L4" },
578
- employer_contributions_L9: { label: "Employer HSA Contributions", sourceRef: "L9" },
579
- qualified_hsa_funding_distributions_L10: { label: "Qualified HSA Funding Distributions", sourceRef: "L10" },
580
- deductible_hsa_contributions_L13: { label: "Deductible HSA Contributions", sourceRef: "L13" },
581
- total_distributions_L14a: { label: "Total Distributions", sourceRef: "L14a" },
582
- qualified_medical_expenses_L15: { label: "Qualified Medical Expenses", sourceRef: "L15" },
583
- taxable_hsa_distributions_L16: { label: "Taxable HSA Distributions", sourceRef: "L16" },
584
- additional_20pct_tax_L17b: { label: "Additional 20% Tax", sourceRef: "L17b" },
585
- last_month_rule_inclusion_L21: { label: "Last-Month Rule Inclusion", sourceRef: "L21" },
586
305
  },
587
- sections: [
588
- {
589
- head: "Contributions",
590
- fields: [
591
- "hdhp_coverage_L1", "hsa_contributions_L2", "age_55_catchup_contribution_L3",
592
- "archer_msa_contributions_L4", "employer_contributions_L9",
593
- "qualified_hsa_funding_distributions_L10", "deductible_hsa_contributions_L13",
594
- ],
306
+ // ── State Tax Return ──
307
+ state_tax_return: {
308
+ sections: [
309
+ {
310
+ head: "Filing Summary",
311
+ fields: ["tax_type_by_state", "state_nexus_type", "state_apportionment_method"],
312
+ },
313
+ {
314
+ head: "Tax Computation",
315
+ fields: [
316
+ "apportionment_factor", "state_taxable_income", "state_tax_paid",
317
+ "state_estimated_payments_made", "pte_election_status", "pte_tax_paid",
318
+ "il_replacement_tax",
319
+ ],
320
+ },
321
+ ],
322
+ fields: {
323
+ tax_type_by_state: { label: "Tax Type", sourceRef: "" },
324
+ state_nexus_type: { label: "Nexus Type", sourceRef: "" },
325
+ state_apportionment_method: { label: "Apportionment Method", sourceRef: "" },
326
+ apportionment_factor: { label: "Apportionment Factor", sourceRef: "" },
327
+ state_taxable_income: { label: "State Taxable Income", sourceRef: "" },
328
+ state_tax_paid: { label: "State Tax Paid", sourceRef: "Total" },
329
+ state_estimated_payments_made: { label: "Estimated Payments Made", sourceRef: "" },
330
+ pte_election_status: { label: "PTE Election Status", sourceRef: "" },
331
+ pte_tax_paid: { label: "PTE Tax Paid", sourceRef: "" },
332
+ il_replacement_tax: { label: "IL Replacement Tax", sourceRef: "" },
595
333
  },
596
- {
597
- head: "Distributions",
598
- fields: [
599
- "total_distributions_L14a", "qualified_medical_expenses_L15",
600
- "taxable_hsa_distributions_L16", "additional_20pct_tax_L17b", "last_month_rule_inclusion_L21",
601
- ],
602
- },
603
- ],
604
- };
605
- // ---------------------------------------------------------------------------
606
- // form_2553 (S-Corp Election)
607
- // ---------------------------------------------------------------------------
608
- const FORM_2553 = {
609
- fields: {
610
- s_corp_election_effective_date: { label: "S-Corp Election Effective Date" },
611
- s_corp_election_filed_date: { label: "S-Corp Election Filed Date" },
612
- s_corp_election_accepted_date: { label: "IRS Acceptance Date" },
613
- state_of_incorporation: { label: "State of Incorporation" },
614
- date_incorporated_or_formed: { label: "Date Incorporated / Formed" },
615
- selected_tax_year: { label: "Selected Tax Year" },
616
- service_center_filed_with: { label: "Service Center Filed With" },
617
- election_filed_present: { label: "Election Filed" },
618
334
  },
619
- sections: [
620
- {
621
- head: "S-Corp Election",
622
- fields: [
623
- "election_filed_present", "s_corp_election_effective_date",
624
- "s_corp_election_filed_date", "s_corp_election_accepted_date",
625
- "state_of_incorporation", "date_incorporated_or_formed",
626
- "selected_tax_year", "service_center_filed_with",
627
- ],
335
+ // ── Form 4562 (Depreciation & Amortization) ──
336
+ form_4562: {
337
+ sections: [
338
+ {
339
+ head: "Section 179",
340
+ fields: [
341
+ "section_179_max_amount_L1", "section_179_cost_placed_L2",
342
+ "dollar_limitation_L5", "section_179_expense_L12",
343
+ "section_179_carryover_to_next_year_L13",
344
+ ],
345
+ },
346
+ {
347
+ head: "MACRS & Bonus",
348
+ fields: [
349
+ "bonus_depreciation_claimed_L14", "bonus_elected_out_flag",
350
+ "macrs_prior_year_assets_L17", "macrs_current_year_gds",
351
+ "macrs_current_year_ads",
352
+ ],
353
+ },
354
+ {
355
+ head: "Totals",
356
+ fields: [
357
+ "total_depreciation_L22", "fixed_asset_additions",
358
+ "qualifying_asset_cost", "qip_present",
359
+ ],
360
+ },
361
+ ],
362
+ fields: {
363
+ section_179_max_amount_L1: { label: "§179 Maximum Amount", sourceRef: "Line 1" },
364
+ section_179_cost_placed_L2: { label: "§179 Cost of Property", sourceRef: "Line 2" },
365
+ dollar_limitation_L5: { label: "Dollar Limitation", sourceRef: "Line 5" },
366
+ section_179_expense_L12: { label: "§179 Expense Deduction", sourceRef: "Line 12" },
367
+ section_179_carryover_to_next_year_L13: { label: "§179 Carryover", sourceRef: "Line 13" },
368
+ bonus_depreciation_claimed_L14: { label: "Bonus Depreciation", sourceRef: "Line 14" },
369
+ bonus_elected_out_flag: { label: "Bonus Elected Out", sourceRef: "Election" },
370
+ macrs_prior_year_assets_L17: { label: "MACRS Prior Year Assets", sourceRef: "Line 17" },
371
+ macrs_current_year_gds: { label: "MACRS Current Year (GDS)", sourceRef: "Section B" },
372
+ macrs_current_year_ads: { label: "MACRS Current Year (ADS)", sourceRef: "Section C" },
373
+ total_depreciation_L22: { label: "Total Depreciation", sourceRef: "Line 22" },
374
+ fixed_asset_additions: { label: "Fixed Asset Additions", sourceRef: "" },
375
+ qualifying_asset_cost: { label: "Qualifying Asset Cost", sourceRef: "≤20yr" },
376
+ qip_present: { label: "QIP Present", sourceRef: "" },
628
377
  },
629
- ],
630
- };
631
- // ---------------------------------------------------------------------------
632
- // form_1099_nec_summary
633
- // ---------------------------------------------------------------------------
634
- const FORM_1099_NEC_SUMMARY = {
635
- fields: {
636
- contractor_count: { label: "Contractor Count" },
637
- total_contractor_payments_box1: { label: "Total Contractor Payments", sourceRef: "Box 1 (sum)" },
638
- total_backup_withholding_box4: { label: "Total Backup Withholding", sourceRef: "Box 4 (sum)" },
639
- filing_date: { label: "Filing Date" },
640
- filed_electronically_flag: { label: "Filed Electronically" },
641
378
  },
642
- sections: [
643
- {
644
- head: "1099-NEC Summary",
645
- fields: [
646
- "contractor_count", "total_contractor_payments_box1",
647
- "total_backup_withholding_box4", "filing_date", "filed_electronically_flag",
648
- ],
379
+ // ── Form 8889 (HSA) ──
380
+ form_8889: {
381
+ sections: [
382
+ {
383
+ head: "Coverage & Contributions",
384
+ fields: [
385
+ "hdhp_coverage_L1", "hsa_contributions_L2",
386
+ "age_55_catchup_contribution_L3", "employer_contributions_L9",
387
+ "deductible_hsa_contributions_L13",
388
+ ],
389
+ },
390
+ {
391
+ head: "Distributions",
392
+ fields: [
393
+ "total_distributions_L14a", "qualified_medical_expenses_L15",
394
+ "taxable_hsa_distributions_L16", "additional_20pct_tax_L17b",
395
+ ],
396
+ },
397
+ ],
398
+ fields: {
399
+ hdhp_coverage_L1: { label: "HDHP Coverage", sourceRef: "Line 1" },
400
+ hsa_contributions_L2: { label: "HSA Contributions", sourceRef: "Line 2" },
401
+ age_55_catchup_contribution_L3: { label: "Age 55+ Catch-Up", sourceRef: "Line 3" },
402
+ employer_contributions_L9: { label: "Employer Contributions", sourceRef: "Line 9" },
403
+ deductible_hsa_contributions_L13: { label: "Deductible HSA Contributions", sourceRef: "Line 13" },
404
+ total_distributions_L14a: { label: "Total Distributions", sourceRef: "Line 14a" },
405
+ qualified_medical_expenses_L15: { label: "Qualified Medical Expenses", sourceRef: "Line 15" },
406
+ taxable_hsa_distributions_L16: { label: "Taxable HSA Distributions", sourceRef: "Line 16" },
407
+ additional_20pct_tax_L17b: { label: "Additional 20% Tax", sourceRef: "Line 17b" },
649
408
  },
650
- ],
651
- };
652
- // ---------------------------------------------------------------------------
653
- // vehicle_mileage_log
654
- // ---------------------------------------------------------------------------
655
- const VEHICLE_MILEAGE_LOG = {
656
- fields: {
657
- vehicle_method: { label: "Deduction Method" },
658
- vehicle_year_make_model: { label: "Vehicle (Year / Make / Model)" },
659
- date_placed_in_service: { label: "Date Placed in Service" },
660
- total_miles: { label: "Total Miles" },
661
- business_miles: { label: "Business Miles" },
662
- commuting_miles: { label: "Commuting Miles" },
663
- other_personal_miles: { label: "Other Personal Miles" },
664
- business_use_pct: { label: "Business Use %" },
665
- mileage_rate_used: { label: "Mileage Rate Used" },
666
- parking_tolls: { label: "Parking & Tolls" },
667
- vehicle_deduction_standard_method: { label: "Vehicle Deduction (Standard Method)" },
668
- vehicle_cost_basis: { label: "Vehicle Cost Basis (Actual Method)" },
669
409
  },
670
- sections: [
671
- {
672
- head: "Vehicle & Usage",
673
- fields: [
674
- "vehicle_method", "vehicle_year_make_model", "date_placed_in_service",
675
- "total_miles", "business_miles", "commuting_miles", "other_personal_miles", "business_use_pct",
676
- ],
677
- },
678
- {
679
- head: "Deduction",
680
- fields: ["mileage_rate_used", "parking_tolls", "vehicle_deduction_standard_method", "vehicle_cost_basis"],
681
- },
682
- ],
683
- };
684
- // ---------------------------------------------------------------------------
685
- // rent_roll
686
- // ---------------------------------------------------------------------------
687
- const RENT_ROLL = {
688
- fields: {
689
- total_units: { label: "Total Units" },
690
- occupied_units: { label: "Occupied Units" },
691
- vacancy_rate: { label: "Vacancy Rate" },
692
- monthly_rent_roll: { label: "Monthly Rent Roll" },
693
- scheduled_annual_rent: { label: "Scheduled Annual Rent" },
694
- actual_rental_revenue: { label: "Actual Rental Revenue" },
695
- security_deposits_held: { label: "Security Deposits Held" },
696
- concessions_granted: { label: "Concessions Granted" },
697
- late_fees_collected: { label: "Late Fees Collected" },
698
- tenant_turnover_rate: { label: "Tenant Turnover Rate" },
699
- commercial_sqft_leased: { label: "Commercial Sq Ft Leased" },
700
- },
701
- sections: [
702
- {
703
- head: "Occupancy",
704
- fields: ["total_units", "occupied_units", "vacancy_rate", "tenant_turnover_rate"],
705
- },
706
- {
707
- head: "Revenue",
708
- fields: ["monthly_rent_roll", "scheduled_annual_rent", "actual_rental_revenue", "concessions_granted", "late_fees_collected"],
709
- },
710
- {
711
- head: "Other",
712
- fields: ["security_deposits_held", "commercial_sqft_leased"],
713
- },
714
- ],
715
- };
716
- // ---------------------------------------------------------------------------
717
- // mortgage_loan_documents
718
- // ---------------------------------------------------------------------------
719
- const MORTGAGE_LOAN_DOCUMENTS = {
720
- fields: {
721
- total_interest_expense_from_1098s: { label: "Total Interest Expense (1098s)" },
722
- total_principal_paid_current_year: { label: "Total Principal Paid (Current Year)" },
723
- points_paid_at_origination: { label: "Points Paid at Origination" },
724
- mortgage_insurance_premiums: { label: "Mortgage Insurance Premiums" },
725
- balloon_payment_risk: { label: "Balloon Payment Risk" },
726
- qualified_nonrecourse_flag: { label: "Qualified Nonrecourse" },
727
- },
728
- sections: [
729
- {
730
- head: "Loan Summary",
731
- fields: [
732
- "total_interest_expense_from_1098s", "total_principal_paid_current_year",
733
- "points_paid_at_origination", "mortgage_insurance_premiums",
734
- "balloon_payment_risk", "qualified_nonrecourse_flag",
735
- ],
736
- },
737
- ],
738
- };
739
- // ---------------------------------------------------------------------------
740
- // operating_agreement
741
- // ---------------------------------------------------------------------------
742
- const OPERATING_AGREEMENT = {
743
- fields: {
744
- state_of_formation: { label: "State of Formation" },
745
- formation_date: { label: "Formation Date" },
746
- fiscal_year_end_elected: { label: "Fiscal Year End" },
747
- member_count: { label: "Member Count" },
748
- distributions_paid_current_year: { label: "Distributions Paid (Current Year)" },
749
- buy_sell_provisions_present: { label: "Buy-Sell Provisions Present" },
750
- capital_call_provisions_present: { label: "Capital Call Provisions Present" },
751
- special_allocations_present: { label: "Special Allocations Present" },
752
- manager_compensation_terms: { label: "Manager Compensation Terms" },
753
- },
754
- sections: [
755
- {
756
- head: "Entity Details",
757
- fields: [
758
- "state_of_formation", "formation_date", "fiscal_year_end_elected", "member_count",
759
- "buy_sell_provisions_present", "capital_call_provisions_present", "special_allocations_present",
760
- ],
761
- },
762
- {
763
- head: "Economics",
764
- fields: ["distributions_paid_current_year", "manager_compensation_terms"],
765
- },
766
- ],
767
- };
768
- // ---------------------------------------------------------------------------
769
- // rd_activity_documentation
770
- // ---------------------------------------------------------------------------
771
- const RD_ACTIVITY_DOCUMENTATION = {
772
- fields: {
773
- r_d_activity_present: { label: "R&D Activity Present" },
774
- total_rd_expenses: { label: "Total R&D Expenses" },
775
- avg_prior_3yr_qres: { label: "Avg Prior 3-Year QREs" },
776
- },
777
- sections: [
778
- {
779
- head: "R&D Credit",
780
- fields: ["r_d_activity_present", "total_rd_expenses", "avg_prior_3yr_qres"],
781
- },
782
- ],
783
- };
784
- // ---------------------------------------------------------------------------
785
- // Master registry — keyed by backend documentType string
786
- // ---------------------------------------------------------------------------
787
- exports.DOCUMENT_FIELD_CATALOG = {
788
- profit_loss: PROFIT_LOSS,
789
- balance_sheet: BALANCE_SHEET,
790
- federal_tax_return: FEDERAL_TAX_RETURN,
791
- w3: W3,
792
- payroll_records: PAYROLL_RECORDS,
793
- schedule_k1_s_corp: SCHEDULE_K1_S_CORP,
794
- schedule_k1_partnership: SCHEDULE_K1_PARTNERSHIP,
795
- state_tax_return: STATE_TAX_RETURN,
796
- form_4562: FORM_4562,
797
- fixed_asset_schedule: FIXED_ASSET_SCHEDULE,
798
- schedule_se: SCHEDULE_SE,
799
- form_8829: FORM_8829,
800
- form_8889: FORM_8889,
801
- form_2553: FORM_2553,
802
- form_1099_nec_summary: FORM_1099_NEC_SUMMARY,
803
- vehicle_mileage_log: VEHICLE_MILEAGE_LOG,
804
- rent_roll: RENT_ROLL,
805
- mortgage_loan_documents: MORTGAGE_LOAN_DOCUMENTS,
806
- operating_agreement: OPERATING_AGREEMENT,
807
- rd_activity_documentation: RD_ACTIVITY_DOCUMENTATION,
808
410
  };