From cdc4a822620ef8f153e1ae3a269a8a9dcebf0101 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 16 Mar 2020 23:22:02 -0400 Subject: [PATCH] Include exempt interest dividends in 1040-2a. --- src/fed2019/Form1040.test.ts | 22 ++++++++++++++++++++++ src/fed2019/Form1040.ts | 6 +++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/fed2019/Form1040.test.ts b/src/fed2019/Form1040.test.ts index 2826d62..6bdb027 100644 --- a/src/fed2019/Form1040.test.ts +++ b/src/fed2019/Form1040.test.ts @@ -91,6 +91,28 @@ test('dividend income', () => { expect(f1040.getValue(tr, '3b')).toBe(200); }); +test('tax-exempt interest', () => { + const p = Person.self('A'); + const tr = new TaxReturn(); + tr.addPerson(p); + tr.addForm(new Form1099DIV({ + payer: 'Brokerage', + payee: p, + exemptInterestDividends: 100, + })); + tr.addForm(new Form1099INT({ + payer: 'Bank', + payee: p, + interest: 0, + taxExemptInterest: 50 + })); + + const f1040 = new Form1040(); + tr.addForm(f1040); + + expect(f1040.getValue(tr, '2a')).toBe(150); +}); + test('capital gain/loss', () => { const p = Person.self('A'); const tr = new TaxReturn(); diff --git a/src/fed2019/Form1040.ts b/src/fed2019/Form1040.ts index 96627d0..eacae09 100644 --- a/src/fed2019/Form1040.ts +++ b/src/fed2019/Form1040.ts @@ -34,7 +34,11 @@ export default class Form1040 extends Form { protected readonly _lines = { '1': new AccumulatorLine(W2, '1', 'Wages, salaries, tips, etc.'), - '2a': new AccumulatorLine(Form1099INT, '8', 'Tax-exempt interest'), + '2a': new ComputedLine((tr): number => { + const value = (new AccumulatorLine(Form1099INT, '8')).value(tr) + + (new AccumulatorLine(Form1099DIV, '11')).value(tr); + return value; + }, 'Tax-exempt interest'), '2b': new AccumulatorLine(Form1099INT, '1', 'Taxable interest'), '3a': new AccumulatorLine(Form1099DIV, '1b', 'Qualified dividends'), '3b': new AccumulatorLine(Form1099DIV, '1a', 'Ordinary dividends'), -- 2.22.5