Implement Form.person() on fed2019 forms.
[ustaxlib.git] / src / fed2019 / Form1099DIV.ts
1 import { Form, Person } from '../core';
2 import { InputLine } from '../core/Line';
3
4 export interface Form1099DIVInput {
5 payer: string;
6 payee: Person;
7 ordinaryDividends?: number; // Includes qualifiedDividends.
8 qualifiedDividends?: number;
9 totalCapitalGain?: number;
10 unrecaptured1250Gain?: number;
11 section1202Gain?: number;
12 collectiblesGain?: number;
13 nondividendDistributions?: number;
14 fedIncomeTax?: number;
15 section199ADividends?: number;
16 investmentExpenses?: number;
17 foreignTaxPaid?: number;
18 foreignCountryOrPosession?: string;
19 cashLiquidationDistributions?: number;
20 noncashLiquidationDistributions?: number;
21 exemptInterestDividends?: number;
22 privateActivityBondDividends?: number;
23 };
24
25 class Input<T extends keyof Form1099DIVInput> extends InputLine<Form1099DIVInput, T> {};
26
27 export default class Form1099DIV extends Form<Form1099DIV['_lines'], Form1099DIVInput> {
28 readonly name = '1099-DIV';
29
30 readonly supportsMultipleCopies = true;
31
32 person() { return this.getInput('payee'); }
33
34 protected readonly _lines = {
35 'payer': new Input('payer'),
36 'recipient': new Input('payee'),
37 '1a': new Input('ordinaryDividends'),
38 '1b': new Input('qualifiedDividends'),
39 '2a': new Input('totalCapitalGain'),
40 '2b': new Input('unrecaptured1250Gain'),
41 '2c': new Input('section1202Gain'),
42 '2d': new Input('collectiblesGain'),
43 '3': new Input('nondividendDistributions'),
44 '4': new Input('fedIncomeTax'),
45 '5': new Input('section199ADividends'),
46 '6': new Input('investmentExpenses'),
47 '7': new Input('foreignTaxPaid'),
48 '8': new Input('foreignCountryOrPosession'),
49 '9': new Input('cashLiquidationDistributions'),
50 '10': new Input('noncashLiquidationDistributions'),
51 '11': new Input('exemptInterestDividends'),
52 '12': new Input('privateActivityBondDividends'),
53 };
54 }