Table of Contents

Crm.Invoicing.InvoiceOrderLines Entity

Namespace: Crm.Invoicing

Detail records (lines) of Invoice Orders. Entity: Crm_Invoice_Order_Lines

Default Visualization

Default Display Text Format:
{LineNo}. {InvoiceOrder.DocumentNo} {InvoiceOrder.DocumentType.TypeName:T}
Default Search Members:
InvoiceOrder.DocumentNo
Category: Definitions
Show in UI: ShownByDefault

Track Changes

Min level: 0 - Do not track changes
Max level: 4 - Track object attribute and blob changes

Aggregate

An aggregate is a cluster of domain objects that can be treated as a single unit.

Aggregate Parent:
Crm.Invoicing.InvoiceOrders
Aggregate Root:
Crm.Invoicing.InvoiceOrders

Attributes

Name Type Description
BusinessReason InvoicingBusinessReason Business reason for invoicing of this product or service. S=Shipment, P=Payment. Required Default("S")
CurrentBalanceBase Quantity The current balance of the product in the selected store and enterprise company. If lot, serial number or product variant are specified the quantity is calculated accordingly.
DisplayText string Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.
Id guid
LineAmount Amount (14, 2) Amount for the line in the currency of the parent document. Usually equals Quantity * Unit_Price. When Quantity = 0, Unit Price is undefined and this contains the total line amount. Currency: InvoiceOrder.DocumentCurrency Required Default(0)
LineCustomDiscountPercent decimal (7, 6) User-defined discount for the line. Required Default(0)
LineNo int32 Line number, unique within the InvoiceOrder. Usually is increasing number like 10, 20, 30, ... when initially entering the InvoiceOrder (in order to allow insertions with adjustment documents). Required
LineStandardDiscount
Percent
decimal (7, 6) Standard discount for the line. This is automatically computed according to discount conditions. Required Default(0)
ObjectVersion int32 The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking.
ProductDescription MultilanguageString (254) The description of Product. Initially copied from the name of the Product or from the generating document. Required
Quantity Quantity (12, 3) The quantity of the product to invoice. Unit: QuantityUnit Required Default(1) Filter(ge;le)
QuantityBase Quantity (12, 3) The equivalent of Quantity in the base measurement unit of the Product. Unit: Product.BaseMeasurementCategory.BaseUnit Required
StandardQuantityBase Quantity (12, 3) The theoretical quantity in base measurement unit according to the current measurement dimensions for the product. Used to measure the execution. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly Introduced in version 18.2
UnitPrice Amount (14, 5) Unit selling price in the unit of measure, specified in Quantity Unit. Currency: InvoiceOrder.DocumentCurrency Required Default(0)

References

Name Type Description
Document InvoiceOrders The to which this InvoiceOrderLine belongs. Required Filter(multi eq)
InvoiceOrder InvoiceOrders The to which this InvoiceOrderLine belongs. Required Filter(multi eq) Owner
LineDealType DealTypes (nullable) Deal type to be passed to the invoice line. If deal type in the line is different from deal type in the header another VAT entry is created from the invoice. Filter(multi eq)
LineDiscount LineDiscounts (nullable) The line discount type used to form the Line_Standard_
Discount_Percent. Filter(multi eq)
PaymentTransaction PaymentTransactions (nullable) The payment transaction, which is to be invoiced by this line, when Business Reason = P. Used to reconcile the invoice with the payments in the case of advance payment. Filter(multi eq)
Product Products (nullable) The product, which is ordered for invoicing. Filter(multi eq)
QuantityUnit MeasurementUnits The measurement unit of Quantity. Required Filter(multi eq)
SalesOrder SalesOrders (nullable) When not null specifies the Sales Order that is ordered to be invoiced by this line. Filter(multi eq)
SalesOrderLine SalesOrderLines (nullable) When not null specifies the Sales Order line that is ordered to be invoiced by this line. Filter(multi eq)
SerialNumber SerialNumbers (nullable) Which serial number to receive/issue. null means that serial number is unknown or not applicable. Filter(multi eq)
TransactionLine StoreTransactionLines (nullable) The store transaction line that is to be invoiced by this line, for Business Reason = S. Filter(multi eq)

