\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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
getStandardIdentifier()
¶
Get item standard identifier
public getStandardIdentifier(): \Einvoicing\Identifier|null
Returns
\Einvoicing\Identifier
|null
— Item standard identifier
setStandardIdentifier()
¶
Set item standard identifier
public setStandardIdentifier($identifier: \Einvoicing\Identifier|null): \Einvoicing\InvoiceLine
Parameters
$identifier
:\Einvoicing\Identifier
|null
— Item standard identifier
Returns
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
getQuantity()
¶
Get quantity
public getQuantity(): float
Returns
float
— Quantity
setQuantity()
¶
Set quantity
public setQuantity($quantity: float): \Einvoicing\InvoiceLine
Parameters
$quantity
:float
— Quantity
Returns
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\InvoiceLine
— Invoice line instance
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
\Einvoicing\AllowanceOrCharge
[] — Array of allowances
addAllowance()
¶
Add allowance
public addAllowance($allowance: \Einvoicing\AllowanceOrCharge): \Einvoicing\InvoiceLine
Parameters
$allowance
:\Einvoicing\AllowanceOrCharge
— Allowance instance
Returns
\Einvoicing\InvoiceLine
— This instance
removeAllowance()
¶
Remove allowance
public removeAllowance($index: int): \Einvoicing\InvoiceLine
Parameters
$index
:int
— Allowance index
Returns
\Einvoicing\InvoiceLine
— This instance
Throws
\OutOfBoundsException
if allowance index is out of bounds
clearAllowances()
¶
Clear all allowances
public clearAllowances(): \Einvoicing\InvoiceLine
Returns
\Einvoicing\InvoiceLine
— This instance
getCharges()
¶
Get charges
public getCharges(): \Einvoicing\AllowanceOrCharge[]
Returns
\Einvoicing\AllowanceOrCharge
[] — Array of charges
addCharge()
¶
Add charge
public addCharge($charge: \Einvoicing\AllowanceOrCharge): \Einvoicing\InvoiceLine
Parameters
$charge
:\Einvoicing\AllowanceOrCharge
— Charge instance
Returns
\Einvoicing\InvoiceLine
— This instance
removeCharge()
¶
Remove charge
public removeCharge($index: int): \Einvoicing\InvoiceLine
Parameters
$index
:int
— Charge index
Returns
\Einvoicing\InvoiceLine
— This instance
Throws
\OutOfBoundsException
if charge index is out of bounds
clearCharges()
¶
Clear all charges
public clearCharges(): \Einvoicing\InvoiceLine
Returns
\Einvoicing\InvoiceLine
— This instance
getAttributes()
¶
Get attributes
public getAttributes(): \Einvoicing\Attribute[]
Returns
\Einvoicing\Attribute
[] — Array of attributes
addAttribute()
¶
Add attribute
public addAttribute($attribute: \Einvoicing\Attribute): \Einvoicing\InvoiceLine
Parameters
$attribute
:\Einvoicing\Attribute
— Attribute instance
Returns
\Einvoicing\InvoiceLine
— This instance
removeAttribute()
¶
Remove attribute
public removeAttribute($index: int): \Einvoicing\InvoiceLine
Parameters
$index
:int
— Attribute index
Returns
\Einvoicing\InvoiceLine
— This instance
Throws
\OutOfBoundsException
if attribute index is out of bounds
clearAttributes()
¶
Clear all attributes
public clearAttributes(): \Einvoicing\InvoiceLine
Returns
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance
getClassificationIdentifiers()
¶
Get classification identifiers
public getClassificationIdentifiers(): \Einvoicing\Identifier[]
Returns
\Einvoicing\Identifier
[] — Array of identifiers
addClassificationIdentifier()
¶
Add classification identifier
public addClassificationIdentifier($identifier: \Einvoicing\Identifier): \Einvoicing\InvoiceLine
Parameters
$identifier
:\Einvoicing\Identifier
— Identifier instance
Returns
\Einvoicing\InvoiceLine
— This instance
removeClassificationIdentifier()
¶
Remove classification identifier
public removeClassificationIdentifier($index: int): \Einvoicing\InvoiceLine
Parameters
$index
:int
— Identifier index
Returns
\Einvoicing\InvoiceLine
— This instance
Throws
\OutOfBoundsException
if identifier index is out of bounds
clearClassificationIdentifiers()
¶
Clear all classification identifiers
public clearClassificationIdentifiers(): \Einvoicing\InvoiceLine
Returns
\Einvoicing\InvoiceLine
— This instance
getPeriodStartDate()
¶
Get period start date
public getPeriodStartDate(): \DateTime|null
Returns
\DateTime
|null
— Period start date
setPeriodStartDate()
¶
Set period start date
public setPeriodStartDate($periodStartDate: \DateTime|null): \Einvoicing\InvoiceLine
Parameters
$periodStartDate
:\DateTime
|null
— Period start date
Returns
\Einvoicing\InvoiceLine
— This instance
getPeriodEndDate()
¶
Get period end date
public getPeriodEndDate(): \DateTime|null
Returns
\DateTime
|null
— Period end date
setPeriodEndDate()
¶
Set period end date
public setPeriodEndDate($periodEndDate: \DateTime|null): \Einvoicing\InvoiceLine
Parameters
$periodEndDate
:\DateTime
|null
— Period end date
Returns
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance
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
\Einvoicing\InvoiceLine
— This instance