Plan: making GnuCash usable for Swedish businesses (account merge by code, SIE, templates)

John Ralls jralls at ceridwen.us
Wed Nov 25 21:13:54 EST 2026


Isak,

Welcome to GnuCash!

I’ll get to the account template fixes in the next few days.

Question 1: I’m not sure this is a good idea. It seemed reasonable at first blush provided that there was a requirement that the chain of parent accounts matched all the way down, but it occurred to me that matches could still be possible even if the book’s accounts coded Active and Passive as 100000 and 20000 respectively and the template did the opposite. I don’t think there’s a way to resolve that reliably without getting the user involved. It’s a new feature so it would go on the future branch.

Question 2:  I don’t think there’s a way to transfer authorship of a PR so the simplest way would be to fetch alfa’s branch, rebase it on current future (that way git won’t be able to tell that it’s the same) and resubmit it as a new PR. At this point that’s also a new feature so it would need to go on the future branch.

Question 3: GnuCash currently has two separate tax reporting schemes: TXF for US personal income tax reporting, and sales tax tables for the invoicing system. We have a lot of users in various countries using the sales tax tables for collecting VAT. There are several articles in the wiki about handling VAT in various countries; you can access them by typing VAT in the wiki’s search bar. You might also search for GST as that’s what VAT is called in Australia and Canada (and probably other places). It also comes up pretty often on the user mailing list so do a web search for site:lists.gnucash.org/pipermail/gnucash-user <https://lists.gnucash.org/pipermail/gnucash-user> VAT. 

If you want to do something about income tax reporting I think that will require a substantial redesign because the current design is very closely coupled to the US TXF format. We’ll need to include Alex Acinena, the creator and maintainer of the TXF report and its engine pieces, in that discussion. I doubt that there’s time to get that into 6.0 before feature freeze next February.

Question 4: I don’t think that lock date and transaction numbering are feasible with GnuCash’s overall design. We’ve always advised businesses that require that level of built-in controls that GnuCash isn’t suitable for them.

Question 5: I don’t understand what you’re asking. The only locale-specific code is for the TXF reports and it’s divided between libgnucash/tax and gnucash/report/reports/locale-specific. If you’re asking about where to put income tax reporting code, that’s where. If it’s about something else we’ll have to create a new directory in the appropriate place for the code that you’re writing.

New account templates are no problem. I can’t check them for correctness so it will be completely up to you. I suggest that you have them reviewed by an accountant licensed in Sweden to ensure that you get them right.

Regards,
John Ralls


> On Nov 24, 2026, at 04:59, Isak Adamssvärd <isak.adamssvard at witsig.se> wrote:
> 
> Hello,
> 
> I'm Isak Adamssvärd, a developer in Sweden. I'd like to make GnuCash a
> realistic choice for small Swedish companies and sole traders, and I
> intend to maintain what I contribute, including the yearly updates this
> kind of thing needs. Following John's advice to sketch larger changes
> here first, this is the outline. I'd rather hear "no" or "not like
> that" now than after writing code.
> 
> Disclosure: I work with an AI coding assistant and follow the draft AI
> policy on the wiki. I review and can explain everything I submit, and I
> will keep the pull requests small enough for that to be true.
> 
> Already submitted:
> 
>   PR #2369  Three small fixes in the sv_SE account templates.
>   PR #2370  A test that reads the account templates of every locale.
>             It found one of the errors fixed in #2369.
> 
> What I'd like to do, general things first.
> 
> Generally useful:
> 
>   * Match accounts by account code when merging a template into an
>     existing book.
>   * Per-account reporting codes (tax form field, VAT box) behind an
>     accessor.
>   * A fixed period lock date and gapless transaction numbering.
> 
> Sweden-specific:
> 
>   * Updated BAS account templates, built from the chart of accounts
>     published at bas.se like the current 2019 ones.
>   * SIE 4 export and import (the Swedish interchange format).
>   * A VAT report with the Swedish boxes.
> 
> Questions:
> 
> 1. Account merge. account_trees_merge matches by name, recursively
>    among all descendants, while the preview in the hierarchy assistant
>    matches by full name, so the two can disagree. I'd like to make both
>    use one rule: a unique account code if the template account has one,
>    otherwise the name among direct children. Templates without codes
>    would behave as today. Is that welcome, and for future or stable?
> 
> 2. SIE. PR #2217 exports SIE 4 but stalled in review. I've asked its
>    author about cooperating. I'd propose an import/export module rather
>    than a report: the format requires CP437, it has a symmetric import,
>    and a plain C++ core (codec, model, writer, parser) can be unit
>    tested, which was the main review objection. If the author doesn't
>    return, may I supersede the PR with proper attribution?
> 
> 3. Reporting codes. Swedish accounts need both a tax form code (SRU)
>    and a VAT box, and tax-US/code holds one code. Would an accessor
>    like xaccAccountGetReportingCode (account, scheme) be acceptable,
>    given the 6.0 goal of hiding KVP? It would also fit German
>    Kennzahlen or UK VAT boxes.
> 
> 4. Locking and numbering. Swedish rules (like German GoBD) require
>    that posted entries are locked, corrected only by reversing entries,
>    and numbered without gaps. Is there interest in a fixed lock date
>    per book in addition to the rolling read-only threshold, and in an
>    "assign numbers" action? I would not touch the engine before 6.0;
>    I'm asking about direction and timing.
> 
> 5. Where do you want the line for country-specific code in the main
>    repository?
> 
> Non-goals: no network code or filing with authorities from GnuCash, no
> new dependencies, no schema changes, nothing in po/.
> 
> Order of work: account merge by code for 6.0 if you agree, SIE export
> after that in small pieces, the rest in 6.x.
> 
> Thanks for reading,
> Isak Adamssvärd
> 
> IA Capital Group AB
> Web & IT-Service
> https://witsig.se/ https://witsig.se/ 
> 
> Tel: 072-7157270 tel:+46727157270 
> E-post: isak.adamssvard at witsig.se mailto:isak.adamssvard at witsig.se
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20261125/89c9335b/attachment.htm>


More information about the gnucash-devel mailing list