]> src.bluestatic.org Git - ustaxlib.git/blob - src/fed2019/Form1099DIV.ts
Remove the need to self-reference Form['lines'] in Form subclasses.
[ustaxlib.git] / src / fed2019 / Form1099DIV.ts
1 // Copyright 2020 Blue Static <https://www.bluestatic.org>
2 // This program is free software licensed under the GNU General Public License,
3 // version 3.0. The full text of the license can be found in LICENSE.txt.
4 // SPDX-License-Identifier: GPL-3.0-only
5
6 import { Form, Person } from '../core';
7 import { InputLine } from '../core/Line';
8
9 export interface Form1099DIVInput {
10 payer: string;
11 payee: Person;
12 ordinaryDividends?: number; // Includes qualifiedDividends.
13 qualifiedDividends?: number;
14 totalCapitalGain?: number;
15 unrecaptured1250Gain?: number;
16 section1202Gain?: number;
17 collectiblesGain?: number;
18 nondividendDistributions?: number;
19 fedIncomeTax?: number;
20 section199ADividends?: number;
21 investmentExpenses?: number;
22 foreignTaxPaid?: number;
23 foreignCountryOrPosession?: string;
24 cashLiquidationDistributions?: number;
25 noncashLiquidationDistributions?: number;
26 exemptInterestDividends?: number;
27 privateActivityBondDividends?: number;
28 };
29
30 class Input<T extends keyof Form1099DIVInput> extends InputLine<Form1099DIVInput, T> {};
31
32 export default class Form1099DIV extends Form<Form1099DIVInput> {
33 readonly name = '1099-DIV';
34
35 readonly supportsMultipleCopies = true;
36
37 person() { return this.getInput('payee'); }
38
39 readonly lines = {
40 'payer': new Input('payer'),
41 'recipient': new Input('payee'),
42 '1a': new Input('ordinaryDividends', undefined, 0),
43 '1b': new Input('qualifiedDividends', undefined, 0),
44 '2a': new Input('totalCapitalGain', undefined, 0),
45 '2b': new Input('unrecaptured1250Gain'),
46 '2c': new Input('section1202Gain'),
47 '2d': new Input('collectiblesGain'),
48 '3': new Input('nondividendDistributions'),
49 '4': new Input('fedIncomeTax', undefined, 0),
50 '5': new Input('section199ADividends', undefined, 0),
51 '6': new Input('investmentExpenses'),
52 '7': new Input('foreignTaxPaid', undefined, 0),
53 '8': new Input('foreignCountryOrPosession'),
54 '9': new Input('cashLiquidationDistributions'),
55 '10': new Input('noncashLiquidationDistributions'),
56 '11': new Input('exemptInterestDividends', undefined, 0),
57 '12': new Input('privateActivityBondDividends', undefined, 0),
58 };
59 }