newjersey / taxation-mef-viewer

Fork of betson/irs-efile-viewer for DOT use
MIT License
0 stars 0 forks source link

[BUG] Enable viewer to display duplicate tax forms #18

Closed jachan closed 1 month ago

jachan commented 1 month ago

Background

Investigation of ticket https://github.com/newjersey/taxation-mef-viewer/issues/17 revealed that there is a bug in the MeF viewer. When a tax form with multiple instances of the same form (e.g. multiple 926) is viewed, only the first instance is displayed. This occurs in 26 out of 30+ of the tax forms in the Consolidated Group XML forms.

Step to reproduce

  1. Navigate to Beta MeF Viewer
  2. Open Consolidated Group XML provided by Joe
  3. Validate that XML contains multiple entries for "FairMarketValueAmt" in 926 but opening the 926 in the viewer only shows the first entry.

Acceptance Criteria

Fix is merged and deployed to the beta site.

jachan commented 1 month ago

Root cause is that the moveHeaderAndMainForm function is configured to only take the first instance of a tag name. See line 283 in transform.js.