Implement Form.person() on fed2019 forms.
authorRobert Sesek <rsesek@bluestatic.org>
Fri, 13 Mar 2020 04:43:28 +0000 (00:43 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Fri, 13 Mar 2020 04:43:28 +0000 (00:43 -0400)
src/fed2019/Form1040.test.ts
src/fed2019/Form1099B.ts
src/fed2019/Form1099DIV.ts
src/fed2019/Form1099INT.ts
src/fed2019/Form1099R.ts
src/fed2019/Form1116.test.ts
src/fed2019/Form8606.test.ts
src/fed2019/Form8606.ts
src/fed2019/Form8949.test.ts
src/fed2019/Form8960.test.ts
src/fed2019/Schedule3.test.ts

index 12f1ba9d560a373e54c551350e5ec69e4a6c5c00..c498cc4dfbc72f11a3cc63132175cb70c7661ec2 100644 (file)
@@ -18,6 +18,8 @@ test('w2 wages', () => {
   const pa = Person.self('A');
   const pb = Person.spouse('B');
   const tr = new TaxReturn();
+  tr.addPerson(pa);
+  tr.addPerson(pb);
   tr.addForm(new W2({
     employer: 'AA',
     employee: pa,
@@ -42,6 +44,7 @@ test('w2 wages', () => {
 test('interest income', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1099INT({
     payer: 'Bank',
     payee: p,
@@ -65,6 +68,7 @@ test('interest income', () => {
 test('dividend income', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   const f1099div = new Form1099DIV({
     payer: 'Brokerage',
     payee: p,
@@ -85,6 +89,7 @@ test('dividend income', () => {
 test('capital gain/loss', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1040({ filingStatus: FilingStatus.Single }));
   tr.addForm(new W2({
     employer: 'Money',
@@ -110,6 +115,7 @@ test('capital gain/loss', () => {
 test('require Form8959', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new W2({
     employer: 'Company',
     employee: p,
@@ -130,6 +136,7 @@ test('require Form8959', () => {
 test('backdoor and megabackdoor roth', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1099R({
     payer: 'Roth',
     payee: p,
index dbd8de234e2b87d42cf1504d1541c8ad2e0b0cd3..ebe1ebe229ea3813d91cd3e38ba183c6d784200b 100644 (file)
@@ -48,6 +48,8 @@ export default class Form1099B extends Form<Form1099B['_lines'], Form1099BInput>
 
   readonly supportsMultipleCopies = true;
 
+  person() { return this.getInput('payee'); }
+
   protected readonly _lines = {
     'payer': new Input('payer'),
     'recipient': new Input('payee'),
index fbbfe6b4124aa59d90775152c38d013d2cafc559..ff1a636b539f8edf1d0bba270b13b217713935f6 100644 (file)
@@ -29,6 +29,8 @@ export default class Form1099DIV extends Form<Form1099DIV['_lines'], Form1099DIV
 
   readonly supportsMultipleCopies = true;
 
+  person() { return this.getInput('payee'); }
+
   protected readonly _lines = {
     'payer': new Input('payer'),
     'recipient': new Input('payee'),
index 0d8865a64206fd3c5853483f4b7165c0829c9889..731f8f4f2fbfa5e7b7d5ce034bf7cc383d42008c 100644 (file)
@@ -26,6 +26,8 @@ export default class Form1099INT extends Form<Form1099INT['_lines'], Form1099INT
 
   readonly supportsMultipleCopies = true;
 
+  person() { return this.getInput('payee'); }
+
   protected readonly _lines = {
     'payer': new Input('payer'),
     'recipient': new Input('payee'),
index f1ba8337bceb20be0dcaa49b71dd45d455579b96..4715ff7ff92e9d06364fccce679adf0206473b0a 100644 (file)
@@ -54,6 +54,8 @@ export default class Form1099R extends Form<Form1099R['_lines'], Form1099RInput>
 
   readonly supportsMultipleCopies = true;
 
+  person() { return this.getInput('payee'); }
+
   protected readonly _lines = {
     'payer': new Input('payer'),
     'recipeint': new Input('payee'),
index add04cc18db61edb9bdaefe2b065cf3e77423bf9..27c69ba625d62f1f6e48a2bd2c7a40cbf9687b24 100644 (file)
@@ -86,6 +86,7 @@ test('foreign tax credit', () => {
 test('no net capital losses in total income', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1040({
     filingStatus: FilingStatus.MarriedFilingJoint
   }));
index 643c8e4ebaa3b8da14bac386ef1d77c36b99f8b2..32e19a78096ddb5fc52fdc083a7b53849e8ed630 100644 (file)
@@ -7,6 +7,7 @@ import TaxReturn from './TaxReturn';
 test('skip part 1', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   const f = new Form8606({
     person: p,
     nondeductibleContributions: 6000,
@@ -21,6 +22,7 @@ test('skip part 1', () => {
 test('Roth conversion no basis', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   const f = new Form8606({
     person: p,
     nondeductibleContributions: 6000,
index 0e9d1ce6acbb344cc6c8f67fdfa68ac940d8b3b1..4e436bcfffff00fc5849f6139e34ef3ce8fda306 100644 (file)
@@ -20,6 +20,8 @@ export default class Form8606 extends Form<Form8606['_lines'], Form8606Input> {
 
   readonly supportsMultipleCopies = true;
 
+  person() { return this.getInput('person'); }
+
   protected readonly _lines = {
     'person': new Input('person'),
 
index 471918185aab1c63e973a79b4f8dd24b2c8e748d..e4a8125be1c4c4b772a91e33cfc77dc588206e13 100644 (file)
@@ -10,6 +10,7 @@ describe('single form', () => {
     test(`box ${Form8949Box[box]}`, () => {
       const p = Person.self('A');
       const tr = new TaxReturn();
+      tr.addPerson(p);
       tr.addForm(new Form1040({ filingStatus: FilingStatus.Single }));
       tr.addForm(new Form1099B({
         payer: 'Brokerage',
@@ -49,6 +50,7 @@ describe('single form', () => {
 test('multiple forms', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1040({ filingStatus: FilingStatus.Single }));
   tr.addForm(new Form1099B({
     payer: 'Brokerage',
@@ -106,6 +108,7 @@ test('multiple forms', () => {
 test('adjustments', () => {
   const p = Person.self('A');
   const tr = new TaxReturn();
+  tr.addPerson(p);
   tr.addForm(new Form1040({ filingStatus: FilingStatus.Single }));
   const b1 = new Form1099B({
     payer: 'Brokerage',
index 093ae2ab5cd5a44adfeb908e69d0608ea4eb4905..5c32ab90809ce203738259627a98d30177981851 100644 (file)
@@ -23,6 +23,7 @@ describe('net investment income tax', () => {
     test(`filing status ${filingStatus}`, () => {
       const p = Person.self('A');
       const tr = new TaxReturn();
+      tr.addPerson(p);
       tr.addForm(new Form1040({ filingStatus }));
       tr.addForm(new Form1099DIV({
         payer: 'Brokerage',
@@ -83,6 +84,7 @@ describe('no net investment income tax', () => {
     test(`filing status ${filingStatus}`, () => {
       const p = Person.self('A');
       const tr = new TaxReturn();
+      tr.addPerson(p);
       tr.addForm(new Form1040({ filingStatus }));
       tr.addForm(new Form1099DIV({
         payer: 'Brokerage',
index 1e7a0baaf69cc889ba73655163f47a2a96e35362..aa5080bbb90a1bebf0a3d5440cac275fb87148e6 100644 (file)
@@ -19,6 +19,7 @@ test('foreign tax credit, form 1116 not required', () => {
   for (const filingStatus of Object.values(FilingStatus)) {
     const p = Person.self('A');
     const tr = new TaxReturn();
+    tr.addPerson(p);
     tr.addForm(new Form1040({ filingStatus }));
     tr.addForm(new Form8949);
     tr.addForm(new ScheduleD);
@@ -47,6 +48,7 @@ test('foreign tax credit, form 1116 required', () => {
   for (const filingStatus of Object.values(FilingStatus)) {
     const p = Person.self('A');
     const tr = new TaxReturn();
+    tr.addPerson(p);
     tr.addForm(new Form1040({ filingStatus }));
     tr.addForm(new Form8949);
     tr.addForm(new ScheduleD);