CoolCMS API

InvoiceTypePdfVariantTreatmentRelCollectionTrait

Matrix of PDF variants by invoice type and VAT treatment code.

Items are the Api/Admin descendants of InvoiceTypePdfVariantTreatmentRel.

Table of Contents

Properties

$pdfVariantTreatmentRels  : Collection<int, InvoiceTypePdfVariantTreatmentRel>

Methods

getPdfVariantTreatmentRel()  : InvoiceTypePdfVariantTreatmentRel|null
Returns the matrix row for exactly the given code (including `*`), without fallback.
getPdfVariantTreatmentRels()  : Collection<int, InvoiceTypePdfVariantTreatmentRel>
invoiceTypePdfVariantTreatmentRelCollectionInit()  : void
resolvePdfVariantIdForTreatment()  : int|null
Returns the PDF variant id for a treatment code: the exact-match row with a variant, else the default row `*`.
setPdfVariantTreatmentRels()  : static
The setter accepts `Collection`, not only `ArrayCollection`; the keep branch of the Api `SaveTrait` copies a managed `PersistentCollection`.

Properties

Methods

resolvePdfVariantIdForTreatment()

Returns the PDF variant id for a treatment code: the exact-match row with a variant, else the default row `*`.

public resolvePdfVariantIdForTreatment(string $taxTreatment) : int|null

A code row without a variant (null) means "follow *". A null result means even the default row has no variant, so the caller logs it and no PDF is produced.

Parameters
$taxTreatment : string
Return values
int|null

setPdfVariantTreatmentRels()

The setter accepts `Collection`, not only `ArrayCollection`; the keep branch of the Api `SaveTrait` copies a managed `PersistentCollection`.

public setPdfVariantTreatmentRels(Collection<int, InvoiceTypePdfVariantTreatmentRel>|array<string|int, InvoiceTypePdfVariantTreatmentRel> $rels) : static
Parameters
$rels : Collection<int, InvoiceTypePdfVariantTreatmentRel>|array<string|int, InvoiceTypePdfVariantTreatmentRel>
Return values
static
On this page

Search results