]> src.bluestatic.org Git - ustaxlib.git/blob - src/fed2019/Form1099INT.ts
Simplify the Trace API further.
[ustaxlib.git] / src / fed2019 / Form1099INT.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 Form1099INTInput {
10 payer: string;
11 payee: Person;
12 interest: number;
13 earlyWithdrawalPenalty?: number;
14 interestOnUsSavingsBondOrTreas?: number;
15 fedIncomeTax?: number;
16 investmentExpenses?: number;
17 foreignTaxPaid?: number;
18 foreignCountryOrPosession?: string;
19 taxExemptInterest?: number;
20 privateActivityBondInterest?: number;
21 marketDiscount?: number;
22 bondPremium?: number;
23 bondPremiumOnTreas?: number;
24 bondPremiumOnTaxExempt?: number;
25 };
26
27 class Input<T extends keyof Form1099INTInput> extends InputLine<Form1099INTInput, T> {};
28
29 export default class Form1099INT extends Form<Form1099INT['_lines'], Form1099INTInput> {
30 readonly name = '1099-INT';
31
32 readonly supportsMultipleCopies = true;
33
34 person() { return this.getInput('payee'); }
35
36 protected readonly _lines = {
37 'payer': new Input('payer'),
38 'recipient': new Input('payee'),
39 '1': new Input('interest'),
40 '2': new Input('earlyWithdrawalPenalty'),
41 '3': new Input('interestOnUsSavingsBondOrTreas'),
42 '4': new Input('fedIncomeTax', undefined, 0),
43 '5': new Input('investmentExpenses'),
44 '6': new Input('foreignTaxPaid', undefined, 0),
45 '7': new Input('foreignCountryOrPosession'),
46 '8': new Input('taxExemptInterest', undefined, 0),
47 '9': new Input('privateActivityBondInterest'),
48 '10': new Input('marketDiscount'),
49 '11': new Input('bondPremium'),
50 '12': new Input('bondPremiumOnTreas'),
51 '13': new Input('bondPremiumOnTaxExempt')
52 };
53 };