Attribute Details

BusinessReason

Business reason for invoicing of this product or service. S=Shipment, P=Payment. Required Default("S")

Type: InvoicingBusinessReason
Category: System
Generic enum type for InvoicingBusinessReason properties
Allowed Values (Crm.Invoicing.InvoicingBusinessReason Enum Members)

Value Description
Payment Payment value. Stored as 'P'.
Database Value: 'P'
Model Value: 0
Domain API Value: 'Payment'
Shipment Shipment value. Stored as 'S'.
Database Value: 'S'
Model Value: 1
Domain API Value: 'Shipment'

Supported Filters: NotFilterable
Supports Order By: False
Default Value: Shipment
Show in UI: HiddenByDefault

CurrentBalanceBase

The current balance of the product in the selected store and enterprise company. If lot, serial number or product variant are specified the quantity is calculated accordingly.

Type: Quantity
Category: Calculated Attributes
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault

DisplayText

Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.

Type: string
Category: Calculated Attributes
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault

Id

Type: guid
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Default Value: NewGuid
Show in UI: CannotBeShown

LineAmount

Amount for the line in the currency of the parent document. Usually equals Quantity * Unit_Price. When Quantity = 0, Unit Price is undefined and this contains the total line amount. Currency: InvoiceOrder.DocumentCurrency Required Default(0)

Type: Amount (14, 2)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

Front-End Recalc Expressions:
obj.CalculateLineAmount( obj.Quantity, obj.UnitPrice, Convert( obj.LineCustomDiscountPercent, Nullable1), Convert( obj.LineStandardDiscountPercent, Nullable1), obj.InvoiceOrder.DocumentCurrency)

LineCustomDiscountPercent

User-defined discount for the line. Required Default(0)

Type: decimal (7, 6)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault

LineNo

Line number, unique within the InvoiceOrder. Usually is increasing number like 10, 20, 30, ... when initially entering the InvoiceOrder (in order to allow insertions with adjustment documents). Required

Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: ShownByDefault

Back-End Default Expression:
( obj.InvoiceOrder.Lines.Select( c => c.LineNo).DefaultIfEmpty( 0).Max( ) + 10)

Front-End Recalc Expressions:
( obj.InvoiceOrder.Lines.Select( c => c.LineNo).DefaultIfEmpty( 0).Max( ) + 10)

LineStandardDiscountPercent

Standard discount for the line. This is automatically computed according to discount conditions. Required Default(0)

Type: decimal (7, 6)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
IIF( ( obj.LineDiscount != null), obj.LineDiscount.DiscountPercent, 0)

ObjectVersion

The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking.

Type: int32
Category: Extensible Data Object
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault

ProductDescription

The description of Product. Initially copied from the name of the Product or from the generating document. Required

Type: MultilanguageString (254)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
obj.Product.Name

Quantity

The quantity of the product to invoice. Unit: QuantityUnit Required Default(1) Filter(ge;le)

Type: Quantity (12, 3)
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

QuantityBase

The equivalent of Quantity in the base measurement unit of the Product. Unit: Product.BaseMeasurementCategory.BaseUnit Required

Type: Quantity (12, 3)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.QuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

Front-End Recalc Expressions:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.QuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

StandardQuantityBase

The theoretical quantity in base measurement unit according to the current measurement dimensions for the product. Used to measure the execution. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly Introduced in version 18.2

Type: Quantity (12, 3)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.StandardQuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

Front-End Recalc Expressions:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.StandardQuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

UnitPrice

Unit selling price in the unit of measure, specified in Quantity Unit. Currency: InvoiceOrder.DocumentCurrency Required Default(0)

Type: Amount (14, 5)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

Front-End Recalc Expressions:
obj.CalculateUnitPrice( obj.InvoiceOrder, obj.Product)

Reference Details

Document

The to which this InvoiceOrderLine belongs. Required Filter(multi eq)

Type: InvoiceOrders
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

InvoiceOrder

The to which this InvoiceOrderLine belongs. Required Filter(multi eq) Owner

Type: InvoiceOrders
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Filterable Reference: True
Show in UI: ShownByDefault

