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
$pdfVariantTreatmentRels
protected
Collection<int, InvoiceTypePdfVariantTreatmentRel>
$pdfVariantTreatmentRels
Methods
getPdfVariantTreatmentRel()
Returns the matrix row for exactly the given code (including `*`), without fallback.
public
getPdfVariantTreatmentRel(string $taxTreatment) : InvoiceTypePdfVariantTreatmentRel|null
Parameters
- $taxTreatment : string
Return values
InvoiceTypePdfVariantTreatmentRel|nullgetPdfVariantTreatmentRels()
public
getPdfVariantTreatmentRels() : Collection<int, InvoiceTypePdfVariantTreatmentRel>
Return values
Collection<int, InvoiceTypePdfVariantTreatmentRel>invoiceTypePdfVariantTreatmentRelCollectionInit()
public
invoiceTypePdfVariantTreatmentRelCollectionInit() : void
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|nullsetPdfVariantTreatmentRels()
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>