# Tax documents and workpapers

Process Form 26AS, AIS, FIRA, Form 1099-B and trial balances, with source evidence and document-level reconciliation checks.

Source: https://books.openlumeo.com/docs/tax-and-workpapers

Start with an export from the source portal or system and verify the fields and totals the provider supports. Each layout supplies its own release checks, so review the assertions on each file.

## When to use this [#when-to-use-this]

Use this page when a Form 26AS, AIS, FIRA, Form 1099-B or trial balance must be checked against its own printed totals before it is used elsewhere. For bank statements, see [bank statements](/docs/bank-statements).

## 1. Identify the input [#1-identify-the-input]

| Input | Review after a release |
| --- | --- |
| Form 26AS | Check the tax amounts and group totals against the source statement. |
| Annual Information Statement (AIS) | Review the source fields, reported values and any printed totals. |
| Foreign Inward Remittance Advice (FIRA) | Inspect the remittance amount, currency and references before matching to a bank credit. |
| Form 1099-B | Inspect proceeds, basis and dates. The layout is tested on synthetic data. |
| Trial balance or supported Excel workpaper | Inspect the totals and the selected sheet's evidence. |

## 2. Prepare a workbook [#2-prepare-a-workbook]

1. Keep one supported table in the workbook. If two sheets match known layouts, export the intended table to its own workbook.
2. Preserve the header row and printed totals. Use plain values for required fields. A total based only on a workbook formula is insufficient evidence.
3. For a trial balance, confirm that the debit and credit columns represent the same reporting period and currency. Keep the original workbook available during review.

## 3. Process the files [#3-process-the-files]

After following the [Node.js installation guide](/docs/installation), install the tax wrapper with `npm install @lumeo_hq/openbooks`. Save this example as an `.mjs` file and run it from the directory containing the Form 26AS CSV and trial balance workbook.

~~~ts
import { runFiles } from "@lumeo_hq/openbooks/tax";

for (const result of await runFiles(["form-26as.csv", "trial-balance.xlsx"])) {
  if (result.kind === "released") {
    console.log(result.file, result.document.file.layout_version);
    console.log(result.document.assertions);
  } else {
    console.error(result.file, result.code, result.message);
  }
}
~~~

## 4. Review the records and proof [#4-review-the-records-and-proof]

Check the released layout ID and compare the applicable amounts in the table above with `assertions` and `evidence`. The [output contract](/docs/output-contract) describes the record collections and evidence fields. If the layout is unknown, compare the source headers with the [format matrix](/docs/formats). If an assertion fails, review the source totals and route the [refusal](/docs/refusals) for review.

Use the [workspace samples](/app) to practice these checks. For **Form 26AS (TDS)**, open **Checks** and look for the printed totals for tax deducted and tax deposited. For **Trial balance workbook**, review both the equality of debits and credits and each side's comparison with its printed total. In **Evidence**, locate the source used for a reported amount before carrying it into another system.

## Common refusals and what they mean [#common-refusals-and-what-they-mean]

- `UNKNOWN_LAYOUT`: the headers or sheet do not match a supported tax or workpaper layout. Compare them with the table in step 1 and the [format matrix](/docs/formats).
- `PARSE_ERROR`: a required field or total could not be read. Check that the printed totals are plain values, not formulas.
- `BALANCE_MISMATCH`: a document-level check failed, such as debits not equalling credits, or no independent total was present to verify against.
- `UNSUPPORTED_INPUT`: the file type, size or structure is outside the supported inputs.

See the [refusals page](/docs/refusals) for the full list and retry guidance.
