]> src.bluestatic.org Git - ustaxlib.git/blob - examples/fed2019.ts
Upgrade to Node v16 for Github workflows.
[ustaxlib.git] / examples / fed2019.ts
1 import { Person } from 'ustaxlib/core';
2 import {
3 Form1040,
4 FilingStatus,
5 QDCGTaxWorksheet,
6 Form1099B,
7 Form1099DIV,
8 Form1099INT,
9 Form1116,
10 ForeignIncomeCategory,
11 Form8949,
12 Form8959,
13 Form8960,
14 Schedule1,
15 SALTWorksheet,
16 Schedule2,
17 ScheduleD,
18 TaxReturn,
19 W2,
20 Box13
21 } from 'ustaxlib/fed2019';
22
23 const tr = new TaxReturn();
24
25 const adam = Person.self('Adam');
26 const steve = Person.spouse('Steve');
27
28 tr.addPerson(adam);
29 tr.addPerson(steve);
30
31 tr.addForm(new Form1040({ filingStatus: FilingStatus.MarriedFilingJoint }));
32
33 // W-2
34 tr.addForm(new W2({
35 employer: 'Widgets Ltd.',
36 employee: adam,
37 wages: 106122.07,
38 fedIncomeTax: 16919.86,
39 socialSecurityWages: 26580,
40 socialSecuirtyTax: 1647.96,
41 medicareWages: 109922.07,
42 medicareTax: 2223.168,
43 box12: [
44 { code: 'D', amount: 19000.00 },
45 { code: 'W', amount: 4500.00 }
46 ],
47 box13: Box13.RetirementPlan
48 }));
49 tr.addForm(new W2({
50 employer: 'ACME Co.',
51 employee: steve,
52 wages: 17922.22,
53 fedIncomeTax: 1644.19,
54 socialSecurityWages: 18606,
55 socialSecuirtyTax: 8239.80,
56 medicareWages: 1153.57,
57 medicareTax: 298.4422,
58 box12: [
59 { code: 'D', amount: 19000.00 },
60 ],
61 box13: Box13.RetirementPlan
62 }));
63
64 // Investments
65 tr.addForm(new Form1099INT({
66 payer: 'Banco Savings',
67 payee: steve,
68 interest: 92.17,
69 }));
70 tr.addForm(new Form1099INT({
71 payer: 'Banco Checking',
72 payee: steve,
73 interest: 6.15,
74 }));
75 tr.addForm(new Form1099DIV({
76 payer: 'Banco Brokerage',
77 payee: adam,
78 ordinaryDividends: 110.04,
79 qualifiedDividends: 81.11,
80 totalCapitalGain: 8.88,
81 foreignTaxPaid: 42.44,
82 }));
83 tr.addForm(new Form1099B({
84 payer: 'Banco Brokerage',
85 payee: steve,
86 shortTermBasisReported: [
87 {
88 description: 'VARIOUS',
89 proceeds: 18527.27,
90 costBasis: 19291.09,
91 }
92 ],
93 longTermBasisReported: [
94 {
95 description: 'VARIOUS',
96 proceeds: 13897.39,
97 costBasis: 15112.26,
98 }
99 ],
100 longTermBasisUnreported: [
101 {
102 description: 'VARIOUS',
103 proceeds: 4552.76,
104 costBasis: 4523.39,
105 }
106 ]
107 }));
108
109 // Joint investments
110 tr.addForm(new Form1099DIV({
111 payer: 'Banco Brokerage',
112 payee: Person.joint,
113 exemptInterestDividends: 315.98,
114 privateActivityBondDividends: 14.92
115 }));
116
117
118 // Joint forms
119 tr.addForm(new Form1116({
120 person: Person.joint,
121 incomeCategory: ForeignIncomeCategory.C,
122 posessionName: 'RIC',
123 grossForeignIncome: 918.12,
124 totalForeignTaxesPaidOrAccrued: 42.44
125 }));
126 tr.addForm(new Schedule1({
127 stateAndLocalTaxableRefunds: 3201,
128 }));
129 tr.addForm(new SALTWorksheet({
130 prevYearSalt: 19381.13,
131 limitedPrevYearSalt: 10000,
132 prevYearItemizedDeductions: 0,
133 prevYearFilingStatus: FilingStatus.MarriedFilingJoint
134 }));
135
136 tr.addForm(new Form8949);
137 tr.addForm(new Form8959);
138 tr.addForm(new Form8960);
139 tr.addForm(new Schedule2);
140 tr.addForm(new ScheduleD);
141 tr.addForm(new QDCGTaxWorksheet);
142
143 export default tr;