LineDealType

Deal type to be passed to the invoice line. If deal type in the line is different from deal type in the header another VAT entry is created from the invoice. Filter(multi eq)

Type: DealTypes (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.InvoiceOrder.DealType

Front-End Recalc Expressions:
obj.InvoiceOrder.DealType

LineDiscount

The line discount type used to form the Line_Standard_Discount_Percent. Filter(multi eq)

Type: LineDiscounts (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
obj.DetermineLineDiscount( Convert( ( obj.InvoiceOrder.DeliveryDate ?? obj.InvoiceOrder.DocumentDate), Nullable1), obj.InvoiceOrder.Customer, obj.Product, obj.Quantity, obj.InvoiceOrder.EnterpriseCompany, obj.InvoiceOrder.EnterpriseCompanyLocation, IIF( ( obj.SalesOrder == null), null, obj.SalesOrder.DistributionChannel), IIF( ( obj.SalesOrder == null), null, obj.SalesOrder.PriceList))`

PaymentTransaction

The payment transaction, which is to be invoiced by this line, when Business Reason = P. Used to reconcile the invoice with the payments in the case of advance payment. Filter(multi eq)

Type: PaymentTransactions (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Product

The product, which is ordered for invoicing. Filter(multi eq)

Type: Products (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

QuantityUnit

The measurement unit of Quantity. Required Filter(multi eq)

Type: MeasurementUnits
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Front-End Recalc Expressions:
obj.Product.MeasurementUnit

SalesOrder

When not null specifies the Sales Order that is ordered to be invoiced by this line. Filter(multi eq)

Type: SalesOrders (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.InvoiceOrder.SalesOrder

Front-End Recalc Expressions:
obj.InvoiceOrder.SalesOrder

SalesOrderLine

When not null specifies the Sales Order line that is ordered to be invoiced by this line. Filter(multi eq)

Type: SalesOrderLines (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

SerialNumber

Which serial number to receive/issue. null means that serial number is unknown or not applicable. Filter(multi eq)

Type: SerialNumbers (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

TransactionLine

The store transaction line that is to be invoiced by this line, for Business Reason = S. Filter(multi eq)

Type: StoreTransactionLines (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

API Methods

Methods that can be invoked in public APIs.

GetAllowedCustomPropertyValues

Gets the allowed values for the specified custom property for this entity object. If supported the result is ordered by property value. Some property value sources do not support ordering - in that case the result is not ordered.
Return Type: Collection Of CustomPropertyValue
Declaring Type: EntityObject
Domain API Request: GET

Parameters

  • customPropertyCode
    The code of the custom property
    Type: string

  • search
    The search text - searches by value or description. Can contain wildcard character %.
    Type: string
    Optional: True
    Default Value: null

  • exactMatch
    If true the search text should be equal to the property value
    Type: boolean
    Optional: True
    Default Value: False

  • orderByDescription
    If true the result is ordered by Description instead of Value. Note that ordering is not always possible.
    Type: boolean
    Optional: True
    Default Value: False

  • top
    The top clause - default is 10
    Type: int32
    Optional: True
    Default Value: 10

  • skip
    The skip clause - default is 0
    Type: int32
    Optional: True
    Default Value: 0

CreateNotification

Create a notification immediately in a separate transaction, and send a real-time event to the user.
Return Type: void
Declaring Type: EntityObject
Domain API Request: POST

Parameters

  • user
    The user.
    Type: Users

  • notificationClass
    The notification class.
    Type: string

  • subject
    The notification subject.
    Type: string

CreateCopy

Duplicates the object and its child objects belonging to the same aggregate. The duplicated objects are not saved to the data source but remain in the same transaction as the original object.
Return Type: EntityObject
Declaring Type: EntityObject
Domain API Request: POST

Business Rules

None

Front-End Business Rules

API

Domain API Query: https://demodb.my.erp.net/api/domain/odata/Crm_Invoicing_InvoiceOrderLines?$top=10

Domain API Query Builder: https://demodb.my.erp.net/api/domain/querybuilder#Crm_Invoicing_InvoiceOrderLines?$top=10