Add license information.
[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<Form1099DIV['_lines'], Form1099DIVInput> {
33 readonly name = '1099-DIV';
34
35 readonly supportsMultipleCopies = true;
36
37 person() { return this.getInput('payee'); }
38
39 protected readonly _lines = {
40 'payer': new Input('payer'),
41 'recipient': new Input('payee'),
42 '1a': new Input('ordinaryDividends'),
43 '1b': new Input('qualifiedDividends'),
44 '2a': new Input('totalCapitalGain'),
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'),
50 '5': new Input('section199ADividends'),
51 '6': new Input('investmentExpenses'),
52 '7': new Input('foreignTaxPaid'),
53 '8': new Input('foreignCountryOrPosession'),
54 '9': new Input('cashLiquidationDistributions'),
55 '10': new Input('noncashLiquidationDistributions'),
56 '11': new Input('exemptInterestDividends'),
57 '12': new Input('privateActivityBondDividends'),
58 };
59 }