Documentation Index
Fetch the complete documentation index at: https://mintlify.com/josemmo/Verifactu-PHP/llms.txt
Use this file to discover all available pages before exploring further.
InvoiceIdentifier (josemmo\Verifactu\Models\Records\InvoiceIdentifier) is the composite key that uniquely identifies an invoice within the VERI*FACTU system. It appears in both registration and cancellation record headers as the invoice’s own identity, and is also used as the chain link reference that cryptographically connects consecutive records together.
Constructor
NIF of the invoice issuer. When provided, sets
$this->issuerId.Invoice series and number. When provided, sets
$this->invoiceNumber.Issue date of the invoice. When provided, sets
$this->issueDate.Properties
NIF of the entity obliged to issue the invoice (IDEmisorFactura).
- Must not be blank
- Exactly 9 characters
- Corresponds to XML field
IDFactura/IDEmisorFactura(orIDEmisorFacturaAnuladain cancellation records)
Combined invoice series and number that uniquely identifies the invoice within the issuer’s records.
- Must not be blank
- Maximum 60 characters
- Corresponds to XML field
IDFactura/NumSerieFactura(orNumSerieFacturaAnuladain cancellation records)
Calendar date on which the invoice was issued. The time component is always ignored — only the date portion is serialised and compared.
- Must not be blank
- Corresponds to XML field
IDFactura/FechaExpedicionFacturaformatted asdd-mm-yyyy
Methods
fromXml()
InvoiceIdentifier from a <sum1:IDFactura> (or equivalent) XML element. Automatically detects whether to read standard or Anulada-suffixed fields. Throws josemmo\Verifactu\Exceptions\ImportException on missing or malformed elements.
export()
$xml element — no wrapper child node is created, because the identifier fields appear inside several different parent nodes across the AEAT schema.
The parent XML element to which the fields are appended.
When
true, the Anulada suffix is appended to each field name (IDEmisorFacturaAnulada, NumSerieFacturaAnulada, FechaExpedicionFacturaAnulada). Pass false for standard registration records.equals()
issuerId, invoiceNumber, and the date portion of issueDate (time is ignored).
The identifier to compare against.