Wenche.Aarsregnskap (wenche v0.3.0)

Copy Markdown View Source

Annual accounts submission to Brønnøysundregistrene via Altinn 3.

Ported from wenche/aarsregnskap.py in the original Python Wenche project.

Handles config reading, validation, and submission of annual accounts.

Summary

Functions

Reads a config.yaml file and returns an Aarsregnskap struct.

Submits the annual accounts to Brønnøysundregistrene via Altinn.

Validates the accounts and returns a list of error messages.

Functions

les_config(config_fil)

Reads a config.yaml file and returns an Aarsregnskap struct.

Returns {:ok, aarsregnskap} or {:error, reason}.

send_inn(regnskap, client, opts \\ [])

Submits the annual accounts to Brønnøysundregistrene via Altinn.

To inspect the generated XML without submitting, call Wenche.BrgXml.generer_hovedskjema/2 and Wenche.BrgXml.generer_underskjema/1 directly.

Returns {:ok, inbox_url} or {:error, reason}.

valider(regnskap)

Validates the accounts and returns a list of error messages.

Empty list means OK.