Build a Cuentas Anuales XBRL Instance (Registro Mercantil)
Skill: Convert annual accounts into the Cuentas Anuales XBRL instance
Region: Spain (España) Category: Financial statements — Cuentas Anuales (Registro Mercantil) Does: Takes a Spanish company's annual accounts and produces the Cuentas Anuales XBRL instance document (taxonomy based on the Plan General de Contabilidad) for the depósito de cuentas at the Registro Mercantil, deposited digitally via the Colegio de Registradores / portal D2. Standard: Taxonomía XBRL de las Cuentas Anuales (PGC) — depósito digital en el Registro Mercantil (modelo normal / abreviado / PYMES)
Spanish companies (S.L., S.A. and others) deposit their approved cuentas anuales at the Registro Mercantil within one month of approval by the junta general. The Balance, Cuenta de Pérdidas y Ganancias, Estado de Cambios en el Patrimonio Neto (ECPN) and the relevant Memoria datapoints are filed as an XBRL instance. The instance must validate against the current-year taxonomy (the correct entry point for the financial year) and pass the registry's validation rules before deposit. The worked example below shows a minimal subset of facts — a real filing carries the full set of tagged concepts required by the applicable model.
When this applies
- A Spanish mercantile company depositing its cuentas anuales for a closed financial year at the Registro Mercantil.
- The filing uses one of the three models — normal, abreviado, or PYMES — selected by company size thresholds (total activo, importe neto de la cifra de negocios, average headcount).
- The deposit is made digitally via the Colegio de Registradores electronic presentation (portal D2), packaged with the certificación del acuerdo de aprobación and other required documents.
- Each financial year has its own taxonomy entry point; the instance must reference the entry point matching the reporting year.
Input data required
| Input | XBRL element |
|---|---|
| Company identity (denominación, CIF) | context entity/identifier (CIF), identification facts |
| Reporting period (ejercicio) and prior-year comparative | context/period (current and prior) |
| Balance — Activo | pgc:Activo, pgc:ActivoNoCorriente, pgc:ActivoCorriente |
| Balance — Patrimonio Neto y Pasivo | pgc:PatrimonioNetoYPasivo, pgc:PatrimonioNeto, pgc:Pasivo |
| Cuenta de Pérdidas y Ganancias | pgc:ImporteNetoCifraNegocios, ... , pgc:ResultadoEjercicio |
| Estado de Cambios en el Patrimonio Neto (ECPN) | ECPN concepts (movimientos de patrimonio neto) |
| Memoria datapoints | Memoria concepts (tagged facts per model) |
| Currency, decimals, unit | unit (EUR), decimals |
Document structure
xbrli:xbrl
├── link:schemaRef href="…/pgc-cuentas-2026.xsd" (current-year entry point)
├── xbrli:context id="D-2026" (current year)
│ ├── entity/identifier scheme="http://www.rmc.es/cif" → CIF
│ └── period/instant 2026-12-31 (Balance) | startDate–endDate (PyG)
├── xbrli:context id="D-2025" (prior-year comparative)
├── xbrli:unit id="EUR" → iso4217:EUR
├── Identification facts: denominación, CIF, modelo
├── Balance facts pgc:* (Activo = PatrimonioNeto + Pasivo)
├── Pérdidas y Ganancias pgc:* (rolls up to ResultadoEjercicio)
└── ECPN / Memoria facts (per el modelo aplicable)
Monetary facts carry contextRef, unitRef="EUR" and decimals (e.g. 2 for euro cents). Each line item maps to a taxonomy concept (e.g. pgc:Activo, pgc:PatrimonioNeto, pgc:ResultadoEjercicio). Balance totals use an instant context; Pérdidas y Ganancias figures use a duration context.
Source → XBRL field map
| From the source | → XBRL concept (local name) |
|---|---|
| Total activo | pgc:Activo |
| Activo no corriente | pgc:ActivoNoCorriente |
| Activo corriente | pgc:ActivoCorriente |
| Total patrimonio neto y pasivo | pgc:PatrimonioNetoYPasivo |
| Patrimonio neto | pgc:PatrimonioNeto |
| Pasivo (no corriente + corriente) | pgc:Pasivo |
| Importe neto de la cifra de negocios | pgc:ImporteNetoCifraNegocios |
| Resultado del ejercicio | pgc:ResultadoEjercicio |
| CIF de la sociedad | context entity/identifier (scheme http://www.rmc.es/cif) |
| Ejercicio (fecha de cierre / período) | context/period (instant / duration) |
Real concept names come from the official Cuentas Anuales (PGC) taxonomy for the reporting year and must be verified against that taxonomy's entry point and schema. The
pgc:*local names used here are representative placeholders illustrating the instance shape.
Code tables
Modelo (presentation model)
| Code | Modelo | Applies to |
|---|---|---|
normal |
Cuentas anuales normales | Companies above the abreviado thresholds |
abreviado |
Balance / Memoria abreviados | Companies within the abreviado size thresholds |
pymes |
Modelo PYMES | Small entities meeting the PYMES criteria |
Period contexts
| Statement | Context type | Example |
|---|---|---|
| Balance, ECPN closing balances | instant |
2026-12-31 |
| Cuenta de Pérdidas y Ganancias | duration |
2026-01-01 → 2026-12-31 |
| Prior-year comparative | same types, prior dates | instant 2025-12-31; duration 2025-01-01→2025-12-31 |
Unit and scale
| Item | Value |
|---|---|
| Currency unit | EUR → <xbrli:measure>iso4217:EUR</xbrli:measure> |
| Identifier scheme | http://www.rmc.es/cif |
| Decimals (euro cents) | decimals="2" |
| Decimals (whole euro) | decimals="0" |
Calculation rules
- Balance must balance:
Activo=PatrimonioNetoYPasivo=PatrimonioNeto+Pasivo. Activo=ActivoNoCorriente+ActivoCorriente; each total equals the sum of its children per the taxonomy calculation linkbase.- Cuenta de Pérdidas y Ganancias rolls up from
ImporteNetoCifraNegocios(and the other income/expense lines) down toResultadoEjercicio; theResultadoEjerciciomust tie to the corresponding line withinPatrimonioNeto. - Each fact requires both the current and prior-year comparative context (instant for Balance, duration for PyG).
- Amounts in EUR; signs and the taxonomy's calculation relationships must hold (totals = sum of children). Recompute every total; flag any mismatch with the source rather than copying a printed figure.
Worked example (end-to-end)
<?xml version="1.0" encoding="UTF-8"?>
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
xmlns:pgc="http://www.boe.es/xbrl/pgc">
<link:schemaRef xlink:type="simple"
xlink:href="http://www.boe.es/xbrl/pgc/2026/pgc-cuentas-2026.xsd"/>
<!-- Current year: instant context for Balance totals -->
<xbrli:context id="D-2026">
<xbrli:entity>
<xbrli:identifier scheme="http://www.rmc.es/cif">B12345678</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:instant>2026-12-31</xbrli:instant>
</xbrli:period>
</xbrli:context>
<!-- Current year: duration context for Cuenta de Perdidas y Ganancias -->
<xbrli:context id="P-2026">
<xbrli:entity>
<xbrli:identifier scheme="http://www.rmc.es/cif">B12345678</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2026-01-01</xbrli:startDate>
<xbrli:endDate>2026-12-31</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<!-- Prior year comparative: instant context -->
<xbrli:context id="D-2025">
<xbrli:entity>
<xbrli:identifier scheme="http://www.rmc.es/cif">B12345678</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:instant>2025-12-31</xbrli:instant>
</xbrli:period>
</xbrli:context>
<xbrli:unit id="EUR">
<xbrli:measure>iso4217:EUR</xbrli:measure>
</xbrli:unit>
<!-- Balance: Activo = PatrimonioNeto + Pasivo (current year) -->
<pgc:Activo contextRef="D-2026" unitRef="EUR" decimals="2">500000.00</pgc:Activo>
<pgc:ActivoNoCorriente contextRef="D-2026" unitRef="EUR" decimals="2">320000.00</pgc:ActivoNoCorriente>
<pgc:ActivoCorriente contextRef="D-2026" unitRef="EUR" decimals="2">180000.00</pgc:ActivoCorriente>
<pgc:PatrimonioNetoYPasivo contextRef="D-2026" unitRef="EUR" decimals="2">500000.00</pgc:PatrimonioNetoYPasivo>
<pgc:PatrimonioNeto contextRef="D-2026" unitRef="EUR" decimals="2">300000.00</pgc:PatrimonioNeto>
<pgc:Pasivo contextRef="D-2026" unitRef="EUR" decimals="2">200000.00</pgc:Pasivo>
<!-- Balance comparative (prior year) -->
<pgc:Activo contextRef="D-2025" unitRef="EUR" decimals="2">460000.00</pgc:Activo>
<pgc:PatrimonioNetoYPasivo contextRef="D-2025" unitRef="EUR" decimals="2">460000.00</pgc:PatrimonioNetoYPasivo>
<!-- Cuenta de Perdidas y Ganancias (duration) -->
<pgc:ImporteNetoCifraNegocios contextRef="P-2026" unitRef="EUR" decimals="2">800000.00</pgc:ImporteNetoCifraNegocios>
<pgc:ResultadoEjercicio contextRef="P-2026" unitRef="EUR" decimals="2">50000.00</pgc:ResultadoEjercicio>
</xbrli:xbrl>
Activo (500 000.00) = PatrimonioNeto (300 000.00) + Pasivo (200 000.00) = PatrimonioNetoYPasivo (500 000.00). The Cuenta de Pérdidas y Ganancias reports ImporteNetoCifraNegocios 800 000.00 and rolls up to ResultadoEjercicio 50 000.00, which ties into PatrimonioNeto. The instance is packaged with the certificación de aprobación and deposited digitally via the Colegio de Registradores / portal D2. Any literal & in text values must be escaped as & (e.g. García & Hijos S.L.).
Validation checklist
- Current-year Cuentas Anuales (PGC) taxonomy entry point selected;
schemaRefpoints to the in-force year's schema - Correct modelo (normal / abreviado / PYMES) for the company's size thresholds
-
entity/identifiercarries the correct CIF under schemehttp://www.rmc.es/cif - Instant context for Balance/ECPN closing facts; duration context for Pérdidas y Ganancias
- Both current and prior-year contexts present for comparative facts;
unitRef="EUR",decimalsset - Balance balances: Activo = PatrimonioNeto + Pasivo = PatrimonioNetoYPasivo
-
Activo=ActivoNoCorriente+ActivoCorriente; totals equal the sum of their children - Pérdidas y Ganancias rolls up to
ResultadoEjercicio; result ties to thePatrimonioNetoline - All required Balance, PyG, ECPN and Memoria datapoints tagged for the applicable model
- XML is well-formed: every prefix declared, tags balanced, literal
&escaped as& - Real concept names verified against the official taxonomy (representative
pgc:*names replaced) - Instance passes the Registro Mercantil validation rules; deposited via Colegio de Registradores / portal D2 within one month of approval
Last updated: 2026-06-12 — verify the active Cuentas Anuales taxonomy (entry point/year) and the Registro Mercantil validation rules against the current specification before use.