InvoiceTypePdfVariantTreatmentRel
extends BaseEntity
in package
Holds the PDF variant matrix invoice type × tax treatment code.
Composite PK = the invoiceType association (#[ORM\Id] in the Api/Admin descendant, like
InvoiceTypePdfTemplateVariantRel) + scalar taxTreatment. taxTreatment is a code of
TaxTreatmentCode or self::DEFAULT_TREATMENT
(*), the default row for a code without its own row. pdfTemplateVariantId null means
no variant.
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'invoiceTypePdfVariantTreatmentRel'
Table of Contents
Constants
- DEFAULT_TREATMENT : string = '*'
- Matrix row for a treatment code that has no row of its own.
- TREATMENT_ROWS : array<string|int, mixed> = [self::DEFAULT_TREATMENT, 'DOMESTIC', 'NON_PAYE...
- Matrix rows in admin order: default `*` + codes of {@see \App\UI\Api\System\Models\Enums\TaxTreatmentCode} (values copied here because the Admin/Front layer does not import the Api enum; the unit test `tests/Unit/Invoicer/PdfVariantTreatmentMatrixTest.php` guards the match).
Properties
- $invoiceType : object|null
- $invoiceTypeId : int|null
- $pdfTemplateVariantId : int|null
- $taxTreatment : string|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getInvoiceType() : object|null
- getInvoiceTypeId() : int|null
- getPdfTemplateVariantId() : int|null
- getTaxTreatment() : string|null
- setInvoiceType() : static
- setInvoiceTypeId() : static
- setPdfTemplateVariantId() : static
- setTaxTreatment() : static
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Constants
DEFAULT_TREATMENT
Matrix row for a treatment code that has no row of its own.
public
string
DEFAULT_TREATMENT
= '*'
TREATMENT_ROWS
Matrix rows in admin order: default `*` + codes of {@see \App\UI\Api\System\Models\Enums\TaxTreatmentCode} (values copied here because the Admin/Front layer does not import the Api enum; the unit test `tests/Unit/Invoicer/PdfVariantTreatmentMatrixTest.php` guards the match).
public
array<string|int, mixed>
TREATMENT_ROWS
= [self::DEFAULT_TREATMENT, 'DOMESTIC', 'NON_PAYER', 'REVERSE_CHARGE', 'IC_SUPPLY', 'EXPORT', 'OUTSIDE_SCOPE', 'DOMESTIC_REVERSE_CHARGE', 'VOUCHER_ISSUE']
Properties
$invoiceType
protected
object|null
$invoiceType
= null
invoice type (the Api/Admin descendant redeclares the association)
$invoiceTypeId
protected
int|null
$invoiceTypeId
= null
Attributes
- #[Column]
- $name: 'cms_mod_invoicer_invoice_types_invoice_type_id'
- $type: 'integer'
- $insertable: false
- $updatable: false
- $options: ['unsigned' => true]
$pdfTemplateVariantId
protected
int|null
$pdfTemplateVariantId
= null
Attributes
- #[Column]
- $name: 'cms_system_pdf_template_variants_pdf_template_variant_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$taxTreatment
protected
string|null
$taxTreatment
= null
Attributes
- #[Column]
- $name: 'tax_treatment'
- $type: 'string'
- $length: 24
- #[Id]
- #[Identity]
Methods
__construct()
public
__construct([string|null $taxTreatment = null ][, int|null $invoiceTypeId = null ][, mixed $invoiceType = null ][, int|null $pdfTemplateVariantId = null ]) : mixed
Parameters
- $taxTreatment : string|null = null
- $invoiceTypeId : int|null = null
- $invoiceType : mixed = null
- $pdfTemplateVariantId : int|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getInvoiceType()
public
getInvoiceType() : object|null
Return values
object|nullgetInvoiceTypeId()
public
getInvoiceTypeId() : int|null
Return values
int|nullgetPdfTemplateVariantId()
public
getPdfTemplateVariantId() : int|null
Return values
int|nullgetTaxTreatment()
public
getTaxTreatment() : string|null
Return values
string|nullsetInvoiceType()
public
setInvoiceType(object|null $invoiceType) : static
Parameters
- $invoiceType : object|null
Return values
staticsetInvoiceTypeId()
public
setInvoiceTypeId(int|null $invoiceTypeId) : static
Parameters
- $invoiceTypeId : int|null
Return values
staticsetPdfTemplateVariantId()
public
setPdfTemplateVariantId(int|null $pdfTemplateVariantId) : static
Parameters
- $pdfTemplateVariantId : int|null
Return values
staticsetTaxTreatment()
public
setTaxTreatment(string|null $taxTreatment) : static
Parameters
- $taxTreatment : string|null
Return values
staticgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>