How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A PHP order or invoice system in Sweden creates accounting information whenever it issues an invoice or registers a payment. I am Mariusz Szatkowski, a developer from Gdynia, and work for Gothenburg clients goes through email and shared documents. Whether a given record counts as accounting information is a question for you and your accountant. I am not a lawyer. This page sets out what the Swedish sources say, so the application can be built to match.

The Göteborgs rådhus in the city centre. Picture by Arild Vågen, CC BY-SA 4.0, Wikimedia Commons.
The Bokföringslag (1999:1078) is published by the Riksdag. The version I read lists SFS 2024:342 as its latest change, in force from 1 July 2024. I found no later amendment on the page, and the register behind it is where to check again.
For a PHP system the rules at the recording stage are short:
The last rule is the one that shapes data design. An invoice row that is edited in place cannot say when it was corrected and by whom. A correction written as a new row, with the user and the time, can.
No. The wording is about print-out. 7 kap. 1 § says accounting information is kept either as a paper document or in a form readable only with technical aids, an electronic document, which can be produced as a paper document by an immediate print-out. The Bokföringsnämnden (BFN) guidance to BFNAR 2013:2 (updated 2024-09-16) accepts a delay for records stored with technology the company no longer uses, because an old computer and program may have to be installed again first.
The BFN guidance connects this to documentation. The system documentation has to describe how electronic accounting information is produced on paper (point 9.12), and where encryption is used, how encrypted information becomes readable. A PHP application therefore needs a documented print-out path that still works in year seven, not only a database.
The second paragraph of 7 kap. 1 § says electronic documents with accounting information, whether received from someone else or created by the company, are kept in the format and with the content they had when they came to the company or when the information was compiled. The BFN guidance names PDF files, e-invoices, text messages and emails as electronic documents, and says the starting point is to keep this form for the whole retention period.
The guidance then allows two things:
The guidance also says information collected from someone else’s website, such as invoices a buyer downloads from the supplier’s portal or payment data from an internet bank, may be kept in the electronic format in which it is meant to be presented in the company (point 7.3). Records the company makes itself count as compiled once they have the form and format in which they are meant to be presented (point 7.5). For a PHP invoicing module this means the issued invoice file, in the shape the customer received it, is the record. Regenerating it later from changed templates is not the same thing.
7 kap. 2 § says the paper and electronic documents used to preserve accounting information are durable and easily accessible. They are kept until the end of the seventh year after the calendar year in which the financial year ended, in Sweden, in good order and in a secure and clear manner. The equipment and systems needed to present the records on paper stay available in Sweden for the whole retention period.
function retainUntil(DateTimeImmutable $financialYearEnd): DateTimeImmutable
{
$year = (int) $financialYearEnd->format('Y') + 7;
return new DateTimeImmutable($year . '-12-31');
}
// financial year ending 2026-12-31: kept until 2033-12-31A second check keeps the stored file honest. The php.net manual lists hash() with a string result and sha256 among the algorithms, so a stored hash lets a later reader confirm that an archived e-invoice is byte for byte what was received.
$bytes = file_get_contents($receivedPath);
$row = [
'sha256' => hash('sha256', $bytes),
'received_at' => (new DateTimeImmutable())->format('c'),
'retain_until' => retainUntil($financialYearEnd)->format('Y-m-d'),
];The sentence about equipment matters for software. The BFN guidance accepts a delay when old technology has to be reinstalled. That only helps if the old application can be reinstalled at all, so an archived record that only a discontinued application can render is a risk to weigh with your accountant. Keep the code, the dependency lockfile and the PHP version of each release in the archive.
7 kap. 3 a § lets a company keep electronic records, and the equipment and systems to present them, in another EU country when three conditions are met. The location and any change of it are reported to Skatteverket. On request the company gives immediate electronic access for control during the retention period. And the company can produce a paper print-out of the records in Sweden. The provision also reaches certain countries outside the EU that have comparable mutual-assistance instruments. 7 kap. 4 § lets Skatteverket permit other solutions for special reasons, with conditions and a time limit. Companies under the supervision of Finansinspektionen deal with that authority instead.
For a PHP project the practical consequence is that hosting country, backup country and any export target belong in the system documentation. A move of the database to another region is a notification question, not only an infrastructure change.
The BFN guidance applies the requirement of secure storage to electronic records. Point 8.2 says electronic accounting information is backed up, with the frequency judged by the company’s circumstances, and the backup is kept apart from the copied information. The commentary gives a range: a company with many business events may need a daily backup, a very small one may manage monthly. A company that has agreed with a software supplier or accountant that the other party runs the backups has to make sure the schedule fits the company. The quality of the storage medium counts too.
Point 8.3 asks for an archive plan where needed to overview the archived information: what is archived and where. If it exists, it forms part of the system documentation (point 9.2 d). For a PHP application that is one short document listing the database, the file store for invoices and received documents, the backup target and the retention date per record type.
5 kap. 11 § requires the company to document the organisation and structure of the bookkeeping system and its processing history, so that entries can be followed. The BFN guidance fills this in:
For a custom PHP system this is a release log with a business reading. A deployment that changes how a tax rate is applied is an entry. A deployment that changes the colour of a button is not.
1 kap. 2 § defines räkenskapsinformation to include the balance sheet, the ledgers, verifications and system documentation, agreements and other documents of special importance for the finances, and other information needed to follow and understand how individual entries were treated. The BFN commentary lists instructions on accounting principles, access instructions, encryption keys, bank statements and EDI agreements as examples. Encryption keys therefore belong to the archive, and where records are encrypted, point 7.8 allows it only for security reasons and only if the information can be presented immediately in clear text.
If a Gothenburg company runs orders or invoices through custom PHP, send the stack, the hosting country and the accounting tool at the end of the chain through the contact form. The opening estimate for an invoicing or archive project comes in writing at no charge. How the Bookkeeping Act applies to your company is for you and your accountant to decide.
Examples of my work.
Sportostroda.pl is one of the interesting projects in my portfolio as a WordPress developer, realised as a local sports portal dedicated to the residents of ...
surfuje.pl is a website for surfers and watersports enthusiasts, with clear content, simple publishing, and stable technical operation.
zamki-szkocji.com is a comprehensive information portal dedicated to the castles of Scotland, combining rich historical content, interactive maps, photo gall...
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.