app ledger¶
aeat app ledger add¶
Add one manual ledger transaction in the active profile
Parámetros
- --date
Booked date (YYYY-MM-DD) Opción, obligatoria.
- --amount
Transaction amount in the transaction currency (decimal, e.g. 1200.50). Opción, obligatoria.
- --direction
Transaction direction (INCOMING / OUTGOING / INTERNAL_TRANSFER) Opción, obligatoria.
- --description
Non-blank narrative Opción, obligatoria.
- --value-date
Value date (YYYY-MM-DD) Opción, opcional.
- --currency
Three-letter ISO 4217 currency code Opción, opcional.
- --counterparty
Counterparty descriptor Opción, opcional.
- --classification
Business classification (BUSINESS / PERSONAL / MIXED / …) Opción, opcional.
- --business-pct
Business-use share from 0 to 1; only for MIXED rows. Omit for fully BUSINESS rows. Opción, opcional.
- --category-id
Deductible-expense category id (expense transactions only; income needs no category) Opción, opcional.
- --taxable-base
IVA-exclusive base amount Opción, opcional.
- --iva-rate
Optional IVA rate as a decimal fraction Opción, opcional.
- --iva-amount
Optional IVA amount on the row Opción, opcional.
- --iva-category
Explicit IVA category override for this transaction (e.g. intra_community_supply, export_third_country_zero_rated, export_assimilated_zero_rated, domestic_not_subject) Opción, opcional.
- --deduction-kind
Exact source of the input-IVA deduction (for example domestic_current). Required for the input cuota to be deducted; the taxonomy is not inferred. Opción, opcional.
- --counterparty-country
Country where the counterparty is established (ISO 3166-1 alpha-2, e.g. US, DE). Establishment only; use –counterparty-identification-state for VAT identification. Opción, opcional.
- --counterparty-identification-state
Member State whose VAT number the counterparty trades under (Ley 37/1992 art. 25 exempts on this, not on where it is established) Opción, opcional.
- --recargo-amount
Recargo de equivalencia cuota charged on this sale to a recargo-regime retailer (LIVA art. 161); aggregated into the Modelo 303 recargo cuota by IVA rate tier Opción, opcional.
- --irpf-category
IRPF-specific category key Opción, opcional.
- --usage-ratio-id
Configured usage-ratio id, not arbitrary prose. Inspect the configured ratios and eligible categories before creating or assigning one; the row’s –category-id must already carry that ratio. Opción, opcional.
- --prorrata-reference
IVA prorrata substrate reference Opción, opcional.
- --art-104-tres-exclusion
Operator-declared LIVA art. 104.Tres denominator exclusion (foreign permanent establishment or non-habitual real-estate/financial operation); excludes the operation from both terms of the prorrata ratio. Opción, opcional.
- --input-classification
Operator-declared LIVA art. 106 prorrata-especial per-input use classification (exclusively_deductible: deducted in full; exclusively_non_deductible: no deduction; common: deducted at the general prorrata percentage); meaningful only for input rows in a bucket under prorrata especial. Opción, opcional.
- --sector
Differentiated-sector id (LIVA arts. 9.1.c / 101) to which this input belongs; it must match an already declared sector. Opción, opcional.
- --purchase-invoice-evidence-id
Canonical purchase-invoice evidence id Opción, opcional.
- --attachment-id
Supplementary attachment id (repeatable) Opción, opcional.
- --notes
Operator notes stored with the transaction Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
- --idempotency-key
Stable key for this logical add: passing the same key again is a safe no-op, so retries do not duplicate the row. Omit it to append a deliberate duplicate. Opción, opcional.
- --source-jurisdiction
Two-letter ISO 3166-1 alpha-2 country code identifying the regulatory source jurisdiction of the income or expense (e.g. ES for Spanish-source, FR for French-source). Required for IRNR scope and the Art. 93 LIRPF Beckham filter. Opción, opcional.
aeat app ledger allocate¶
Record business/private proportionality for a ledger transaction
Parámetros
- transaction_id
Ledger transaction id to allocate Argumento, obligatorio.
- --business-pct
Business-use share from 0 to 1 for MIXED/proportional rows; do not use ledger allocate for a fully BUSINESS row. Opción, obligatoria.
- --category-id
Deductible-expense category id (expense transactions only; income needs no category) Opción, opcional.
- --usage-ratio-id
Configured usage-ratio id, not arbitrary prose. Inspect the configured ratios and eligible categories before creating or assigning one; the row’s –category-id must already carry that ratio. Opción, opcional.
- --prorrata-reference
IVA prorrata reference for IVA workflows Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger archive¶
Archive one ledger transaction in the active profile
Parámetros
- transaction_id
Ledger transaction id to archive Argumento, obligatorio.
- --reason
Reason recorded in lifecycle history Opción, opcional.
- --yes
Confirm archiving the ledger transaction Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger attach¶
Attach existing evidence to a ledger transaction.
Parámetros
- transaction_id
Ledger transaction id to attach evidence to Argumento, obligatorio.
- --purchase-invoice-evidence-id
Existing purchase-invoice evidence id supporting the transaction. Opción, opcional.
- --attachment-id
Secure attachment id to link to the transaction; repeat for multiple attachments Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger bienes-inversion declare¶
Declare one capital good tracked for IVA regularización.
Parámetros
- identifier
Stable register identifier. Argumento, obligatorio.
- --description
Human description of the good. Opción, obligatoria.
- --acquisition-year
Year the good was acquired. Opción, obligatoria.
- --acquisition-ledger-id
Sin descripción. Opción, obligatoria.
- --cuota-soportada
Total input IVA borne on acquisition (positive). Opción, obligatoria.
- --prorrata-inicial
Definitive deduction percentage of the acquisition year (0-100). Opción, obligatoria.
- --kind
Regularisation window: mueble (4yr) or inmueble (9yr). Opción, obligatoria.
- –art108-elegible / –no-art108-elegible
Whether the good qualifies as a bien de inversión under LIVA art. 108. Opción, opcional.
- --sector
Sin descripción. Opción, opcional.
- --disposal-year
Optional art-110 disposal year. Opción, opcional.
- --disposal-regime
Disposal regime (sujeta_no_exenta or exenta_o_no_sujeta); required with –disposal-year. Opción, opcional.
aeat app ledger bienes-inversion list¶
List every tracked capital good on the active profile register.
aeat app ledger categories¶
List the category ids accepted by –category-id and –irpf-category
aeat app ledger check¶
Probe ledger transactions in the addressed profile (defaults to the active profile) and report anomaly rows aggregated across every period a transaction touches, plus any invoice link the invoice and transaction catalogues disagree about. Local-only; never contacts AEAT.
Parámetros
- --bucket-id
Bucket id to probe (defaults to the active profile). Opción, opcional.
- --period
Optional filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to match ledger status. Opción, opcional.
- --year
Filing year for –period (e.g. 2024). Opción, opcional.
aeat app ledger classify¶
Classify one ledger transaction in the active profile
Parámetros
- transaction_id
Ledger transaction id to classify Argumento, opcional.
- --classification
Business classification state for the transaction Opción, opcional.
- --file
Path to a CSV file with columns transaction_id, classification[, category_id, business_pct, usage_ratio_id, taxable_base, iva_rate, iva_amount, iva_category, irpf_category]. Opción, opcional.
- --business-pct
Business-use share from 0 to 1; required with –classification MIXED, rejected for any other classification, and omitted for fully BUSINESS rows Opción, opcional.
- --category-id
Deductible-expense category id (expense transactions only; income needs no category) Opción, opcional.
- --taxable-base
Taxable base amount Opción, opcional.
- --iva-rate
IVA rate as a decimal, for example 0.21 Opción, opcional.
- --iva-amount
IVA amount Opción, opcional.
- --irpf-category
IRPF category id. Net-paid professional invoices use actividad_economica; net-paid rents use arrendamiento_local or arrendamiento_vivienda_afecto. Royalties and SGAE income are capital mobiliario under LIRPF art. 25.4 when the taxpayer is not the author, and actividad economica under LIRPF art. 27 when they are and carry on the activity. Consult the ledger category catalogue for all ids. Opción, opcional.
- --m210-tipo-renta-code
Official two-digit Modelo 210 tipo-de-renta code. Opción, opcional.
- --m210-gross-income-amount
Explicit gross income for the Modelo 210 source projection. Opción, opcional.
- --m210-applicable-rate
Applicable Modelo 210 rate as a decimal fraction, for example 0.24. Opción, opcional.
- --m210-payer-mode
One payer or the explicit code-35 multiple-payer exception. Opción, opcional.
- --m210-payer-id
Stable payer identity for a single-payer Modelo 210 component. Opción, opcional.
- --m210-asset-or-right-id
Stable property or right identity for the Modelo 210 renta. Opción, opcional.
- --iva-category
Explicit IVA category override for this transaction (e.g. intra_community_supply, export_third_country_zero_rated, export_assimilated_zero_rated, domestic_not_subject) Opción, opcional.
- --deduction-kind
Exact source of the input-IVA deduction (for example domestic_current). Required for the input cuota to be deducted; the taxonomy is not inferred. Opción, opcional.
- --counterparty-country
Country where the counterparty is established (ISO 3166-1 alpha-2, e.g. US, DE). Establishment only; use –counterparty-identification-state for VAT identification. Opción, opcional.
- --counterparty-identification-state
Member State whose VAT number the counterparty trades under (Ley 37/1992 art. 25 exempts on this, not on where it is established) Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
- --reaffirm
Reaffirm the classification of an already-classified transaction. Opción, opcional.
- --llm
Ask the on-host local reader to classify the transaction; preview by default, persist with –apply. Opción, opcional.
- --apply
Persist the LLM suggestion with llm: provenance instead of only previewing it. Opción, opcional.
- --saturate
Saturate via LLM: also select the IVA category and derive the rate, base, and IVA amount. Opción, opcional.
- --read-evidence
Read the transaction’s attached evidence on-host and feed it to the classifier. Opción, opcional.
- --vision-model
Override the local Ollama vision model for an image/scanned-invoice read (e.g. qwen2.5vl:7b); defaults to the configured model. Opción, opcional.
- --auto-split
Read the attached invoice and, when it is multi-component, split it into per-line base/IVA children; otherwise classify it in place (requires –read-evidence). Opción, opcional.
- --reject
Record an explicit rejection of the LLM suggestion as an audit event, without classifying the row (cannot be combined with –apply). Opción, opcional.
- --reason
Free-text reason recorded as the transaction notes and as the classification decision’s provenance reason (visible on ledger view), or with a –reject decision. Opción, opcional.
aeat app ledger counterparty confirm¶
Confirm where a counterparty is established and which State VAT-identifies it.
Parámetros
- tax_identifier
The counterparty’s tax identifier as printed on the document. Argumento, obligatorio.
- --scope
The IVA territory the counterparty is established in. Opción, opcional.
- --identification-state
Member State that VAT-identifies the counterparty. A different fact from –scope: art. 25 exempts on this, not on where the party is established. Opción, opcional.
- --country-code
Country the identifier is stated under, when it is not Spanish. Opción, opcional.
- --note
What the answer rests on, in your own words. Recorded, never consulted. Opción, opcional.
- --actor
Operator identifier recorded as having made the assertion. Opción, opcional.
aeat app ledger counterparty view¶
Show what the VAT-identification ladder would answer for this counterparty based on what is confirmed so far.
Parámetros
- tax_identifier
The counterparty’s tax identifier as printed on the document. Argumento, obligatorio.
- --country-code
Country the identifier is stated under, when it is not Spanish. Opción, opcional.
- --evidenced-scope
Territory a document in hand places this party in. Supply it to ask what the ladder will answer for that document, which is the only way to see a disagreement with what you confirmed before a confirm refuses on it. Opción, opcional.
aeat app ledger counterparty withdraw¶
Withdraw what was confirmed about a counterparty, stating the earlier answer was wrong.
Parámetros
- tax_identifier
The counterparty’s tax identifier as printed on the document. Argumento, obligatorio.
- --country-code
Country the identifier is stated under, when it is not Spanish. Opción, opcional.
aeat app ledger detach¶
Detach attachments from a ledger transaction without deleting their bytes.
Parámetros
- transaction_id
Ledger transaction id (or an unambiguous prefix). Argumento, obligatorio.
- --attachment-id
Id of the attachment to detach; repeatable. Opción, opcional.
- --actor
Actor recorded on the lifecycle event. Opción, opcional.
aeat app ledger evidence add¶
Register purchase invoice evidence from a PDF or image
Parámetros
- source_path
Path to the invoice PDF or image Argumento, obligatorio.
- --supplier
Supplier name Opción, opcional.
- --invoice-number
Supplier invoice number Opción, opcional.
- --invoice-date
Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Opción, opcional.
- --taxable-base
Invoice taxable base Opción, opcional.
- --iva-rate
Applied IVA rate as a decimal Opción, opcional.
- --iva-amount
Invoice IVA amount Opción, opcional.
- --notes
Internal notes about the evidence Opción, opcional.
- --idempotency-key
Your own key for this attachment. Repeating the command with the same key returns the record it already created instead of adding a second one, and refuses if the document behind the key changed. Without a key the command adds a new record every time, because the same file can legitimately be attached twice. Opción, opcional.
aeat app ledger evidence attachment-queue¶
List Drive attachments awaiting invoice review.
aeat app ledger evidence attachment-view¶
Inspect stored attachment metadata and provenance.
Parámetros
- attachment_id
Content-addressed attachment identifier. Argumento, obligatorio.
aeat app ledger evidence batch¶
Ingest every document in a directory (or each –file) into evidence and a reviewable draft, one typed result row per document.
Parámetros
- directory
Directory whose files are ingested. Combine with or replace by repeated –file. Argumento, opcional.
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, obligatoria.
- --file
One document to ingest. Repeat once per document; combines with a directory. Opción, opcional.
aeat app ledger evidence confirm¶
Re-extract evidence on-host and confirm it into a real catalogue Invoice.
Parámetros
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, obligatoria.
- --evidence-id
Purchase invoice evidence record id to extract from. Opción, opcional.
- --attachment-id
Linked attachment id to extract from (alternative to –evidence-id). Opción, opcional.
- --counterparty-nif
Override the extracted supplier tax id. Opción, opcional.
- --counterparty-name
Counterparty display name (no extraction heuristic yet; normally required). Opción, opcional.
- --invoice-number
Override the extracted invoice number. Opción, opcional.
- --invoice-date
Override the extracted invoice date (YYYY-MM-DD). Opción, opcional.
- --taxable-base
Override the extracted taxable base. Opción, opcional.
- --iva-rate
Override the extracted IVA rate (omit to keep the extracted value). Opción, opcional.
- --country-code
Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Opción, obligatoria.
- --currency
ISO-4217 currency code. Opción, opcional.
- --operation-type
Modelo 349 clave for an entrega intracomunitaria. Required when the document states an intra-community supply: the category cannot say whether it followed an exempt importation. Opción, opcional.
- --supply-nature
State whether the operation is a supply of goods or of services. The place-of-supply rules differ, so a document that does not say leaves the treatment unresolved. Opción, opcional.
- --invoice-class
Declare the invoice class when the document does not state one. A rectificativa is read from the document where it names the invoice it corrects, so this is the override for documents that do not. Opción, opcional.
- --rectifies
Number of the invoice this rectificativa corrects. Required by RD 1619/2012 art. 6.1.a.2 alongside its own series, and read from the document where one is named. Opción, opcional.
- --series
Numbering series the invoice was issued in. RD 1619/2012 art. 6.1.a.2 obliges a rectificativa into its own series, so declaring that class needs one; read from the document where it states one. Opción, opcional.
- --notes
Internal notes about the evidence Opción, opcional.
- --resolve
Answer one blocking finding: <finding-id>=<choose|supply|attest>:<value-or-reason>. For choose, name the reading by its value or by the digest review showed. Repeat once per finding; there is no bulk flag. Opción, opcional.
aeat app ledger evidence consent list¶
List every off-host dispatch and the artefacts derived from one.
aeat app ledger evidence extract¶
Read an invoice PDF’s fields on-host into a reviewable draft.
Parámetros
- --evidence-id
Purchase invoice evidence record id to extract from. Opción, opcional.
- --attachment-id
Linked attachment id to extract from (alternative to –evidence-id). Opción, opcional.
- --off-host-provider
Send this document to a hosted model instead of reading it on-host. Opción, opcional.
- --acknowledge-off-host
Acknowledge, for this one read, that the document leaves this machine. Opción, opcional.
aeat app ledger evidence list¶
List registered purchase invoice evidence
aeat app ledger evidence pull¶
Fetch a Drive document link and store its bytes as encrypted evidence on a ledger row.
Parámetros
- transaction_id
Ledger transaction id. Argumento, obligatorio.
- --source
Link source: gmail, google_drive, or url. Opción, obligatoria.
- --reference
The document link reference. Opción, obligatoria.
- --note
Optional note. Opción, opcional.
- --actor
Operator label. Opción, opcional.
aeat app ledger evidence pull-all¶
Bulk-fetch every PDF/image invoice in a Drive folder and store each as encrypted evidence, unlinked to any transaction.
Parámetros
- --folder
Drive folder URL or bare folder id to bulk-fetch invoice PDFs/images from. Opción, obligatoria.
- --note
Optional note recorded on every fetched attachment. Opción, opcional.
aeat app ledger evidence remove¶
Delete purchase invoice evidence
Parámetros
- evidence_id
Evidence id (exact match) Argumento, obligatorio.
- --yes
Confirm deleting the evidence Opción, opcional.
aeat app ledger evidence review list¶
List pending extraction drafts awaiting human review.
Parámetros
- --reason
Show only drafts blocked for this reason. Opción, opcional.
- --finding
Show only drafts whose document failed this deterministic check. Opción, opcional.
- --advisory
Show only drafts carrying this non-blocking advisory. These stop nothing, so they are otherwise met only by opening each document. Opción, opcional.
- --blocking
Show only drafts that cannot be confirmed until a finding is answered. Opción, opcional.
aeat app ledger evidence review view¶
Show every reviewable field of a pending draft, along with its blocking findings.
Parámetros
- reference
Evidence or attachment reference the pending draft was read from. Argumento, obligatorio.
aeat app ledger evidence update¶
Update purchase invoice evidence details
Parámetros
- evidence_id
Evidence id (exact match) Argumento, obligatorio.
- --supplier
Sin descripción. Opción, opcional.
- --invoice-number
Sin descripción. Opción, opcional.
- --invoice-date
Sin descripción. Opción, opcional.
- --taxable-base
Sin descripción. Opción, opcional.
- --iva-rate
Sin descripción. Opción, opcional.
- --iva-amount
Sin descripción. Opción, opcional.
- --notes
Sin descripción. Opción, opcional.
aeat app ledger evidence view¶
Show purchase invoice evidence
Parámetros
- evidence_id
Evidence id (exact match) Argumento, obligatorio.
aeat app ledger exclude¶
Mark one reviewed ledger transaction as deliberately excluded from filing.
Parámetros
- transaction_id
Ledger transaction id. Argumento, obligatorio.
- --reason
Optional note recording why the row is excluded. Opción, opcional.
- --yes
Confirm the reviewed-excluded decision. Opción, opcional.
- --actor
Operator label. Opción, opcional.
aeat app ledger export¶
Export canonical ledger rows from the active profile
Parámetros
- --output
Path to write the exported ledger file Opción, obligatoria.
- --export-format
Export serialization format Opción, opcional.
- --include-inactive
Include archived and stashed ledger transactions Opción, opcional.
- --period
Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Opción, opcional.
- --year
Filing year for –period (e.g. 2024). Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger history¶
Emit the chronological bucket-event chain for one ledger transaction id
Parámetros
- transaction_id
Ledger transaction id (or unambiguous hex prefix) to inspect Argumento, obligatorio.
- --include-split-siblings
Expand the chain to include events for every split sibling that shares a split_group_id with this transaction Opción, opcional.
aeat app ledger import¶
Import bank statements or records into the accounting ledger
Parámetros
- --file
Path to the bank statement file or directory Opción, obligatoria.
- --provider
Statement format provider. Opción, obligatoria.
- --dry-run
Run the import in dry-run mode (without saving) Opción, opcional.
- --verify
Verify entries after import Opción, opcional.
- --verify-source
Original file used to verify imported rows. Opción, opcional.
- --verbose
Show detailed information during import Opción, opcional.
- --period
Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Opción, opcional.
- --year
Filing year for –period (e.g. 2024). Opción, opcional.
aeat app ledger inventory create¶
Create an inventory ledger for one activity and tax year
Parámetros
- actividad_id
Economic activity identifier Argumento, obligatorio.
- --year
Tax year Opción, obligatoria.
- --valuation-method
Valuation method (fifo or pmp) Opción, obligatoria.
- --opening-stock
Opening stock value Opción, opcional.
aeat app ledger inventory list¶
List inventory ledgers in the active profile
aeat app ledger inventory movement add¶
Add a purchase, sale, or adjustment movement to the ledger
Parámetros
- --actividad-id
Economic activity identifier Opción, obligatoria.
- --year
Tax year Opción, obligatoria.
- --movement-id
Movement id within the ledger Opción, obligatoria.
- --date
Movement date (YYYY-MM-DD) Opción, obligatoria.
- --kind
Movement kind (opening, purchase, cogs or count) Opción, obligatoria.
- --quantity
Movement quantity, positive or negative Opción, obligatoria.
- --unit-cost
Unit cost for purchase movements Opción, opcional.
- --taxable-base
Taxable base linked to the movement Opción, opcional.
- --acquisition-cost-stdin
Read the complete acquisition-cost JSON object from stdin Opción, opcional.
aeat app ledger inventory valuation preview¶
Preview closing stock and cost of sales
Parámetros
- --actividad-id
Economic activity identifier Opción, obligatoria.
- --year
Tax year Opción, obligatoria.
aeat app ledger invoice add¶
Create a linkable reconciliation invoice in the catalogue.
Parámetros
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, obligatoria.
- --counterparty-name
Sin descripción. Opción, obligatoria.
- --invoice-number
Sin descripción. Opción, obligatoria.
- --invoice-date
Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Opción, obligatoria.
- --taxable-base
Sin descripción. Opción, obligatoria.
- --country-code
Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Opción, obligatoria.
- --iva-rate
Sin descripción. Opción, opcional.
- --currency
Sin descripción. Opción, opcional.
- --operation-type
M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Opción, opcional.
- --operation-date
Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Opción, opcional.
- --retention-rate
RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Opción, opcional.
- --retention-amount
Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Opción, opcional.
- --invoice-class
Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Opción, opcional.
- --counterparty-nif
Sin descripción. Opción, opcional.
- --series
Invoice numbering series, when the issuer uses one. Opción, opcional.
- --rectifies-invoice-number
Number of the invoice this rectificativa corrects. Opción, opcional.
- --recargo
Recargo de equivalencia charged on top of the cuota (LIVA art. 161). It rides inside the invoice total, unlike a retencion. Opción, opcional.
- --iva-category
IVA treatment of the operation. Required for a renta income calculation to ground it. Opción, opcional.
- --notes
Sin descripción. Opción, opcional.
aeat app ledger invoice import¶
Bulk-create catalogue invoices from a CSV or XLSX file.
Parámetros
- --file
Path to a CSV or XLSX file of invoice rows (counterparty_nif, counterparty_name, invoice_number, invoice_date, taxable_base, and optional iva_rate/retencion_amount/retencion_rate/currency/country_code/notes). A retencion_rate is accepted only beside its retencion_amount. Opción, obligatoria.
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, obligatoria.
- --country
Counterparty country (ISO 3166-1 alpha-2) for the whole import. Required only when the file carries no country_code column; ignored for rows that state their own. It asserts this country for EVERY such row, so a book mixing domestic and foreign counterparties needs the column instead. Opción, opcional.
aeat app ledger invoice list¶
List reconciliation catalogue invoices.
Parámetros
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, opcional.
aeat app ledger invoice remove¶
Delete one reconciliation catalogue invoice.
Parámetros
- invoice_id
Catalogue invoice id (or unambiguous prefix). Argumento, obligatorio.
- --yes
Confirm deleting the invoice Opción, opcional.
aeat app ledger invoice update¶
Update business invoice details
Parámetros
- invoice_id
Catalogue invoice id (or unambiguous prefix). Argumento, obligatorio.
- --counterparty-name
Sin descripción. Opción, opcional.
- --counterparty-country
Sin descripción. Opción, opcional.
- --notes
Sin descripción. Opción, opcional.
- --iva-category
IVA treatment of the operation. Required for a renta income calculation to ground it. Opción, opcional.
- --operation-type
M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Opción, opcional.
- --operation-date
Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Opción, opcional.
- --retention-rate
RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Opción, opcional.
- --retention-amount
Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Opción, opcional.
- --invoice-class
Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Opción, opcional.
- --series
Invoice numbering series, when the issuer uses one. Opción, opcional.
- --rectifies-invoice-number
Number of the invoice this rectificativa corrects. Opción, opcional.
aeat app ledger invoice view¶
Show one reconciliation catalogue invoice by id or unambiguous prefix.
Parámetros
- invoice_id
Catalogue invoice id (or unambiguous prefix). Argumento, obligatorio.
aeat app ledger invoice wizard¶
Guided, non-interactive manual entry when extraction is unavailable.
Parámetros
- --kind
Invoice kind: issued (a customer owes you) or received (you owe a supplier) Opción, obligatoria.
- --counterparty-nif
Sin descripción. Opción, obligatoria.
- --counterparty-name
Sin descripción. Opción, obligatoria.
- --invoice-number
Sin descripción. Opción, obligatoria.
- --invoice-date
Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Opción, obligatoria.
- --taxable-base
Sin descripción. Opción, obligatoria.
- --country-code
Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Opción, obligatoria.
- --iva-rate
Sin descripción. Opción, opcional.
- --currency
Sin descripción. Opción, opcional.
- --operation-type
M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Opción, opcional.
- --operation-date
Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Opción, opcional.
- --retention-rate
RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Opción, opcional.
- --retention-amount
Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Opción, opcional.
- --invoice-class
Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Opción, opcional.
- --series
Invoice numbering series, when the issuer uses one. Opción, opcional.
- --rectifies-invoice-number
Number of the invoice this rectificativa corrects. Opción, opcional.
- --recargo
Recargo de equivalencia charged on top of the cuota (LIVA art. 161). It rides inside the invoice total, unlike a retencion. Opción, opcional.
- --iva-category
IVA treatment of the operation. Required for a renta income calculation to ground it. Opción, opcional.
- --notes
Sin descripción. Opción, opcional.
aeat app ledger link¶
Bind a ledger transaction to a reconciliation-catalogue invoice in one atomic call. Refuses cross-bucket links. Local-only; never contacts AEAT.
Parámetros
- transaction_id
Ledger transaction id (SHA-256 or unambiguous prefix). Argumento, obligatorio.
- --invoice-id
Invoice id to bind bidirectionally to the transaction. Opción, obligatoria.
- --by
Operator label recorded on bucket events. Opción, opcional.
aeat app ledger list¶
List ledger transactions in the active profile
Parámetros
- --filter
Filter rows by status, period (a bare AEAT token, e.g. period=1T) plus year (e.g. year=2026), classification, issue, import, direction (ingreso/gasto), or text. To filter by organisational group label use the separate –group option. Opción, opcional.
- --period
Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Opción, opcional.
- --year
Filing year for –period (e.g. 2024). Opción, opcional.
- --limit
Maximum rows to show (default: all rows). Opción, opcional.
- --offset
Skip this many rows before listing (default: 0). Opción, opcional.
- --group
Show only rows in this group label. Opción, opcional.
- --by-group
Section the listing by group label. Opción, opcional.
- --sort-by
Sort the listed rows by this field (date, amount, description, created_at, modified_at, …). Opción, opcional.
- --sort-order
Sort order: asc (ascending) or desc (descending). Opción, opcional.
- --hide-llm-rejected
Hide rows whose most recent LLM suggestion was rejected (a reviewed-and-declined row drops out of the pending queue). Opción, opcional.
aeat app ledger llm-diagnostics¶
Report existing LLM usage, cost, and classification-confidence metrics.
Parámetros
- --since
Inclusive lower ISO date (YYYY-MM-DD) bound on usage records. Opción, opcional.
- --until
Inclusive upper ISO date (YYYY-MM-DD) bound on usage records. Opción, opcional.
- --low-confidence-below
Confidence floor below which a classification counts as low-confidence. Opción, opcional.
aeat app ledger merge¶
Re-merge a complete cohort of split children into a fresh transaction
Parámetros
- --child-id
One child id (or unambiguous prefix) to merge. Repeat for every sibling in the cohort; partial merges are refused. Opción, opcional.
- --reason
Reason recorded in the bucket-event payload and lifecycle history Opción, opcional.
- --yes
Confirm the merge (archives every child and the parent, persists a fresh content-addressed merged transaction) Opción, opcional.
- --actor
Operator name recorded on the LEDGER_TRANSACTION_MERGED event Opción, opcional.
aeat app ledger participation rebuild¶
Rebuild the participation index for the active bucket.
aeat app ledger preflight¶
Report missing ledger facts (category, taxable base, IVA amount/rate, currency, proportionality reference) for the active profile’s transactions in a given period. Local-only; never contacts AEAT.
Parámetros
- --period
Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Opción, obligatoria.
- --year
Filing year (e.g. 2024). Opción, obligatoria.
aeat app ledger prorrata declare-sector¶
Declare one differentiated sector (LIVA arts. 9.1.c / 101): the operator’s art. 9.1.c partition, never inferred from the ledger.
Parámetros
- --sector-id
Stable sector id the register entries and ledger rows reference. Opción, obligatoria.
- --letra
LIVA art. 9.1.c letra (a/b/c/d) that makes this sector differentiated. Opción, obligatoria.
- --activity-code
CNAE / IAE activity code grouped into this sector (repeatable, at least one). Opción, opcional.
aeat app ledger prorrata elect-especial¶
Elect prorrata especial for an ejercicio (LIVA art. 103.Dos.1): per-input deduction routes by –input-classification on each ledger row.
Parámetros
- --ejercicio
Filing year the election covers. Opción, obligatoria.
- --percentage
Common-use deduction percentage 0-100 (LIVA art. 106.Uno regla 3.a / art. 104.Dos). Opción, obligatoria.
- --evidence-reference
Operator-held evidence for an option exercised in this ejercicio; omit to record an explicit continuation of the regime already in force. Opción, opcional.
- --provenance
LIVA art. 105 source of the provisional percentage. Opción, opcional.
- --reference
AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Opción, opcional.
- --sector
Differentiated-sector id this entry covers; omit for the whole-entity entry. Opción, opcional.
aeat app ledger prorrata elect-general¶
Elect prorrata general for an ejercicio (LIVA art. 104): one deduction percentage applies to every deducible cuota.
Parámetros
- --ejercicio
Filing year the election covers. Opción, obligatoria.
- --percentage
Provisional deduction percentage 0-100 (LIVA art. 104.Uno + 105.Uno). Opción, obligatoria.
- --provenance
LIVA art. 105 source of the provisional percentage. Opción, opcional.
- --reference
AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Opción, opcional.
- --sector
Differentiated-sector id this entry covers; omit for the whole-entity entry. Opción, opcional.
aeat app ledger prorrata list¶
List every register entry and declared differentiated sector on the active profile.
aeat app ledger prorrata revoke-especial¶
Revoke prorrata especial for an ejercicio after a prior-year especial state (LIVA art. 103.Dos.1).
Parámetros
- --ejercicio
Filing year the election covers. Opción, obligatoria.
- --evidence-reference
Evidence reference for the current-period prorrata-especial option or revocation. Opción, obligatoria.
- --percentage
Provisional deduction percentage 0-100 (LIVA art. 104.Uno + 105.Uno). Opción, obligatoria.
- --provenance
LIVA art. 105 source of the provisional percentage. Opción, opcional.
- --reference
AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Opción, opcional.
- --sector
Differentiated-sector id this entry covers; omit for the whole-entity entry. Opción, opcional.
aeat app ledger prorrata seed¶
Seed the ejercicio’s provisional prorrata from the prior year’s definitive percentage (LIVA art. 105.Uno), read from the stamped prior Modelo 303 settlement observation.
Parámetros
- --ejercicio
Filing year whose provisional percentage is being seeded or settled. Opción, obligatoria.
- --sector
Differentiated-sector id this entry covers; omit for the whole-entity entry. Opción, opcional.
aeat app ledger prorrata seed-sector¶
Seed one differentiated sector’s provisional prorrata from that sector’s own prior-year definitive held in the register (LIVA arts. 101.Uno / 105.Uno).
Parámetros
- --ejercicio
Filing year whose provisional percentage is being seeded or settled. Opción, obligatoria.
- --sector-id
Stable sector id the register entries and ledger rows reference. Opción, obligatoria.
aeat app ledger prorrata settle-sector¶
Settle one differentiated sector’s year-end definitive prorrata from that sector’s own annual operation volumes (LIVA art. 105.Cuatro).
Parámetros
- --ejercicio
Filing year whose provisional percentage is being seeded or settled. Opción, obligatoria.
- --sector-id
Stable sector id the register entries and ledger rows reference. Opción, obligatoria.
- --con-derecho-volume
The sector’s annual volume of operations with a right to deduct (LIVA art. 104, art. 104.Tres exclusions already applied). Opción, obligatoria.
- --sin-derecho-volume
The sector’s annual volume of operations with no right to deduct (LIVA art. 104, art. 104.Tres exclusions already applied). Opción, obligatoria.
aeat app ledger ratios eligible¶
List categories that accept a specific ratio
Parámetros
- --year
Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Opción, opcional.
- –output-language / –language
Output language for the response text (es, en, ca, hu). Opción, opcional.
aeat app ledger ratios list¶
List category ratios in the active profile
Parámetros
- --year
Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Opción, opcional.
- –output-language / –language
Output language for the response text (es, en, ca, hu). Opción, opcional.
aeat app ledger ratios set¶
Set or replace the ratio for a category
Parámetros
- --year
Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Opción, opcional.
- category
Spending category id (e.g. vehiculo_combustible) Argumento, obligatorio.
- ratio
Applicable ratio between 0 and 1 Argumento, obligatorio.
- –output-language / –language
Output language for the response text (es, en, ca, hu). Opción, opcional.
aeat app ledger ratios unset¶
Remove the specific ratio for a category
Parámetros
- category
Category id whose ratio you want to clear Argumento, obligatorio.
- –output-language / –language
Output language for the response text (es, en, ca, hu). Opción, opcional.
aeat app ledger ratios validate¶
Validate ratios against eligible categories and bounds
Parámetros
- –output-language / –language
Output language for the response text (es, en, ca, hu). Opción, opcional.
aeat app ledger remove¶
Remove one ledger transaction from the active profile
Parámetros
- transaction_id
Ledger transaction id to remove Argumento, obligatorio.
- --reason
Reason recorded in removal history Opción, opcional.
- --dry-run
Report removal effects without deleting the ledger transaction Opción, opcional.
- --yes
Confirm deletion of the ledger transaction Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger reset¶
Reset the active profile’s ledger catalogue
Parámetros
- --reason
Reason recorded in reset history Opción, opcional.
- --dry-run
Report reset effects without clearing the ledger catalogue Opción, opcional.
- --yes
Confirm clearing the active ledger catalogue Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger restore¶
Restore one stashed or archived ledger transaction to active
Parámetros
- transaction_id
Ledger transaction id to restore to active Argumento, obligatorio.
- --reason
Reason recorded in lifecycle history Opción, opcional.
- --yes
Confirm restoring the ledger transaction to active Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger review¶
Interactive review and validation of ledger entries
Parámetros
- record_id
Ledger transaction id (or unambiguous hex prefix) Argumento, opcional.
- --filter
Filter rows by status, period (a bare AEAT token, e.g. period=1T) plus year (e.g. year=2026), issue, import, classification, text, or direction Opción, opcional.
- --verbose
Show detailed information during review Opción, opcional.
aeat app ledger rule add¶
Add a classification rule that auto-classifies matching transactions.
Parámetros
- --description-pattern
Regex pattern matched (case-insensitive) against transaction description. Opción, obligatoria.
- --classification
Target classification for matching transactions. Opción, obligatoria.
- --category-id
Optional spending category to apply. Opción, opcional.
- --priority
Numeric priority; lower value is evaluated first (default 100). Opción, opcional.
- --actor
Operator identifier recorded in the rule provenance. Opción, opcional.
aeat app ledger rule apply¶
Apply stored classification rules to unclassified ACTIVE transactions.
Parámetros
- --reaffirm
Also re-classify transactions that were manually classified. Opción, opcional.
- --dry-run
Show what would be classified without persisting changes. Opción, opcional.
- --actor
Operator identifier recorded in the rule provenance. Opción, opcional.
aeat app ledger rule list¶
List stored classification rules ordered by priority.
aeat app ledger split¶
Redistribute one parent transaction into N child transactions whose amounts sum to the parent amount exactly
Parámetros
- transaction_id
Parent transaction id (or unambiguous hex prefix) to split Argumento, obligatorio.
- --child-amount
One child amount as a non-negative magnitude in the parent’s currency. Repeat once per child; the count must match –child-description. Opción, opcional.
- --child-description
One child narrative. Repeat once per child; the count must match –child-amount. Opción, opcional.
- --llm
Propose an evidence-driven N-way split with the given LLM provider. Opción, opcional.
- --apply
Persist the proposed –llm split (requires –yes); without it the proposal is previewed only. Opción, opcional.
- --read-evidence
Read the transaction’s attached invoice on-host and feed it to the –llm split proposer. Opción, opcional.
- --vision-model
Override the local Ollama vision model for an image/scanned-invoice read (e.g. qwen2.5vl:7b); defaults to the configured model. Opción, opcional.
- --reason
Reason recorded in the bucket-event payload and lifecycle history Opción, opcional.
- --yes
Confirm the split (transitions the parent to SPLIT and persists N child transactions) Opción, opcional.
- --actor
Operator name recorded on the LEDGER_TRANSACTION_SPLIT event Opción, opcional.
aeat app ledger stash¶
Stash one ledger transaction in the active profile
Parámetros
- transaction_id
Ledger transaction id to stash Argumento, obligatorio.
- --reason
Reason recorded in lifecycle history Opción, opcional.
- --yes
Confirm stashing the ledger transaction Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger status¶
Summarize ledger state and calculation readiness for the active profile
Parámetros
- --period
Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Opción, opcional.
- --year
Filing year for –period (e.g. 2024). Opción, opcional.
aeat app ledger track¶
Show the event lineage for one ledger transaction
Parámetros
- transaction_id
Ledger transaction id to inspect Argumento, obligatorio.
aeat app ledger update¶
Update one ledger transaction with full-replace field semantics
Parámetros
- transaction_id
Ledger transaction id (or unambiguous hex prefix) to update Argumento, obligatorio.
- --date
New booked date (YYYY-MM-DD) Opción, opcional.
- --value-date
New value date (YYYY-MM-DD) Opción, opcional.
- --amount
New non-negative amount magnitude (full replace) Opción, opcional.
- --direction
New transaction direction Opción, opcional.
- --currency
New three-letter ISO 4217 currency code Opción, opcional.
- --counterparty
New counterparty descriptor Opción, opcional.
- --description
New narrative Opción, opcional.
- --taxable-base
New IVA-exclusive base amount Opción, opcional.
- --iva-rate
New IVA rate as a decimal fraction Opción, opcional.
- --iva-amount
New IVA amount Opción, opcional.
- --irpf-category
New IRPF-specific category key Opción, opcional.
- --notes
New operator notes Opción, opcional.
- --group
Assign an organisational group label (pass an empty string to clear). Opción, opcional.
- --actor
Operator name recorded on the bucket event Opción, opcional.
aeat app ledger view¶
View one ledger transaction in the active profile
Parámetros
- transaction_id
Ledger transaction id (or unambiguous hex prefix) Argumento, obligatorio.