Blesta Source Documentation

Ubl extends InvoiceFormat

UBL XML Invoice Format

Table of Contents

Properties

$config
$content
$currency_format
$invoice

Methods

__construct() Constructor - loads language for this format
download() Outputs the Invoice format to stdout, sending the appropriate headers to force a download
fetch() Returns the invoice format content in the desired format
generateFormat() Generates the UBL XML format
getAuthors() Returns the name and URL for the authors of this invoice format
getDescription() Returns the description of this invoice format
getFileExtension() Returns the file extension for this format
getMimeType() Returns the MIME type for this format
getName() Returns the name of this invoice format
getVersion() Returns the version of this invoice format
setCurrency() Sets the CurrencyFormat object for formatting currency values
setInvoiceId() Sets the invoice ID and loads the invoice data
stream() Outputs the Invoice format to stdout, sending the appropriate headers to render the document inline
formatCurrency() Formats a currency value for UBL XML (plain number without currency symbol)
Properties

$config

protected array<string|int, mixed> $config = []

The config data for this format

Methods

__construct()

Constructor - loads language for this format

public __construct() : mixed

download()

Outputs the Invoice format to stdout, sending the appropriate headers to force a download

public download([string $name = null ]) : mixed
Parameters
$name : string = null

The name of the document minus the extension (optional)

fetch()

Returns the invoice format content in the desired format

public fetch() : string
Return values
string

The document content

generateFormat()

Generates the UBL XML format

public generateFormat() : mixed

getAuthors()

Returns the name and URL for the authors of this invoice format

public getAuthors() : array<string|int, mixed>
Return values
array<string|int, mixed>

The name and URL of the authors of this format

getDescription()

Returns the description of this invoice format

public getDescription() : string
Return values
string

The name of this format

getFileExtension()

Returns the file extension for this format

public getFileExtension() : string
Return values
string

The file extension

getMimeType()

Returns the MIME type for this format

public getMimeType() : string
Return values
string

The MIME type

getName()

Returns the name of this invoice format

public getName() : string
Return values
string

The name of this format

getVersion()

Returns the version of this invoice format

public getVersion() : string
Return values
string

The current version of this format

setCurrency()

Sets the CurrencyFormat object for formatting currency values

public setCurrency(CurrencyFormat $currency_format) : mixed
Parameters
$currency_format : CurrencyFormat

The CurrencyFormat object

setInvoiceId()

Sets the invoice ID and loads the invoice data

public setInvoiceId(int $invoice_id) : mixed
Parameters
$invoice_id : int

The invoice ID

stream()

Outputs the Invoice format to stdout, sending the appropriate headers to render the document inline

public stream([string $name = null ]) : mixed
Parameters
$name : string = null

The name of the document minus the extension (optional)

formatCurrency()

Formats a currency value for UBL XML (plain number without currency symbol)

private formatCurrency(float $amount) : string
Parameters
$amount : float

The amount to format

Return values
string

The formatted amount

Tags
subpackage

components.invoice_formats.ubl

copyright

Copyright (c) 2025, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results