XML generation for MVA-melding (VAT return) submission to Skatteetaten via Altinn 3.
Generates two XML documents:
mvaMeldingInnsending— the envelope (konvolutt)mvaMeldingDto— the actual VAT return data
Summary
Functions
Generates the mvaMeldingInnsending (konvolutt/envelope) XML.
Generates the mvaMeldingDto (the actual VAT return) XML.
Builds the <periode> element contents for the given mva_data, choosing
between the bimonthly (skattleggingsperiodeToMaaneder) and annual
(skattleggingsperiodeAar) variants based on :filing_frequency.
Maps a termin number (1-6) to the skattleggingsperiodeToMaaneder string.
Functions
Generates the mvaMeldingInnsending (konvolutt/envelope) XML.
The mva_data map must contain:
:org_nummer— organization number:termin— 1-6 (bimonthly) or 1 (annual):year— tax year:system_name— name of the submitting system (default "Kontira"):filing_frequency—:bimonthly(default) or:annual. Annual filers are companies with taxable turnover ≤ 1 000 000 NOK approved by Skatteetaten for one-termin-per-year filing.
Generates the mvaMeldingDto (the actual VAT return) XML.
The mva_data map must contain:
:org_nummer— organization number:termin— 1-6 (bimonthly) or 1 (annual):year— tax year:linjer— list of%{mva_kode: integer, grunnlag: number, sats: number, merverdiavgift: number}:fastsatt_merverdiavgift— total MVA amount:system_name— name of the submitting system (default "Kontira"):filing_frequency—:bimonthly(default) or:annual
Builds the <periode> element contents for the given mva_data, choosing
between the bimonthly (skattleggingsperiodeToMaaneder) and annual
(skattleggingsperiodeAar) variants based on :filing_frequency.
Defaults to :bimonthly when the key is absent so existing callers keep
working unchanged.
Maps a termin number (1-6) to the skattleggingsperiodeToMaaneder string.