Quittio 0.3 API

CorrectionPolicy
in package

Read onlyYes
FinalYes

Default handling of cancellations and corrections in a country, and the titles of these documents. Quittio::cancellation() takes the cancellation strategy and the titles "cancellation" and "cancellation_self_billed"; the title "self_billed" is the title of self-billed invoices in PDF and HTML (InvoiceTitle::policyTitle()); the Managed layer takes the correction strategy and the title "correction".

Table of Contents

Constants

CANCELLATION_CREDIT_NOTE  : string = 'credit_note'
CANCELLATION_NEGATIVE_INVOICE  : string = 'negative_invoice'
CORRECTION_CANCEL_AND_REISSUE  : string = 'cancel_and_reissue'
CORRECTION_CORRECTED_INVOICE  : string = 'corrected_invoice'

Properties

$cancellationStrategy  : string
$correctionStrategy  : string
$titles  : array<string|int, mixed>

Methods

__construct()  : mixed
cancellationTitle()  : string|null
Title of a cancellation; self-billed originals use "cancellation_self_billed" if the country defines it, otherwise "cancellation".
title()  : string|null

Constants

CANCELLATION_CREDIT_NOTE

public string CANCELLATION_CREDIT_NOTE = 'credit_note'

CANCELLATION_NEGATIVE_INVOICE

public string CANCELLATION_NEGATIVE_INVOICE = 'negative_invoice'

CORRECTION_CANCEL_AND_REISSUE

public string CORRECTION_CANCEL_AND_REISSUE = 'cancel_and_reissue'

CORRECTION_CORRECTED_INVOICE

public string CORRECTION_CORRECTED_INVOICE = 'corrected_invoice'

Properties

$cancellationStrategy

public string $cancellationStrategy = self::CANCELLATION_CREDIT_NOTE

$correctionStrategy

public string $correctionStrategy = self::CORRECTION_CANCEL_AND_REISSUE

Methods

__construct()

public __construct([string $cancellationStrategy = self::CANCELLATION_CREDIT_NOTE ][, string $correctionStrategy = self::CORRECTION_CANCEL_AND_REISSUE ][, array<string, array<string, string>> $titles = [] ]) : mixed
Parameters
$cancellationStrategy : string = self::CANCELLATION_CREDIT_NOTE
$correctionStrategy : string = self::CORRECTION_CANCEL_AND_REISSUE
$titles : array<string, array<string, string>> = []

document kind (cancellation, cancellation_self_billed, correction, self_billed) => [locale => title]; a missing locale falls back to "en"

cancellationTitle()

Title of a cancellation; self-billed originals use "cancellation_self_billed" if the country defines it, otherwise "cancellation".

public cancellationTitle(bool $selfBilled[, string $locale = 'en' ]) : string|null
Parameters
$selfBilled : bool
$locale : string = 'en'
Return values
string|null

title()

public title(string $kind[, string $locale = 'en' ]) : string|null
Parameters
$kind : string
$locale : string = 'en'
Return values
string|null
On this page

Search results