Skip to content

\Einvoicing\InvoiceLine

getId()

Get invoice line identifier

public getId(): string|null

Returns

  • string|null — Invoice line identifier

setId()

Set invoice line identifier

public setId($id: string): \Einvoicing\InvoiceLine

Parameters

  • $id: string — Invoice line identifier

Returns


getOrderLineReference()

Get order line reference

public getOrderLineReference(): string|null

Returns

  • string|null — Order line reference

setOrderLineReference()

Set order line reference

public setOrderLineReference($reference: string|null): \Einvoicing\InvoiceLine

Parameters

  • $reference: string|null — Order line reference

Returns


getName()

Get item name

public getName(): string|null

Returns

  • string|null — Item name

setName()

Set item name

public setName($name: string): \Einvoicing\InvoiceLine

Parameters

  • $name: string — Item name

Returns


getDescription()

Get item description

public getDescription(): string|null

Returns

  • string|null — Item description

setDescription()

Set item description

public setDescription($description: string|null): \Einvoicing\InvoiceLine

Parameters

  • $description: string|null — Item description

Returns


getOriginCountry()

Get item origin country

public getOriginCountry(): string|null

Returns

  • string|null — Item origin country code

setOriginCountry()

Set item origin country

public setOriginCountry($originCountry: string|null): \Einvoicing\InvoiceLine

Parameters

  • $originCountry: string|null — Item origin country code

Returns


getNote()

Get invoice line note

public getNote(): string|null

Returns

  • string|null — Invoice line note

setNote()

Set invoice line note

public setNote($note: string|null): \Einvoicing\InvoiceLine

Parameters

  • $note: string|null — Invoice line note

Returns


getStandardIdentifier()

Get item standard identifier

public getStandardIdentifier(): \Einvoicing\Identifier|null

Returns


setStandardIdentifier()

Set item standard identifier

public setStandardIdentifier($identifier: \Einvoicing\Identifier|null): \Einvoicing\InvoiceLine

Parameters

Returns


getBuyerIdentifier()

Get buyer identifier

public getBuyerIdentifier(): string|null

Returns

  • string|null — Buyer identifier

setBuyerIdentifier()

Set buyer identifier

public setBuyerIdentifier($identifier: string|null): \Einvoicing\InvoiceLine

Parameters

  • $identifier: string|null — Buyer identifier

Returns


getSellerIdentifier()

Get seller identifier

public getSellerIdentifier(): string|null

Returns

  • string|null — Seller identifier

setSellerIdentifier()

Set seller identifier

public setSellerIdentifier($identifier: string|null): \Einvoicing\InvoiceLine

Parameters

  • $identifier: string|null — Seller identifier

Returns


getQuantity()

Get quantity

public getQuantity(): float

Returns

  • float — Quantity

setQuantity()

Set quantity

public setQuantity($quantity: float): \Einvoicing\InvoiceLine

Parameters

  • $quantity: float — Quantity

Returns


getUnit()

Get unit code

public getUnit(): string

Returns

  • string — Unit code

setUnit()

Set unit code

public setUnit($unitCode: string): \Einvoicing\InvoiceLine

Parameters

  • $unitCode: string — Unit code

Returns


getPrice()

Get price

public getPrice(): float|null

Returns

  • float|null — Price

setPrice()

Set price

public setPrice($price: float, $baseQuantity: float|null = null): \Einvoicing\InvoiceLine

Parameters

  • $price: float — Price
  • $baseQuantity: float|null — Base quantity

Returns


getBaseQuantity()

Get base quantity

public getBaseQuantity(): float

Returns

  • float — Base quantity

setBaseQuantity()

Set base quantity

public setBaseQuantity($baseQuantity: float): \Einvoicing\InvoiceLine

Parameters

  • $baseQuantity: float — Base quantity

Returns


getNetAmountBeforeAllowancesCharges()

Get total net amount (without VAT) before allowances/charges

public getNetAmountBeforeAllowancesCharges(): float|null

Returns

  • float|null — Net amount before allowances/charges

getAllowancesAmount()

Get allowances total amount

public getAllowancesAmount(): float

Returns

  • float — Allowances total amount

getChargesAmount()

Get charges total amount

public getChargesAmount(): float

Returns

  • float — Charges total amount

getNetAmount()

Get total net amount (without VAT) NOTE: inclusive of line level allowances and charges

public getNetAmount(): float|null

Returns

  • float|null — Net amount

getAllowances()

Get allowances

public getAllowances(): \Einvoicing\AllowanceOrCharge[]

Returns


addAllowance()

Add allowance

public addAllowance($allowance: \Einvoicing\AllowanceOrCharge): \Einvoicing\InvoiceLine

Parameters

Returns


removeAllowance()

Remove allowance

public removeAllowance($index: int): \Einvoicing\InvoiceLine

Parameters

  • $index: int — Allowance index

