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.
BreakdownDetails (josemmo\Verifactu\Models\Records\BreakdownDetails) represents one row in the Desglose (tax breakdown) section of a RegistrationRecord. Each invoice can carry multiple BreakdownDetails instances — one for each combination of tax type, regime, and operation classification that applies. The class enforces strict cross-field validation rules that mirror the AEAT schema requirements.
Properties
The indirect tax that applies to this breakdown entry.
- Must not be blank
- Corresponds to XML field
Impuesto
| Enum case | Raw value | Description |
|---|---|---|
TaxType::IVA | 01 | Impuesto sobre el Valor Añadido |
TaxType::IPSI | 02 | Impuesto sobre la Producción, los Servicios y la Importación (Ceuta & Melilla) |
TaxType::IGIC | 03 | Impuesto General Indirecto Canario |
TaxType::Other | 05 | Other indirect tax |
The special regime key or additional tax significance code.
- Must not be blank
- Corresponds to XML field
ClaveRegimen
Classification of the operation: whether it is subject to tax, non-subject, or exempt.
- Must not be blank
- Corresponds to XML field
CalificacionOperacion(for subject/non-subject) orOperacionExenta(for exempt)
| Enum case | Raw value | Category | Description |
|---|---|---|---|
Subject | S1 | Subject | Subject and not exempt — no passive subject |
PassiveSubject | S2 | Subject | Subject and not exempt — with passive subject |
NonSubject | N1 | Non-subject | Not subject — Articles 7, 14, and others |
NonSubjectByLocation | N2 | Non-subject | Not subject by location rules |
ExemptByArticle20 | E1 | Exempt | Exempt under Article 20 |
ExemptByArticle21 | E2 | Exempt | Exempt under Article 21 |
ExemptByArticle22 | E3 | Exempt | Exempt under Article 22 |
ExemptByArticles23And24 | E4 | Exempt | Exempt under Articles 23 and 24 |
ExemptByArticle25 | E5 | Exempt | Exempt under Article 25 |
ExemptByOther | E6 | Exempt | Exempt — other reason |
The taxable base or non-subject amount as a formatted decimal string.
- Must not be blank
- Matches regex
/^-?\d{1,12}\.\d{2}$/— up to 12 integer digits and exactly 2 decimal places; negative values are allowed - Corresponds to XML field
BaseImponibleOimporteNoSujeto
The tax rate percentage applied to
baseAmount.- Matches regex
/^\d{1,3}\.\d{2}$/— positive only, up to 3 integer digits and exactly 2 decimal places - Required when
operationTypeisSubjectorPassiveSubject - Forbidden for all other operation types
- Corresponds to XML field
TipoImpositivo
The tax amount resulting from applying
taxRate to baseAmount.- Matches regex
/^-?\d{1,12}\.\d{2}$/ - Required when
operationTypeisSubjectorPassiveSubject - Forbidden for all other operation types
- Corresponds to XML field
CuotaRepercutida
The equivalence surcharge (recargo de equivalencia) rate percentage.
- Matches regex
/^\d{1,3}\.\d{2}$/ - Required when
regimeTypeisRegimeType::C18andoperationTypeis subject - Forbidden for any other regime type or non-subject/exempt operations
- Corresponds to XML field
TipoRecargoEquivalencia
The equivalence surcharge amount resulting from applying
surchargeRate to baseAmount.- Matches regex
/^-?\d{1,12}\.\d{2}$/ - Required when
regimeTypeisRegimeType::C18andoperationTypeis subject - Forbidden for any other regime type or non-subject/exempt operations
- Corresponds to XML field
CuotaRecargoEquivalencia
Validation rules
validate() (inherited from josemmo\Verifactu\Models\Model) runs both per-property and cross-field checks.
Methods
fromXml()
BreakdownDetails from a <sum1:DetalleDesglose> XML element. Throws josemmo\Verifactu\Exceptions\ImportException on missing or invalid fields.
export()
<sum1:DetalleDesglose> child element appended to $xml. Called internally by RegistrationRecord.
validate()
Inherited fromjosemmo\Verifactu\Models\Model. Runs all property and cross-field constraints and throws josemmo\Verifactu\Exceptions\ValidationException on any violation.