Gestiona factures de negoci¶
Registra les factures que el teu negoci emet i rep: els diners que et deu un client i els diners que deus a un proveïdor. Aquesta guia tracta els dos tipus i mostra quins registres nodreixen els teus càlculs tributaris.
Una factura de negoci no és el mateix que un rebut de compra que adjuntes com a evidència. Els rebuts justifiquen una despesa deduïble en una transacció del ledger (consulta Adjunta factures i rebuts). Les factures de negoci que es registren aquí són els documents comercials mateixos: una factura emesa (has facturat a un client) o una factura rebuda (un proveïdor t’ha facturat).
Abans de començar¶
Necessites:
Un perfil de contribuent actiu. Totes les ordres de més avall treballen sobre el perfil actiu; si no n’hi ha cap de definit, l’ordre es nega a continuar. Consulta Configura el teu perfil de contribuent.
Una contrasenya de clau mestra. L’eina la demana la primera vegada que obre el teu emmagatzematge xifrat dins d’una sessió.
La interfície de línia d’ordres (CLI) aeat mostra l’ajuda i els missatges en castellà; el text d’aquesta pàgina descriu què fa cada pas.
Dues maneres de guardar una factura¶
Cadrumo guarda les factures en dos llocs separats, per a dues feines diferents.
Les vostres factures són en un sol lloc (aeat app ledger invoice ...): un registre de qui us deu i a qui deveu. Feu-lo servir per registrar, llistar i editar factures.
Cada factura que registreu és enllaçable i calculable. Vinculeu-la a un moviment bancari amb aeat app ledger link, i un càlcul la llegeix directament: per exemple, el Modelo 349, declaració recapitulativa d’operacions intracomunitàries.
Registreu cada factura amb invoice add. No hi ha cap segona còpia per crear.
Cada ordre accepta --kind issued o --kind received. Issued (emesa) vol dir que un client et deu (una factura a cobrar); received (rebuda) vol dir que deus a un proveïdor (una factura a pagar).
Registra una factura emesa¶
Registra una factura que has enviat a un client. L’ordre retorna el nou invoice_id, el source_kind resolt (collectible_invoice) i els valors que has introduït:
aeat --format json app ledger invoice add --kind issued --counterparty-nif B12345674 \
--country-code ES --counterparty-name Cliente SL --invoice-number FAC-2026-001 \
--invoice-date 2026-02-15 --taxable-base 1000 --iva-rate 21aeat --format json app ledger invoice add --kind issued --counterparty-nif B12345674 `
--country-code ES --counterparty-name Cliente SL --invoice-number FAC-2026-001 `
--invoice-date 2026-02-15 --taxable-base 1000 --iva-rate 21{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.add", "notices": [], "result": { "base_total": "1000.00", "base_total_eur": "1000.00", "bucket_id": "<bucket-id>", "counterparty_country": "ES", "counterparty_name": "Cliente SL", "counterparty_tax_id": "sha256:133cad41", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "1210.00", "grand_total_eur": "1210.00", "invoice_id": "8156e70ce16a05f4588f7516d49da7ffd4115964a75b079061e624a41ad30211", "invoice_number": "FAC-2026-001", "issued_at": "2026-02-15", "iva_total": "210.00", "iva_total_eur": "210.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": null, "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
aeat --format json app ledger invoice view {invoice_id}aeat --format json app ledger invoice view {invoice_id}{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.view", "notices": [], "result": { "base_total": "1000.00", "base_total_eur": "1000.00", "bucket_id": "<bucket-id>", "counterparty_country": "ES", "counterparty_name": "Cliente SL", "counterparty_tax_id": "sha256:133cad41", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "1210.00", "grand_total_eur": "1210.00", "invoice_id": "8156e70ce16a05f4588f7516d49da7ffd4115964a75b079061e624a41ad30211", "invoice_number": "FAC-2026-001", "issued_at": "2026-02-15", "iva_total": "210.00", "iva_total_eur": "210.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": null, "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the issued invoice was stored as a collectible invoice.
Apunta el invoice_id curt; hi adreces la factura amb aquest id (o amb un prefix inequívoc).
Registra una factura rebuda¶
Registra una factura que t’ha enviat un proveïdor. El source_kind es resol com a payable_invoice:
aeat --format json app ledger invoice add --kind received --counterparty-nif A87654323 \
--country-code ES --counterparty-name Proveedor SA --invoice-number PROV-99 \
--invoice-date 2026-02-20 --taxable-base 500 --iva-rate 21aeat --format json app ledger invoice add --kind received --counterparty-nif A87654323 `
--country-code ES --counterparty-name Proveedor SA --invoice-number PROV-99 `
--invoice-date 2026-02-20 --taxable-base 500 --iva-rate 21{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.add", "notices": [], "result": { "base_total": "500.00", "base_total_eur": "500.00", "bucket_id": "<bucket-id>", "counterparty_country": "ES", "counterparty_name": "Proveedor SA", "counterparty_tax_id": "sha256:c1fcd88f", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "605.00", "grand_total_eur": "605.00", "invoice_id": "2d276305600c31de666ddd61dc33377cde314c59c10f99608db208ec0f46da1b", "invoice_number": "PROV-99", "issued_at": "2026-02-20", "iva_total": "105.00", "iva_total_eur": "105.00", "kind": "received", "linked_transaction_ids": [], "notes": "", "operation_type": null, "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
aeat --format json app ledger invoice view {invoice_id}aeat --format json app ledger invoice view {invoice_id}{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.view", "notices": [], "result": { "base_total": "500.00", "base_total_eur": "500.00", "bucket_id": "<bucket-id>", "counterparty_country": "ES", "counterparty_name": "Proveedor SA", "counterparty_tax_id": "sha256:c1fcd88f", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "605.00", "grand_total_eur": "605.00", "invoice_id": "2d276305600c31de666ddd61dc33377cde314c59c10f99608db208ec0f46da1b", "invoice_number": "PROV-99", "issued_at": "2026-02-20", "iva_total": "105.00", "iva_total_eur": "105.00", "kind": "received", "linked_transaction_ids": [], "notes": "", "operation_type": null, "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the received invoice was stored as a payable invoice.
Llista, consulta, actualitza i elimina¶
Llista els dos tipus o filtra’n només un, afegeix una nota a una factura desada i, tot seguit, elimina-la. La consulta d’una factura pren el seu id (o un prefix inequívoc) i el tipus:
aeat app ledger invoice listaeat app ledger invoice listbucket <profile-id> count 1 876198eb9b01ec6643765dd6bb7141567df25dc89e280632bffce3f8f9d3e9f9 issued sha256:133cad41 FAC-2026-050 2026-02-15 1210.00
aeat app ledger invoice list --kind issuedaeat app ledger invoice list --kind issuedbucket <profile-id> count 1 876198eb9b01ec6643765dd6bb7141567df25dc89e280632bffce3f8f9d3e9f9 issued sha256:133cad41 FAC-2026-050 2026-02-15 1210.00
aeat app ledger invoice update {invoice_id} --notes paid lateaeat app ledger invoice update {invoice_id} --notes paid lateinvoice_id 876198eb9b01ec6643765dd6bb7141567df25dc89e280632bffce3f8f9d3e9f9 kind issued counterparty_name Cliente SL counterparty_tax_id sha256:133cad41 invoice_number FAC-2026-050 issued_at 2026-02-15 base_total 1000.00 iva_total 210.00 grand_total 1210.00 currency EUR operation_type invoice_class ORDINARIA series rectifies_invoice_number recargo_amount iva_category linked_transaction_ids bucket_event_ids d4fee17b4a2c566db0b31f44bc80726aca5a9648795c0ae17b933b9cf01b99b0
aeat --format json app ledger invoice remove {invoice_id} --yesaeat --format json app ledger invoice remove {invoice_id} --yes{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.remove", "notices": [], "result": { "base_total": "1000.00", "base_total_eur": "1000.00", "bucket_id": "<bucket-id>", "counterparty_country": "ES", "counterparty_name": "Cliente SL", "counterparty_tax_id": "sha256:133cad41", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "1210.00", "grand_total_eur": "1210.00", "invoice_id": "876198eb9b01ec6643765dd6bb7141567df25dc89e280632bffce3f8f9d3e9f9", "invoice_number": "FAC-2026-050", "issued_at": "2026-02-15", "iva_total": "210.00", "iva_total_eur": "210.00", "kind": "issued", "linked_transaction_ids": [], "notes": "paid late", "operation_type": null, "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the note was added and the invoice then removed.
Registra una factura intracomunitària¶
Un lliurament a una empresa d’un altre país de la UE registrada a efectes d’IVA, o una adquisició a aquesta empresa, és una operació intracomunitària. Registra-la a la factura emesa o rebuda amb el país de la contrapart i el seu NIF-IVA de la UE, més el tipus d’operació del Modelo 349:
aeat --format json app ledger invoice add --kind issued --counterparty-nif DE345678901 \
--counterparty-name Kunde GmbH --invoice-number EU-001 --invoice-date 2026-02-10 \
--taxable-base 2000 --iva-rate 0 --country-code DE --operation-type Eaeat --format json app ledger invoice add --kind issued --counterparty-nif DE345678901 `
--counterparty-name Kunde GmbH --invoice-number EU-001 --invoice-date 2026-02-10 `
--taxable-base 2000 --iva-rate 0 --country-code DE --operation-type E{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.add", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "6d5fa3b4e91913a5e2f8245f40061fe824ecb7894c88b418d6e8c0fb1be79ca7", "invoice_number": "EU-001", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
aeat --format json app ledger invoice view {invoice_id}aeat --format json app ledger invoice view {invoice_id}{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.view", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "6d5fa3b4e91913a5e2f8245f40061fe824ecb7894c88b418d6e8c0fb1be79ca7", "invoice_number": "EU-001", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the operation type and country were stored on the issued invoice.
--operation-type pren una clau d’operació del M349: E lliuraments de béns, M lliuraments després d’una importació exempta, H el mateix a través d’un representant fiscal, A adquisicions de béns, T lliuraments triangulars, S serveis prestats, I serveis adquirits, i les claus d’existències de reserva (call-off stock) R (transferències), D (devolucions) i C (substitucions).
Alimenta un càlcul des del catàleg¶
Perquè una factura arribi al càlcul d’un modelo, crea-la al catàleg. La còpia del catàleg és la que llegeix un càlcul i la que pots vincular a una transacció bancària. La seqüència cataloga un lliurament intracomunitari, llista i inspecciona el catàleg, i després crea i calcula la declaració recapitulativa del Modelo 349 per al període en què cau la factura:
aeat --format json app ledger invoice add --kind issued --counterparty-nif DE345678901 \
--counterparty-name Kunde GmbH --invoice-number EU-CAT-001 --invoice-date 2026-02-10 \
--taxable-base 2000 --iva-rate 0 --country-code DE --operation-type Eaeat --format json app ledger invoice add --kind issued --counterparty-nif DE345678901 `
--counterparty-name Kunde GmbH --invoice-number EU-CAT-001 --invoice-date 2026-02-10 `
--taxable-base 2000 --iva-rate 0 --country-code DE --operation-type E{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.add", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "5f6226984e838fa553b9647364c5e3199cb833d79c8932072b9a67bc39eabc17", "invoice_number": "EU-CAT-001", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
aeat app ledger invoice listaeat app ledger invoice listbucket <profile-id> count 1 5f6226984e838fa553b9647364c5e3199cb833d79c8932072b9a67bc39eabc17 issued sha256:a9224776 EU-CAT-001 2026-02-10 2000.00
aeat --format json app ledger invoice view {invoice_id}aeat --format json app ledger invoice view {invoice_id}{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.view", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "5f6226984e838fa553b9647364c5e3199cb833d79c8932072b9a67bc39eabc17", "invoice_number": "EU-CAT-001", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
aeat --format json app modelo work create --modelo 349 --year 2026 --period 02aeat --format json app modelo work create --modelo 349 --year 2026 --period 02{ "active_profile": "docs-sequence-sandbox", "command": "modelo.work.create", "notices": [], "result": { "applicability_guard_bypassed": false, "bucket_id": "<bucket-id>", "causante_ccaa": null, "created_at": "2026-04-01T09:00:00+00:00", "current_calculation_revision_id": null, "current_filing_record_id": null, "discard_reason": null, "discarded_at": null, "discarded_by": null, "filed_calculation_revision_id": null, "filing_year": 2026, "modelo": "349", "name": "349-2026-02", "name_applied": null, "operation": "modelo.work.create", "period": { "code": "02", "filing_year": 2026 }, "revision_id": "2020-y-siguientes", "short_current_calculation_revision_id": null, "short_filed_calculation_revision_id": null, "short_work_unit_id": "253f06e07c9f", "state": "borrador", "status": "created", "status_message": "New work unit created.", "updated_at": "2026-04-01T09:00:00+00:00", "work_unit_id": "1609deb31dbe07e1b21281e26d114d5a4ef4230a5e9d2f387e8c253f06e07c9f" }, "schema_version": "2", "status": "success" }
aeat --format json app modelo work calculate {work_unit_id}aeat --format json app modelo work calculate {work_unit_id}{ "active_profile": "docs-sequence-sandbox", "command": "modelo.work.calculate", "notices": [ { "action": null, "code": "modelo.work.calculate.plazo_vencido_unassessed_preview", "context": { "article_27_assessment_status": "unassessed", "closes_on": "2026-03-20", "conditional_recargo_preview_band": "completed_months_0", "conditional_recargo_preview_interest_applies": "False", "conditional_recargo_preview_pct": "1.00", "conditional_recargo_preview_reference_on": "2026-04-01", "days_overdue": "12", "legal_refs": "ley-58-2003:art-27.2" }, "message": "WARNING: voluntary filing period expired (Art. 27 LGT). The displayed rate is an unassessed preview; this application does not determine surcharge or interest liability.", "severity": "warning" } ], "result": { "authorization_state": null, "binding_overrides": { "iva-349-declarante-importe-operaciones": "2000", "iva-349-declarante-importe-operaciones-adquisicion": "0", "iva-349-declarante-importe-rectificaciones": "0", "iva-349-declarante-importe-rectificaciones-adquisicion": "0", "iva-349-declarante-numero-operadores": "1", "iva-349-declarante-numero-operadores-adquisicion": "0", "iva-349-declarante-numero-rectificaciones": "0", "iva-349-declarante-numero-rectificaciones-adquisicion": "0", "modelo-349-ledger-intracommunity-guard": "0" }, "calculation_revision_id": "457438fde19c986c6e759c496965856b1141a8aaf23c3f9eb6ca82967b7daf43", "casilla_values": { "decl.cambio-periodicidad": "0", "decl.complementaria-sustitutiva": "0", "decl.importe-operaciones": "2000.00", "decl.importe-rectificaciones": "0", "decl.nif-representante-legal": "0", "decl.numero-identificativo": "0", "decl.numero-identificativo-anterior": "0", "decl.numero-operadores": "1", "decl.numero-rectificaciones": "0", "sustituto.apellidos-razon-social": "0", "sustituto.nif": "0" }, "created_at": "2026-04-01T09:00:00+00:00", "deadline": { "closes_on": "2026-03-20", "conditional_recargo_preview": { "assessment_status": "unassessed", "band_id": "completed_months_0", "interest_applies": false, "legal_ref": "ley-58-2003:art-27.2", "rate_reference_on": "2026-04-01", "surcharge_pct": "1.00" }, "days_overdue": 12, "days_remaining": null }, "detail_rows": [ { "fields": { "clave_operacion": "E", "codigo_pais": "DE", "importe": "2000.00", "nif_comunitario": "sha256:a9224776", "razon_social": "Kunde GmbH" }, "index": 1, "row_type": "operador" } ], "filed_at": null, "filed_by": null, "input_values_by_casilla_id": { "decl.importe-operaciones": "2000", "decl.importe-rectificaciones": "0", "decl.numero-operadores": "1", "decl.numero-rectificaciones": "0" }, "modality": null, "modality_reason": null, "observations": [ { "absent_by_design": false, "casilla_id": "decl.cambio-periodicidad", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93", "rd-1624-1992:art-81" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.complementaria-sustitutiva", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93", "rd-1624-1992:art-81" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.importe-operaciones", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current", "aeat-modelo-349-procedure" ], "value": "2000.00" }, { "absent_by_design": false, "casilla_id": "decl.importe-rectificaciones", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current", "aeat-modelo-349-procedure" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.nif-representante-legal", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93", "rd-1624-1992:art-81" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.numero-identificativo", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93", "rd-1624-1992:art-81" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.numero-identificativo-anterior", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93", "rd-1624-1992:art-81" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "decl.numero-operadores", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current", "aeat-modelo-349-procedure" ], "value": "1" }, { "absent_by_design": false, "casilla_id": "decl.numero-rectificaciones", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current", "aeat-modelo-349-procedure" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "sustituto.apellidos-razon-social", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" }, { "absent_by_design": false, "casilla_id": "sustituto.nif", "formula_id": null, "legal_refs": [ "orden-eha-769-2010:art-1", "orden-hac-174-2020:art-1", "ley-58-2003:art-93" ], "op": null, "operand_casilla_refs": [], "operand_refs": [], "operand_values": [], "source_refs": [ "aeat-dr-349-2020-current" ], "value": "0" } ], "operation": "modelo.work.calculate", "registry_snapshot_ref": { "modelo": "349", "modelo_year": 2026, "period": "02", "revision_id": "2020-y-siguientes" }, "relation_overrides": {}, "result_summary": [ { "casilla_id": "decl.numero-operadores", "label": "Total number of intra-Community operators", "role": "key_figure", "value": "1" }, { "casilla_id": "decl.importe-operaciones", "label": "Amount of intra-Community transactions", "role": "key_figure", "value": "2000.00" } ], "saved": true, "saved_confirmation": "Saved as draft calculation revision 457438fde19c986c6e759c496965856b1141a8aaf23c3f9eb6ca82967b7daf43 (state: draft). It is persisted and can be resumed later.", "source_provenance": [ { "contributor_binding_source": "collectible_invoice", "contributor_source_kind": "collectible_invoice", "dependency_treatment": "", "fingerprint": "sha256:72748ea0133a321a0f267c1a26c97cb74e46e173732201ddd72a3c2edfd3c890", "lineage_role": "primary", "parent_source_ref": null, "resolved_binding_source": "collectible_invoice", "resolver_id": "invoice_catalogue", "source_ref": "collectible_invoice:5f6226984e838fa553b9647364c5e3199cb833d79c8932072b9a67bc39eabc17" } ], "state": "borrador", "superseded_at": null, "updated_at": "2026-04-01T09:00:00+00:00", "verified_at": null, "verified_by": null, "work_unit_id": "1609deb31dbe07e1b21281e26d114d5a4ef4230a5e9d2f387e8c253f06e07c9f" }, "schema_version": "2", "status": "warning" }
Confirm the catalogued invoice reaches the Modelo 349 calculation.
Per a una operació intracomunitària, passa --operation-type perquè el catàleg estampi la classificació que llegeix el càlcul del Modelo 349. Utilitza E, H, M, S, T, R, D o C per a les factures del catàleg emeses. Utilitza A, I o T per a les factures del catàleg rebudes. Al Modelo 349, R és la clau de transferència d’existències de reserva; les files de rectificació utilitzen camps separats de període rectificat i de base.
Una factura només es compta en el període en què cau la seva data de factura. El Modelo 349 llegeix les factures estrictament per data, sense cap arrossegament de períodes anteriors.
Vincula una factura del catàleg a una transacció¶
Vincula una factura del catàleg a la transacció bancària que la va pagar o cobrar. La seqüència registra una transacció, cataloga una factura, les vincula i confirma el vincle a la còpia del catàleg:
aeat app ledger link {transaction_id} --invoice-id {invoice_id}aeat app ledger link {transaction_id} --invoice-id {invoice_id}operation ledger.link bucket <profile-id> transaction_id 4ea9963064d9ee8b2b6b69349aa94dfeb5298f118bc99cdce546c040ed01d522 actor operator invoice_id 74dbc61158fa07888e5c677cd0d01745883b4184f7c5caf7e1e0b9ac1b5f74ca
aeat --format json app ledger invoice view {invoice_id}aeat --format json app ledger invoice view {invoice_id}{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.view", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "74dbc61158fa07888e5c677cd0d01745883b4184f7c5caf7e1e0b9ac1b5f74ca", "invoice_number": "EU-CAT-050", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [ "4ea9963064d9ee8b2b6b69349aa94dfeb5298f118bc99cdce546c040ed01d522" ], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the catalogue invoice records the linked transaction.
Elimina una factura del catàleg que hagis creat per error, confirmant amb --yes. Desvincula primer la factura si encara està vinculada a una transacció: l’eliminació d’una factura encara vinculada es rebutja, de manera que la transacció bancària mai no acaba citant una factura que ja no existeix:
aeat --format json app ledger invoice remove {invoice_id} --yesaeat --format json app ledger invoice remove {invoice_id} --yes{ "active_profile": "docs-sequence-sandbox", "command": "ledger.invoice.remove", "notices": [], "result": { "base_total": "2000.00", "base_total_eur": "2000.00", "bucket_id": "<bucket-id>", "counterparty_country": "DE", "counterparty_name": "Kunde GmbH", "counterparty_tax_id": "sha256:a9224776", "currency": "EUR", "fx_rate": null, "fx_rate_date": null, "fx_rate_source": null, "grand_total": "2000.00", "grand_total_eur": "2000.00", "invoice_id": "40a571f9701bc391916dba38afa366d1c771a3359521112706e6b73243b1f19b", "invoice_number": "EU-CAT-099", "issued_at": "2026-02-10", "iva_total": "0.00", "iva_total_eur": "0.00", "kind": "issued", "linked_transaction_ids": [], "notes": "", "operation_type": "E", "payment_status": "PENDING", "recargo_amount": null, "retention_amount": null, "retention_rate": null }, "schema_version": "2", "status": "success" }
Confirm the catalogue invoice was removed.
Quins modelos llegeixen les teves factures¶
Les factures del catàleg alimenten el Modelo 349 (la declaració recapitulativa d’operacions intracomunitàries) a través del tipus d’operació que hi estampes quan les crees. Aquest és el modelo que les teves factures emeses i rebudes alimenten directament.
Les teves declaracions d’IVA no llegeixen aquests registres de factura. El Modelo 303 (IVA trimestral) i el Modelo 390 (resum anual d’IVA) es calculen a partir de les teves transaccions del ledger classificades, no pas a partir del catàleg de factures. Registra l’ingrés i la despesa al ledger i classifica’ls (consulta Classifica transaccions); les declaracions d’IVA llegeixen el ledger. Registrar una factura aquí no l’afegeix a un Modelo 303.
Les vendes transfrontereres B2C acollides al règim de finestreta única (Modelo 369) segueixen un flux a part, encara no accessible des d”invoice add; registreu-les mitjançant el flux específic d’OSS.