Skip to main content

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.

ComputerSystem (josemmo\Verifactu\Models\ComputerSystem) represents the Sistema Informático de Facturación (SIF) metadata that AEAT requires to be embedded in every billing record batch. It identifies both the software vendor and the specific installation that is generating the records. All properties are validated through the inherited validate() method before records are transmitted.

Properties

vendorName
string
required
Legal name or trade name of the entity that produces the SIF software.
  • Must not be blank
  • Maximum 120 characters
  • Corresponds to XML field NombreRazon
vendorNif
string
required
Spanish tax identification number (NIF) of the software vendor.
  • Must not be blank
  • Exactly 9 characters
  • Corresponds to XML field NIF
name
string
required
Product name assigned by the vendor to this SIF.
  • Must not be blank
  • Maximum 30 characters
  • Corresponds to XML field NombreSistemaInformatico
id
string
required
Short code identifier assigned by the vendor to this SIF.
  • Must not be blank
  • Maximum 2 characters
  • Corresponds to XML field IdSistemaInformatico
version
string
required
Version string of the SIF software.
  • Must not be blank
  • Maximum 50 characters
  • Corresponds to XML field Version
installationNumber
string
required
Unique identifier for this particular installation of the SIF (e.g. a licence number or instance ID).
  • Must not be blank
  • Maximum 100 characters
  • Corresponds to XML field NumeroInstalacion
onlySupportsVerifactu
bool
required
Whether the SIF is capable of operating only in VERI*FACTU mode (i.e. it cannot function in offline / non-VERI*FACTU mode).
  • Must not be null
  • Corresponds to XML field TipoUsoPosibleSoloVerifactu (S / N)
supportsMultipleTaxpayers
bool
required
Whether the SIF is designed to independently manage the billing of more than one taxpayer (obligado tributario).
  • Must not be null
  • Corresponds to XML field TipoUsoPosibleMultiOT (S / N)
hasMultipleTaxpayers
bool
required
Whether the SIF is currently managing the billing of more than one taxpayer at the time this record is generated.
  • Must not be null
  • Corresponds to XML field IndicadorMultiplesOT (S / N)
hasMultipleTaxpayers reflects the runtime state at the moment of record generation and may differ from supportsMultipleTaxpayers. A SIF that supports multiple taxpayers might currently be used for just one.

Static methods

fromXml()

public static function fromXml(UXML $xml): self
Imports a ComputerSystem instance from a <sum1:SistemaInformatico> XML element. Throws josemmo\Verifactu\Exceptions\ImportException if a required element is missing.

Instance methods

export()

public function export(UXML $xml): void
Serialises the ComputerSystem into a <sum1:SistemaInformatico> child element appended to $xml. Called internally by AeatClient when building the SOAP request.

validate()

Inherited from josemmo\Verifactu\Models\Model. Runs Symfony Validator constraints against all properties and throws a josemmo\Verifactu\Exceptions\ValidationException listing every violation if any property is invalid.

Complete example

use josemmo\Verifactu\Models\ComputerSystem;

$system = new ComputerSystem();

$system->vendorName             = 'Acme Software S.L.';
$system->vendorNif              = 'B12345678';  // exactly 9 chars
$system->name                   = 'AcmeBilling';
$system->id                     = 'AB';          // max 2 chars
$system->version                = '4.0.1';
$system->installationNumber     = 'INST-2024-0042';
$system->onlySupportsVerifactu  = true;
$system->supportsMultipleTaxpayers = false;
$system->hasMultipleTaxpayers      = false;

// Validate before use
$system->validate();

// Pass to AeatClient
use josemmo\Verifactu\Models\Records\FiscalIdentifier;
use josemmo\Verifactu\Services\AeatClient;

$taxpayer = new FiscalIdentifier('Empresa Ejemplo S.A.', 'A87654321');
$client   = new AeatClient($system, $taxpayer);

Build docs developers (and LLMs) love