Skip to content

Latest commit

 

History

History
131 lines (83 loc) · 5.95 KB

README.md

File metadata and controls

131 lines (83 loc) · 5.95 KB

1120x

The project is irs sub project to support IRS Modernized e-File Forms 1120, 1120S, and 1120-F for Tax Year 2020 and beyond.

1120x is a subset of moov.io IRS project. It'll support Modernized e-File payload production for the 1120 family forms for tax year 2020 and beyond.

- 1120        U.S. Corporation Income Tax Return.
- 1120S       U.S. Income Tax Return for an S Corporation.
- 1120-F      U.S. Income Tax Return of a Foreign Corporation.
- 1120-POL    U.S. Income Tax Return for Certain Political Organizations.

Suport for more business related form types will be added in subsequent version updates.

Terminology

  • Manifest

    "ManifestXML" is a manifest.xml file, which provides information about the Submission.

  • Return

    "Return" is return schema for irs forms. example : Return990.xsd

  • Submission

    An IRS submission consists of XML data and optional binary attachments (PDF Files), which are packaged and compressed into a zip file. In this project submission zip archive is called submission.

Features

Irs e-file logic

1120x project is to get transmission (submission) file structures for internet filing (IFA) and application-to-application (A2A). Both channels use simple object access protocol (SOAP) with attachments. We can get envelope and attachments of SOAP message from JSON or XML input file using 1120x project.

IrsTransmissionFile is interface for irs transmission file instance. there are 2 main functions to get data.

  • SOAPEnvelope
  • SOAPAttachment

User can create SOAP message of return or state using 1120x package easily.

Main focus of this project is to convert from JSON and/or XML input to irs e-file structure (i.e. raw data of SOAP envelope and attachments).

Produced SOAP data must satisfy the Assurance Testing System (ATS) requirements set out by the IRS for all supported form types.

Input Output
JSON JSON
XML XML
Irs e-file
SQL

Go Codes from XSD files

We should get golang codes from xsd files that provided irs. There are many method to get go code from XSD, but perfect tool (application) for this don't exist. Because there are many problems about xml version, tags, etc.

To get go code from XSD files, we can use xsdgen (https://godoc.org/aqwari.net/xml/cmd/xsdgen) and following steps.

  1. create a merged xsd file
    xsdgen don't support include tag, so should create a merged xsd file to import other xsd file instead of include tag.
  2. remove repeated go structures
    any go structures can be repeated in generated code, so the structures need to be removed manually.
  3. change field value to pointer, add json tag
    if field have omitempty tag, we need to change pointer the field, add json tag of omitempty.
  4. remove unnecessary xml namespace

PDF

Other feature of the package is to create pdf file from XML and XSD files.

Input Output
XML PDF

PDF Generator

The IRS publishes stylesheets that can be used to transform XML document into HTML. Specifically, these XSLT (eXtensible Stylesheet Language Transformation) files are distributed each year by the IRS so that tax preparers can generate tools that submit tax filings in the proper format.

To generate pdf from stylesheets and input xml (return.xml)

  • XML -> HTML -> PDF
    we don't create pdf for any return from input xml and stylesheets.
    we should use html as temporary result.

XML -> HTML
There are 2 methods to get html in 1120x package.

  • To use github.com/jbowtie/ratago/xslt
    the method used go package, but there is a problem that XSD parameters are invalid sometimes.
  • To use http://xmlsoft.org/XSLT/xsltproc.html
    the method should use application file (xsltproc), but above problem is fixed.

HTML -> PDF
Used go-wkhtmltopdf to convert pdf file. (based wkhtmltopdf)

After implement main features, we should merge https://github.com/moov-io/irs and https://github.com/moov-io/1120x.

Getting Help

channel info
Project Documentation Our project documentation available online.
Twitter @moov You can follow Moov.io's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack Join our slack channel (#irs) to have an interactive discussion about the development of the project.

Supported and Tested Platforms

  • 64-bit Linux (Ubuntu, Debian) and macOS

Contributing

Yes please! Please review our Contributing guide and Code of Conduct to get started! Checkout our issues for first time contributors for something to help out with.

This project uses Go Modules and uses Go 1.14 or higher. See Golang's install instructions for help setting up Go. You can download the source code and we offer tagged and released versions as well. We highly recommend you use a tagged release for production.

Test Coverage

Improving test coverage is a good candidate for new contributors while also allowing the project to move more quickly by reducing regressions issues that might not be caught before a release is pushed out to our users. One great way to improve coverage is by adding edge cases and different inputs to functions (or contributing and running fuzzers).

License

Apache License 2.0 See LICENSE for details.