PreparedInvoice
in package
Read onlyYes
FinalYes
Calculated and validated invoice data plus the decisions a render run would take (format, profile, country pack, locale), without rendering anything. The XML of every format (also the one "pdf" embeds with b2cEmbedXml) is generated for the validation only.
Used by the Managed layer to freeze an invoice before its documents are rendered; the validation always runs, whatever the validation mode.
Table of Contents
Properties
- $buyerCountry : CountryPack|null
- $country : CountryPack
- $data : InvoiceData
- $formats : array<string|int, mixed>
- $locale : string
- $validation : ValidationResult
Methods
- __construct() : mixed
- format() : string
- profile() : Profile|null
Properties
$buyerCountry
public
CountryPack|null
$buyerCountry
$country
public
CountryPack
$country
$data
public
InvoiceData
$data
$formats
public
array<string|int, mixed>
$formats
$locale
public
string
$locale
$validation
public
ValidationResult
$validation
Methods
__construct()
public
__construct(InvoiceData $data, array<string, Profile|null> $formats, CountryPack $country, CountryPack|null $buyerCountry, string $locale, ValidationResult $validation) : mixed
Parameters
- $data : InvoiceData
- $formats : array<string, Profile|null>
-
format key => profile (null for formats that write or embed no XML)
- $country : CountryPack
- $buyerCountry : CountryPack|null
- $locale : string
- $validation : ValidationResult
format()
public
format() : string
Return values
stringprofile()
public
profile() : Profile|null