Revert "Make SupportsMultipleCopies an interface."
[ustaxlib.git] / src / fed2019 / FormW2.ts
1 import Form from '../Form';
2 import { Line, InputLine } from '../Line';
3 import Person from '../Person';
4
5 export enum Box13 {
6 StatutoryEmployee,
7 RetirementPlan,
8 ThirdPartySickPay
9 };
10
11 export interface CodeAndAmount {
12 code: string;
13 amount: number;
14 };
15
16 export interface W2Input {
17 employer: string;
18 employee: Person;
19 wages?: number;
20 fedIncomeTax?: number;
21 socialSecurityWages?: number;
22 socialSecuirtyTax?: number;
23 medicareWages?: number;
24 medicareTax?: number;
25 socialSecurityTips?: number;
26 allocatedTips?: number;
27 dependentCareBenefits?: number;
28 nonqualifiedPlans?: number;
29 box12?: CodeAndAmount[];
30 box13?: Box13;
31 box14?: CodeAndAmount[];
32 };
33
34 class Input<T extends keyof W2Input> extends InputLine<W2Input, T> {};
35
36 export default class W2 extends Form<W2Input> {
37 get name(): string { return 'W-2'; }
38
39 readonly supportsMultipleCopies = true;
40
41 aggregate(f: Form[]): this { return null; }
42
43 protected getLines(): Line<any>[] {
44 return [
45 new Input('c', 'employer', 'Employer name'),
46 new Input('e', 'employee', 'Emplyee name'),
47 new Input('1', 'wages', 'Wages, tips, other compensation'),
48 new Input('2', 'fedIncomeTax', 'Federal income tax withheld'),
49 new Input('3', 'socialSecurityWages', 'Social security wages'),
50 new Input('4', 'socialSecuirtyTax', 'Social security tax withheld'),
51 new Input('5', 'medicareWages', 'Medicare wages and tips'),
52 new Input('6', 'medicareTax', 'Medicare tax withheld'),
53 new Input('7', 'socialSecurityTips', 'Social security tips'),
54 new Input('8', 'allocatedTips', 'Allocated tips'),
55 new Input('10', 'dependentCareBenefits', 'Dependent care benefits'),
56 new Input('11', 'nonqualifiedPlans','Nonqualified plans'),
57 new Input('12', 'box12', 'Box 12'),
58 new Input('13', 'box13', 'Box 13'),
59 new Input('14', 'box14', 'Other'),
60 ];
61 }
62 };