Returns

Throws


clearAllowances()

Clear all allowances

public clearAllowances(): \Einvoicing\InvoiceLine

Returns


getCharges()

Get charges

public getCharges(): \Einvoicing\AllowanceOrCharge[]

Returns


addCharge()

Add charge

public addCharge($charge: \Einvoicing\AllowanceOrCharge): \Einvoicing\InvoiceLine

Parameters

Returns


removeCharge()

Remove charge

public removeCharge($index: int): \Einvoicing\InvoiceLine

Parameters

  • $index: int — Charge index

Returns

Throws


clearCharges()

Clear all charges

public clearCharges(): \Einvoicing\InvoiceLine

Returns


getAttributes()

Get attributes

public getAttributes(): \Einvoicing\Attribute[]

Returns


addAttribute()

Add attribute

public addAttribute($attribute: \Einvoicing\Attribute): \Einvoicing\InvoiceLine

Parameters

Returns


removeAttribute()

Remove attribute

public removeAttribute($index: int): \Einvoicing\InvoiceLine

Parameters

  • $index: int — Attribute index

Returns

Throws


clearAttributes()

Clear all attributes

public clearAttributes(): \Einvoicing\InvoiceLine

Returns


getAttribute()

Get attribute value

public getAttribute($name: string): string|null

Parameters

  • $name: string — Attribute name

Returns

  • string|null — Value from occurrence with given name or NULL if not found

setAttribute()

Set attribute value

public setAttribute($name: string, $value: string|null): \Einvoicing\InvoiceLine

Parameters

  • $name: string — Attribute name
  • $value: string|null — New attribute value for first found occurrence, NULL to remove

Returns


getBuyerAccountingReference()

Get buyer accounting reference

public getBuyerAccountingReference(): string|null

Returns

  • string|null — Buyer accounting reference

setBuyerAccountingReference()

Set buyer accounting reference

public setBuyerAccountingReference($buyerAccountingReference: string|null): \Einvoicing\InvoiceLine

Parameters

  • $buyerAccountingReference: string|null — Buyer accounting reference

Returns


getClassificationIdentifiers()

Get classification identifiers

public getClassificationIdentifiers(): \Einvoicing\Identifier[]

Returns


addClassificationIdentifier()

Add classification identifier

public addClassificationIdentifier($identifier: \Einvoicing\Identifier): \Einvoicing\InvoiceLine

Parameters

Returns


removeClassificationIdentifier()

Remove classification identifier

public removeClassificationIdentifier($index: int): \Einvoicing\InvoiceLine

Parameters

  • $index: int — Identifier index

Returns

Throws


clearClassificationIdentifiers()

Clear all classification identifiers

public clearClassificationIdentifiers(): \Einvoicing\InvoiceLine

Returns


getPeriodStartDate()

Get period start date

public getPeriodStartDate(): \DateTime|null

Returns


setPeriodStartDate()

Set period start date

public setPeriodStartDate($periodStartDate: \DateTime|null): \Einvoicing\InvoiceLine

Parameters

  • $periodStartDate: \DateTime|null — Period start date

Returns


getPeriodEndDate()

Get period end date

public getPeriodEndDate(): \DateTime|null

Returns


setPeriodEndDate()

Set period end date

public setPeriodEndDate($periodEndDate: \DateTime|null): \Einvoicing\InvoiceLine

Parameters

  • $periodEndDate: \DateTime|null — Period end date

Returns


getVatCategory()

Get VAT category code

public getVatCategory(): string

Returns

  • string — VAT category code

setVatCategory()

Set VAT category code

public setVatCategory($categoryCode: string): \Einvoicing\InvoiceLine

Parameters

  • $categoryCode: string — VAT category code

Returns


getVatRate()

Get VAT rate

public getVatRate(): float|null

Returns

  • float|null — VAT rate as a percentage or NULL when not subject to VAT

setVatRate()

Set VAT rate

public setVatRate($rate: float|null): \Einvoicing\InvoiceLine

Parameters

  • $rate: float|null — VAT rate as a percentage or NULL when not subject to VAT

Returns


getVatExemptionReasonCode()

Get VAT exemption reason code

public getVatExemptionReasonCode(): string|null

Returns

  • string|null — VAT exemption reason code

setVatExemptionReasonCode()

Set VAT exemption reason code

public setVatExemptionReasonCode($reasonCode: string|null): \Einvoicing\InvoiceLine

Parameters

  • $reasonCode: string|null — VAT exemption reason code

Returns


getVatExemptionReason()

Get VAT exemption reason

public getVatExemptionReason(): string|null

Returns

  • string|null — VAT exemption reason expressed as text

setVatExemptionReason()

Set VAT exemption reason

public setVatExemptionReason($reason: string|null): \Einvoicing\InvoiceLine

Parameters

  • $reason: string|null — VAT exemption reason expressed as text

Returns