natercio 79513b00fa
Generate check / check-changes (pull_request) Successful in 42s
Generate check / verify-generate (pull_request) Skipped
Quality / check-changes (pull_request) Successful in 39s
Quality / check-go-mod-tidy (pull_request) Successful in 50s
Quality / check-go-vet (pull_request) Successful in 1m3s
Quality / run-tests (pull_request) Successful in 1m56s
Add jobs to check go mod and go vet
2026-08-03 09:15:25 +01:00
2026-08-03 00:33:06 +01:00
2026-07-11 15:24:54 +01:00
2026-08-03 09:15:25 +01:00
2026-08-03 09:15:25 +01:00
2026-07-11 15:24:54 +01:00
2025-11-14 16:34:59 +00:00
2026-08-03 00:33:06 +01:00

any2anexoj

Coverage Status

Screenshot

This tool converts the statements from known brokers and exchanges into a format compatible with section 9 from the Portuguese IRS form: Mod_3_anexo_j

Warning

Although I made significant efforts to ensure the correctness of the calculations you should verify any outputs produced by this tool on your own or with a certified accountant.

Install

go install github.com/nmoniz/any2anexoj/cmd/any2anexoj-cli@latest

Usage

cat statement.csv | any2anexoj-cli --platform=tranding212

Rounding

All Euro values are rounded to cents (2 decimal places) but internal calculations use the statement values with full precision. There are no explicit rules or details about how to round Euro values in Anexo J. This application rounds according to Portaria n.º 1180/2001, art. 2.º, alínea c) e d) (Ministerial Order / Government Order) examples, which imply we should round to the 2nd decimal place by rounding up (ceiling) or down (floor) depending on whether the third decimal place is ≥ 5 or < 5, respectively.

S
Description
Tools to help fill the Portuguese IRS form regarding investments.
Readme
458 KiB
Languages
Go 100%