neuronix-node 0.1.0 → 0.5.0
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.
- package/dist/handlers/ap-aging.d.ts +2 -0
- package/dist/handlers/ap-aging.js +91 -0
- package/dist/handlers/ar-aging.d.ts +2 -0
- package/dist/handlers/ar-aging.js +101 -0
- package/dist/handlers/bank-reconciliation.d.ts +2 -0
- package/dist/handlers/bank-reconciliation.js +96 -0
- package/dist/handlers/budget-vs-actuals.d.ts +2 -0
- package/dist/handlers/budget-vs-actuals.js +70 -0
- package/dist/handlers/cash-flow.d.ts +2 -0
- package/dist/handlers/cash-flow.js +87 -0
- package/dist/handlers/chat.d.ts +5 -0
- package/dist/handlers/chat.js +336 -0
- package/dist/handlers/department-spending.d.ts +2 -0
- package/dist/handlers/department-spending.js +83 -0
- package/dist/handlers/depreciation.d.ts +2 -0
- package/dist/handlers/depreciation.js +93 -0
- package/dist/handlers/expense.js +166 -35
- package/dist/handlers/file-processor.js +1 -1
- package/dist/handlers/index.d.ts +0 -6
- package/dist/handlers/index.js +26 -6
- package/dist/handlers/payroll.d.ts +2 -0
- package/dist/handlers/payroll.js +101 -0
- package/dist/handlers/sales-tax.d.ts +2 -0
- package/dist/handlers/sales-tax.js +89 -0
- package/dist/handlers/variance-analysis.d.ts +2 -0
- package/dist/handlers/variance-analysis.js +73 -0
- package/dist/handlers/w2-1099.d.ts +2 -0
- package/dist/handlers/w2-1099.js +87 -0
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleW21099 = handleW21099;
|
|
4
|
+
async function handleW21099(task) {
|
|
5
|
+
const start = Date.now();
|
|
6
|
+
const input = task.input_payload;
|
|
7
|
+
const taxYear = input.tax_year || "2025";
|
|
8
|
+
const company = input.company_name || "Company Name";
|
|
9
|
+
const employees = input.employees || [
|
|
10
|
+
{ name: "John Smith", ssn_last4: "1234", wages: 85000, federal_tax_withheld: 14280, state_tax_withheld: 4250, social_security_wages: 85000, social_security_tax: 5270, medicare_wages: 85000, medicare_tax: 1232.50, state: "CA" },
|
|
11
|
+
{ name: "Jane Doe", ssn_last4: "5678", wages: 72000, federal_tax_withheld: 11520, state_tax_withheld: 3600, social_security_wages: 72000, social_security_tax: 4464, medicare_wages: 72000, medicare_tax: 1044, state: "CA" },
|
|
12
|
+
{ name: "Alice Chen", ssn_last4: "9012", wages: 95000, federal_tax_withheld: 17100, state_tax_withheld: 4750, social_security_wages: 95000, social_security_tax: 5890, medicare_wages: 95000, medicare_tax: 1377.50, state: "CA" },
|
|
13
|
+
];
|
|
14
|
+
const contractors = input.contractors || [
|
|
15
|
+
{ name: "Bob's Web Design", tin_last4: "4321", total_paid: 15000, type: "NEC" },
|
|
16
|
+
{ name: "Marketing Maven LLC", tin_last4: "8765", total_paid: 28000, type: "NEC" },
|
|
17
|
+
{ name: "Office Cleaning Pro", tin_last4: "2468", total_paid: 9600, type: "NEC" },
|
|
18
|
+
];
|
|
19
|
+
const totalWages = round(employees.reduce((s, e) => s + e.wages, 0));
|
|
20
|
+
const totalFedWithheld = round(employees.reduce((s, e) => s + e.federal_tax_withheld, 0));
|
|
21
|
+
const totalStateWithheld = round(employees.reduce((s, e) => s + e.state_tax_withheld, 0));
|
|
22
|
+
const totalSSWithheld = round(employees.reduce((s, e) => s + e.social_security_tax, 0));
|
|
23
|
+
const totalMedicareWithheld = round(employees.reduce((s, e) => s + e.medicare_tax, 0));
|
|
24
|
+
const totalContractorPaid = round(contractors.reduce((s, c) => s + c.total_paid, 0));
|
|
25
|
+
const contractors1099 = contractors.filter(c => c.total_paid >= 600);
|
|
26
|
+
const csv = [
|
|
27
|
+
`W-2 AND 1099 COMPILATION — TAX YEAR ${taxYear}`,
|
|
28
|
+
`Company: ${company}`,
|
|
29
|
+
`Generated: ${new Date().toISOString().split("T")[0]}`,
|
|
30
|
+
`Filing Deadline: ${parseInt(taxYear) + 1}-01-31`,
|
|
31
|
+
"",
|
|
32
|
+
"W-2 EMPLOYEE SUMMARY",
|
|
33
|
+
"Employee,SSN (last 4),Gross Wages,Federal Tax,State Tax,SS Tax,Medicare Tax,State",
|
|
34
|
+
...employees.map(e => `${esc(e.name)},***-**-${e.ssn_last4},${fmt(e.wages)},${fmt(e.federal_tax_withheld)},${fmt(e.state_tax_withheld)},${fmt(e.social_security_tax)},${fmt(e.medicare_tax)},${e.state || ""}`),
|
|
35
|
+
"",
|
|
36
|
+
"W-2 TOTALS",
|
|
37
|
+
`Total Wages,${fmt(totalWages)}`,
|
|
38
|
+
`Total Federal Tax Withheld,${fmt(totalFedWithheld)}`,
|
|
39
|
+
`Total State Tax Withheld,${fmt(totalStateWithheld)}`,
|
|
40
|
+
`Total Social Security Tax,${fmt(totalSSWithheld)}`,
|
|
41
|
+
`Total Medicare Tax,${fmt(totalMedicareWithheld)}`,
|
|
42
|
+
`Total W-2s to Issue,${employees.length}`,
|
|
43
|
+
"",
|
|
44
|
+
"1099-NEC CONTRACTOR SUMMARY",
|
|
45
|
+
"Contractor,TIN (last 4),Total Paid,Form Required?,Type",
|
|
46
|
+
...contractors.map(c => `${esc(c.name)},***-**-${c.tin_last4},${fmt(c.total_paid)},${c.total_paid >= 600 ? "YES" : "No (under $600)"},${c.type || "NEC"}`),
|
|
47
|
+
"",
|
|
48
|
+
"1099 TOTALS",
|
|
49
|
+
`Total Paid to Contractors,${fmt(totalContractorPaid)}`,
|
|
50
|
+
`1099s Required (>=$600),${contractors1099.length}`,
|
|
51
|
+
`Contractors Under $600 Threshold,${contractors.length - contractors1099.length}`,
|
|
52
|
+
"",
|
|
53
|
+
"FILING CHECKLIST",
|
|
54
|
+
`Task,Status`,
|
|
55
|
+
`Verify all employee SSNs,Pending`,
|
|
56
|
+
`Verify all contractor TINs,Pending`,
|
|
57
|
+
`Review wage and tax totals,Pending`,
|
|
58
|
+
`Print/e-file W-2s,Pending`,
|
|
59
|
+
`Print/e-file 1099s,Pending`,
|
|
60
|
+
`Mail copies to employees by ${parseInt(taxYear) + 1}-01-31,Pending`,
|
|
61
|
+
`Mail copies to contractors by ${parseInt(taxYear) + 1}-01-31,Pending`,
|
|
62
|
+
`File W-3 transmittal with SSA,Pending`,
|
|
63
|
+
`File 1096 transmittal with IRS,Pending`,
|
|
64
|
+
"",
|
|
65
|
+
"EMPLOYER TAX OBLIGATIONS",
|
|
66
|
+
`Employer SS Match (6.2%),${fmt(totalSSWithheld)}`,
|
|
67
|
+
`Employer Medicare Match (1.45%),${fmt(totalMedicareWithheld)}`,
|
|
68
|
+
`Total Employer Tax,${fmt(round(totalSSWithheld + totalMedicareWithheld))}`,
|
|
69
|
+
];
|
|
70
|
+
return {
|
|
71
|
+
text: `W-2/1099 Compilation: ${employees.length} W-2s + ${contractors1099.length} 1099s | Total Wages: ${fmt(totalWages)} | Contractor Payments: ${fmt(totalContractorPaid)}`,
|
|
72
|
+
output_csv: csv.join("\n"),
|
|
73
|
+
summary: {
|
|
74
|
+
tax_year: taxYear,
|
|
75
|
+
w2_count: employees.length,
|
|
76
|
+
total_wages: totalWages,
|
|
77
|
+
total_fed_withheld: totalFedWithheld,
|
|
78
|
+
contractor_count: contractors1099.length,
|
|
79
|
+
total_contractor_paid: totalContractorPaid,
|
|
80
|
+
filing_deadline: `${parseInt(taxYear) + 1}-01-31`,
|
|
81
|
+
},
|
|
82
|
+
duration_ms: Date.now() - start,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function round(n) { return Math.round(n * 100) / 100; }
|
|
86
|
+
function fmt(n) { return "$" + n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }); }
|
|
87
|
+
function esc(v) { return v.includes(",") ? `"${v}"` : v; }
|