Verifactu-PHP

Record extends Model
in package

AbstractYes

Base invoice record

Table of Contents

Constants

NS  = 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd'
XML namespace

Properties

$hash  : string
Huella o hash de cierto contenido de este registro de facturación
$hashedAt  : DateTimeImmutable
Fecha, hora y huso horario de generación del registro de facturación
$invoiceId  : InvoiceIdentifier
ID de factura
$previousHash  : string|null
Primeros 64 caracteres de la huella o hash del registro de facturación anterior
$previousInvoiceId  : InvoiceIdentifier|null
ID de factura del registro anterior

Methods

calculateHash()  : string
Calculate record hash
export()  : void
Export record to XML
fromXml()  : RegistrationRecord|CancellationRecord
Import instance from XML element
validate()  : void
Validate this instance
validateHash()  : void
validatePreviousInvoice()  : void

Constants

NS

XML namespace

public mixed NS = 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd'

Properties

$hash

Huella o hash de cierto contenido de este registro de facturación

public string $hash
Tags
field

Huella

Attributes
#[NotBlank]
#[Regex]
$pattern: '/^[0-9A-F]{64}$/'

$hashedAt

Fecha, hora y huso horario de generación del registro de facturación

public DateTimeImmutable $hashedAt
Tags
field

FechaHoraHusoGenRegistro

Attributes
#[NotBlank]

$previousHash

Primeros 64 caracteres de la huella o hash del registro de facturación anterior

public string|null $previousHash
Tags
field

Encadenamiento/RegistroAnterior/Huella

Attributes
#[Regex]
$pattern: '/^[0-9A-F]{64}$/'

$previousInvoiceId

ID de factura del registro anterior

public InvoiceIdentifier|null $previousInvoiceId
Tags
field

Encadenamiento/RegistroAnterior

Attributes
#[Valid]

Methods

calculateHash()

Calculate record hash

public abstract calculateHash() : string
Return values
string

Expected record hash

export()

Export record to XML

public export(UXML $xml, ComputerSystem $system) : void
Parameters
$xml : UXML

XML parent element

$system : ComputerSystem

Computer system information

validateHash()

public final validateHash(ExecutionContextInterface $context) : void
Parameters
$context : ExecutionContextInterface
Attributes
#[Callback]

validatePreviousInvoice()

public final validatePreviousInvoice(ExecutionContextInterface $context) : void
Parameters
$context : ExecutionContextInterface
Attributes
#[Callback]

        
On this page

Search results