InvoiceLine
in package
uses
Immutable
Read onlyYes
FinalYes
Invoice line (BG-25).
Table of Contents
Properties
- $allowances : array<string|int, mixed>
- $buyerAccountingReference : string|null
- $charges : array<string|int, mixed>
- $extended : LineExtendedData|null
- $id : string
- $item : Item
- $lineReferences : array<string|int, mixed>
- $netAmount : Money|null
- $note : string|null
- $objectId : Identifier|null
- $orderLineReference : string|null
- $period : Period|null
- $presentation : LinePresentation|null
- $price : Price
- $quantity : BigDecimal
- $subLines : array<string|int, mixed>
- $unit : UnitCode|RawCode
- $vat : LineVat
Methods
- __construct() : mixed
- hasSubLines() : bool
- with() : static
- Returns a copy with the given properties replaced.
- withNetPrice() : self
- Copy with a new net price (BT-146); gross price and discount are dropped.
- withPriceInclVat() : self
- Copy with a new price including VAT (gross price mode). The calculator derives the net price again.
Properties
$allowances
public
array<string|int, mixed>
$allowances
= []
Attributes
- #[Bt]
- 'BG-27'
- #[Cardinality]
- '0..n'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge'
- #[Level]
- ProfileLevel::Basic
- #[ListOf]
- LineAllowance::class
- #[Ubl]
- 'cac:AllowanceCharge'
$buyerAccountingReference
public
string|null
$buyerAccountingReference
= null
Attributes
- #[Bt]
- 'BT-133'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID'
- #[Ubl]
- 'cbc:AccountingCost'
$charges
public
array<string|int, mixed>
$charges
= []
Attributes
- #[Bt]
- 'BG-28'
- #[Cardinality]
- '0..n'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge'
- #[Level]
- ProfileLevel::Basic
- #[ListOf]
- LineCharge::class
- #[Ubl]
- 'cac:AllowanceCharge'
$extended
public
LineExtendedData|null
$extended
= null
Attributes
- #[ExtendedOnly]
$id
public
string
$id
Attributes
- #[Bt]
- 'BT-126'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:AssociatedDocumentLineDocument/ram:LineID'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cbc:ID'
$item
public
Item
$item
Attributes
- #[Bt]
- 'BG-31'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedTradeProduct'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:Item'
$lineReferences
public
array<string|int, mixed>
$lineReferences
= []
Attributes
- #[ExtendedOnly]
- #[ListOf]
- DocumentReference::class
$netAmount
public
Money|null
$netAmount
= null
Attributes
- #[Bt]
- 'BT-131'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount'
- #[Computed]
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cbc:LineExtensionAmount'
$note
public
string|null
$note
= null
Attributes
- #[Bt]
- 'BT-127'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cbc:Note'
$objectId
public
Identifier|null
$objectId
= null
Attributes
- #[Bt]
- 'BT-128'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument[ram:TypeCode="130"]'
- #[Ubl]
- 'cac:DocumentReference[cbc:DocumentTypeCode="130"]/cbc:ID'
$orderLineReference
public
string|null
$orderLineReference
= null
Attributes
- #[Bt]
- 'BT-132'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID'
- #[Ubl]
- 'cac:OrderLineReference/cbc:LineID'
$period
public
Period|null
$period
= null
Attributes
- #[Bt]
- 'BG-26'
- #[Cardinality]
- '0..1'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:InvoicePeriod'
$presentation
public
LinePresentation|null
$presentation
= null
Attributes
- #[PdfOnly]
$price
public
Price
$price
Attributes
- #[Bt]
- 'BG-29'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedLineTradeAgreement'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:Price'
$quantity
public
BigDecimal
$quantity
Attributes
- #[Bt]
- 'BT-129'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedLineTradeDelivery/ram:BilledQuantity'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cbc:InvoicedQuantity | cbc:CreditedQuantity'
$subLines
public
array<string|int, mixed>
$subLines
= []
Attributes
- #[Internal]
- #[ListOf]
- InvoiceLine::class
$unit
public
UnitCode|RawCode
$unit
Attributes
- #[Bt]
- 'BT-130'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cbc:InvoicedQuantity/@unitCode | cbc:CreditedQuantity/@unitCode'
$vat
public
LineVat
$vat
Attributes
- #[Bt]
- 'BG-30'
- #[Cardinality]
- '1'
- #[Cii]
- 'ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax'
- #[Level]
- ProfileLevel::Basic
- #[Ubl]
- 'cac:Item/cac:ClassifiedTaxCategory'
Methods
__construct()
public
__construct(string $id, BigDecimal $quantity, UnitCode|RawCode $unit, Price $price, LineVat $vat, Item $item[, string|null $note = null ][, Identifier|null $objectId = null ][, Money|null $netAmount = null ][, string|null $orderLineReference = null ][, string|null $buyerAccountingReference = null ][, Period|null $period = null ][, array<int, LineAllowance> $allowances = [] ][, array<int, LineCharge> $charges = [] ][, array<int, InvoiceLine> $subLines = [] ][, array<int, DocumentReference> $lineReferences = [] ][, LineExtendedData|null $extended = null ][, LinePresentation|null $presentation = null ]) : mixed
Parameters
- $id : string
- $quantity : BigDecimal
- $unit : UnitCode|RawCode
- $price : Price
- $vat : LineVat
- $item : Item
- $note : string|null = null
- $objectId : Identifier|null = null
- $netAmount : Money|null = null
- $orderLineReference : string|null = null
- $buyerAccountingReference : string|null = null
- $period : Period|null = null
- $allowances : array<int, LineAllowance> = []
- $charges : array<int, LineCharge> = []
- $subLines : array<int, InvoiceLine> = []
- $lineReferences : array<int, DocumentReference> = []
- $extended : LineExtendedData|null = null
- $presentation : LinePresentation|null = null
hasSubLines()
public
hasSubLines() : bool
Return values
boolwith()
Returns a copy with the given properties replaced.
public
with(array<string, mixed> $changes) : static
Parameters
- $changes : array<string, mixed>
Return values
staticwithNetPrice()
Copy with a new net price (BT-146); gross price and discount are dropped.
public
withNetPrice(BigDecimal|int|float|string $price) : self
Parameters
- $price : BigDecimal|int|float|string
Tags
Return values
selfwithPriceInclVat()
Copy with a new price including VAT (gross price mode). The calculator derives the net price again.
public
withPriceInclVat(BigDecimal|int|float|string $price) : self
Parameters
- $price : BigDecimal|int|float|string