Table of Contents

Table "Sales Invoice Line"

ID 113
Namespace: Microsoft.Sales.History

Stores line-level details for posted sales invoices including items, quantities, prices, and amounts.

Properties

Name Value
Caption Sales Invoice Line
DrillDownPageID Page Microsoft.Sales.History."Posted Sales Invoice Lines"
LookupPageID Page Microsoft.Sales.History."Posted Sales Invoice Lines"
Permissions TableData "Item Ledger Entry" = r, TableData "Value Entry" = r
DataClassification CustomerContent

Fields

Name Type Description
"Sell-to Customer No." Code[20]

Specifies the customer number who received the shipped items.

"Document No." Code[20]

Specifies the document number of the posted invoice this line belongs to.

"Line No." Integer

Specifies the line number within the document.

Type Enum Microsoft.Sales.Document."Sales Line Type"

Specifies the type of entity on the line such as Item, G/L Account, or Resource.

"No." Code[20]

Specifies the number of the item, G/L account, resource, or other entity on the line.

"Location Code" Code[10]

Specifies the warehouse location from which items were shipped.

"Posting Group" Code[20]

Specifies the posting group that determines G/L accounts for inventory or fixed assets.

"Shipment Date" Date

Specifies the date when the items were shipped.

Description Text[100]

Specifies a description of the item or service on the line.

"Description 2" Text[50]

Specifies additional description text for the line.

"Unit of Measure" Text[50]

Specifies the name of the unit of measure for the line.

Quantity Decimal

Specifies the quantity of items or resources invoiced on the line.

"Unit Price" Decimal

Specifies the price per unit of the item or resource.

"Unit Cost (LCY)" Decimal

Specifies the unit cost in local currency.

"VAT %" Decimal

Specifies the VAT percentage applied to the line.

"Line Discount %" Decimal

Specifies the line discount percentage applied.

"Line Discount Amount" Decimal

Specifies the line discount amount in document currency.

Amount Decimal

Specifies the line amount excluding VAT.

"Amount Including VAT" Decimal

Specifies the line amount including VAT.

"Allow Invoice Disc." Boolean

Indicates whether the line can be included in invoice discount calculation.

"Gross Weight" Decimal

Specifies the gross weight of the items on the line.

"Net Weight" Decimal

Specifies the net weight of the items on the line.

"Units per Parcel" Decimal

Specifies the number of units per parcel for shipping.

"Unit Volume" Decimal

Specifies the volume of a single unit of the item.

"Appl.-to Item Entry" Integer

Specifies the item ledger entry number to apply this line to.

"Shortcut Dimension 1 Code" Code[20]

Specifies the first global dimension code for analysis.

"Shortcut Dimension 2 Code" Code[20]

Specifies the second global dimension code for analysis.

"Customer Price Group" Code[10]

Specifies the customer price group used for pricing.

"Job No." Code[20]

Specifies the project number associated with the line.

"Work Type Code" Code[10]

Specifies the work type code for resource pricing.

"Shipment No." Code[20]

Specifies the shipment document number from which this line was invoiced.

"Shipment Line No." Integer

Specifies the line number from the shipment document.

"Order No." Code[20]

Specifies the sales order number from which this invoice was created.

"Order Line No." Integer

Specifies the line number from the original sales order.

"Bill-to Customer No." Code[20]

Specifies the customer number to whom the invoice was sent.

"Inv. Discount Amount" Decimal

Specifies the invoice discount amount allocated to this line.

"Drop Shipment" Boolean

Indicates whether the items were shipped directly from the vendor to the customer.

"Gen. Bus. Posting Group" Code[20]

Specifies the general business posting group for determining G/L accounts.

"Gen. Prod. Posting Group" Code[20]

Specifies the general product posting group for determining G/L accounts.

"VAT Calculation Type" Enum Microsoft.Foundation.Enums."Tax Calculation Type"

Specifies the method used to calculate VAT for this line.

"Transaction Type" Code[10]

Specifies the transaction type for Intrastat reporting.

"Transport Method" Code[10]

Specifies the transport method for Intrastat reporting.

"Attached to Line No." Integer

Specifies the line number this line is attached to for extended text or comments.

"Exit Point" Code[10]

Specifies the exit point for Intrastat reporting.

"Area" Code[10]

Specifies the area code for Intrastat reporting.

"Transaction Specification" Code[10]

Specifies additional transaction details for Intrastat reporting.

"Tax Category" Code[10]

Specifies the tax category code for tax reporting.

"Tax Area Code" Code[20]

Specifies the tax area code for sales tax calculation.

"Tax Liable" Boolean

Indicates whether the sale is liable for tax.

"Tax Group Code" Code[20]

Specifies the tax group code for sales tax calculation.

"VAT Clause Code" Code[20]

Specifies the VAT clause code for additional VAT information on documents.

"VAT Bus. Posting Group" Code[20]

Specifies the VAT business posting group for VAT calculation.

"VAT Prod. Posting Group" Code[20]

Specifies the VAT product posting group for VAT calculation.

"Blanket Order No." Code[20]

Specifies the blanket order number this line originated from.

"Blanket Order Line No." Integer

Specifies the line number from the blanket order.

"VAT Base Amount" Decimal

Specifies the amount used as the base for VAT calculation.

"Unit Cost" Decimal

Specifies the unit cost in document currency.

"System-Created Entry" Boolean

Indicates whether the line was created automatically by the system.

"Line Amount" Decimal

Specifies the net amount for the line before invoice discount.

"VAT Difference" Decimal

Specifies the difference between calculated and posted VAT amounts.

"VAT Identifier" Code[20]

Specifies the VAT identifier for grouping VAT entries.

"IC Partner Ref. Type" Enum Microsoft.Intercompany.Partner."IC Partner Reference Type"

Specifies the type of intercompany partner reference.

"IC Partner Reference" Code[20]

Specifies the intercompany partner reference code.

"Prepayment Line" Boolean

Indicates whether this is a prepayment line.

"IC Partner Code" Code[20]

Specifies the intercompany partner code for intercompany transactions.

"Posting Date" Date

Specifies the date when the line was posted.

"IC Item Reference No." Code[50]

Specifies the item reference number for intercompany transactions.

"Pmt. Discount Amount" Decimal

Specifies the payment discount amount for the line.

"Line Discount Calculation" Option

Specifies how the line discount was calculated.

"Dimension Set ID" Integer

Specifies the unique identifier for the dimension set applied to this line.

"Job Task No." Code[20]

Specifies the project task number for project-related invoices.

"Job Contract Entry No." Integer

Specifies the project contract entry number for billing.

"Deferral Code" Code[10]

Specifies the deferral template code for revenue deferral.

"Allocation Account No." Code[20]

Specifies the allocation account number for distributing amounts.

"Alloc. Sales Line SystemId" Guid

Stores the system ID of the allocation sales line.

"Variant Code" Code[10]

Specifies the item variant code for items with variants.

"Bin Code" Code[20]

Specifies the warehouse bin code where items were stored.

"Qty. per Unit of Measure" Decimal

Specifies the quantity per unit of measure for conversion.

"Unit of Measure Code" Code[10]

Specifies the unit of measure code for the line.

"Quantity (Base)" Decimal

Specifies the quantity in the base unit of measure.

"FA Posting Date" Date

Specifies the posting date for fixed asset transactions.

"Depreciation Book Code" Code[10]

Specifies the depreciation book for fixed asset posting.

"Depr. until FA Posting Date" Boolean

Indicates whether to calculate depreciation until the FA posting date.

"Duplicate in Depreciation Book" Code[10]

Specifies a depreciation book to duplicate the entry to.

"Use Duplication List" Boolean

Indicates whether to use the duplication list for fixed asset posting.

"Responsibility Center" Code[10]

Specifies the responsibility center for the line.

"Item Category Code" Code[20]

Specifies the item category code for categorization.

Nonstock Boolean

Indicates whether the item is a catalog item.

"Purchasing Code" Code[10]

Specifies the purchasing code for special order handling.

"Item Reference No." Code[50]

Specifies the item reference number used by the customer.

"Item Reference Unit of Measure" Code[10]

Specifies the unit of measure associated with the item reference.

"Item Reference Type" Enum Microsoft.Inventory.Item.Catalog."Item Reference Type"

Specifies the type of item reference such as customer or vendor.

"Item Reference Type No." Code[30]

Specifies the number associated with the item reference type.

"Appl.-from Item Entry" Integer

Specifies the item ledger entry to apply from for cost tracking.

"Return Reason Code" Code[10]

Specifies the reason code if items were returned.

"Price Calculation Method" Enum Microsoft.Pricing.Calculation."Price Calculation Method"

Specifies the method used for price calculation.

"Allow Line Disc." Boolean

Indicates whether line discounts are allowed for this line.

"Customer Disc. Group" Code[20]

Specifies the customer discount group for line discount calculation.

"Price description" Text[80]

Contains a formatted description of the price calculation.

"Sell-to Customer Name" Text[100]

Contains the name of the sell-to customer.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemCreatedByUserName Text[50]
SystemCreatedByFullName Text[80]
SystemModifiedByUserName Text[50]
SystemModifiedByFullName Text[80]
SystemRowVersion BigInteger

Methods

GetCurrencyCode

Retrieves the currency code from the sales invoice header.

procedure GetCurrencyCode(): Code[10]

Returns

Type Description
Code[10]

The currency code for this invoice line.

ShowDimensions

Opens the dimension set entries page for this invoice line.

procedure ShowDimensions()

ShowItemTrackingLines

Opens the Item Tracking Lines page showing the tracking for this invoice line.

procedure ShowItemTrackingLines()

CalcVATAmountLines

Calculates VAT amount lines for the invoice based on the invoice lines.

procedure CalcVATAmountLines(SalesInvHeader: Record "Sales Invoice Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary)

Parameters

Name Type Description
SalesInvHeader Table Microsoft.Sales.History."Sales Invoice Header"

The invoice header to calculate VAT for.

TempVATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

Returns the calculated VAT amount lines.

GetLineAmountExclVAT

Calculates the line amount excluding VAT.

procedure GetLineAmountExclVAT(): Decimal

Returns

Type Description
Decimal

The line amount excluding VAT.

GetLineAmountInclVAT

Calculates the line amount including VAT.

procedure GetLineAmountInclVAT(): Decimal

Returns

Type Description
Decimal

The line amount including VAT.

GetInvoiceHeader

Retrieves the sales invoice header record for this line.

procedure GetInvoiceHeader(): Record "Sales Invoice Header"

Returns

Type Description
Table Microsoft.Sales.History."Sales Invoice Header"

The sales invoice header record.

GetCaptionClass

Retrieves the caption class for a specified field to handle VAT-inclusive pricing display.

procedure GetCaptionClass(FieldNumber: Integer): Text[80]

Parameters

Name Type Description
FieldNumber Integer

The field number to get the caption class for.

Returns

Type Description
Text[80]

The caption class string for the field.

RowID1

Generates a unique row identifier for item tracking purposes.

procedure RowID1(): Text[250]

Returns

Type Description
Text[250]

The row identifier string.

GetSalesShptLines

Retrieves the sales shipment lines associated with this invoice line.

procedure GetSalesShptLines(var TempSalesShipmentLine: Record "Sales Shipment Line" temporary)

Parameters

Name Type Description
TempSalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"

Returns the temporary sales shipment lines.

CalcShippedSaleNotReturned

Calculates the shipped sales quantity that has not been returned.

procedure CalcShippedSaleNotReturned(var ShippedQtyNotReturned: Decimal; var RevUnitCostLCY: Decimal; ExactCostReverse: Boolean)

Parameters

Name Type Description
ShippedQtyNotReturned Decimal

Returns the quantity shipped but not returned.

RevUnitCostLCY Decimal

Returns the reverse unit cost in local currency.

ExactCostReverse Boolean

Specifies whether to use exact cost reversing.

GetItemLedgEntries

Retrieves item ledger entries associated with this invoice line.

procedure GetItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; SetQuantity: Boolean)

Parameters

Name Type Description
TempItemLedgEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

Returns the temporary item ledger entries.

SetQuantity Boolean

Indicates whether to set quantities from value entries.

FilterPstdDocLineValueEntries

Applies filters to value entries to retrieve entries for this posted document line.

procedure FilterPstdDocLineValueEntries(var ValueEntry: Record "Value Entry")

Parameters

Name Type Description
ValueEntry Table Microsoft.Inventory.Ledger."Value Entry"

The value entry record to apply filters to.

ShowItemShipmentLines

Opens a page displaying the shipment lines for this invoice line.

procedure ShowItemShipmentLines()

ShowLineComments

Opens a page displaying the comments for this invoice line.

procedure ShowLineComments()

ShowShortcutDimCode

Retrieves the shortcut dimension codes for this invoice line.

procedure ShowShortcutDimCode(var ShortcutDimCode: array[8] of Code[20])

Parameters

Name Type Description
ShortcutDimCode array[8] of Code[20]

Returns the array of shortcut dimension codes.

InitFromSalesLine

Initializes the sales invoice line from a sales line when posting an invoice.

procedure InitFromSalesLine(SalesInvHeader: Record "Sales Invoice Header"; SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesInvHeader Table Microsoft.Sales.History."Sales Invoice Header"

The sales invoice header to link to.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line to copy data from.

ShowDeferrals

Opens a page displaying the deferral schedule for this invoice line.

procedure ShowDeferrals()

UpdatePriceDescription

Updates the price description field based on current line values.

procedure UpdatePriceDescription()

FormatType

Formats the line type for display, handling blank types specially.

procedure FormatType(): Text

Returns

Type Description
Text

Returns the formatted type text.

GetDocumentType

Retrieves the document type integer for this posted invoice line.

procedure GetDocumentType(): Integer

Returns

Type Description
Integer

Returns the document type value as an integer.

HasTypeToFillMandatoryFields

Determines whether the line has a type that requires mandatory fields to be filled.

procedure HasTypeToFillMandatoryFields(): Boolean

Returns

Type Description
Boolean

Returns true if the line type is not blank.

IsCancellationSupported

Checks if the line type supports invoice cancellation.

procedure IsCancellationSupported(): Boolean

Returns

Type Description
Boolean

Returns true if the line type can be cancelled.

SetSecurityFilterOnRespCenter

Applies a security filter based on the user's responsibility center setup.

procedure SetSecurityFilterOnRespCenter()

GetDateForCalculations

Retrieves the date to use for calculations, defaulting to work date if posting date is not set.

procedure GetDateForCalculations(): Date

Returns

Type Description
Date

The calculation date.

Events

OnAfterCalcQty

Raised after calculating the quantity for the sales invoice line.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcQty(var SalesInvoiceLine: Record "Sales Invoice Line"; QtyBase: Decimal; var Result: Decimal)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

QtyBase Decimal

The base quantity used in the calculation.

Result Decimal

The calculated result quantity.

OnAfterInitFromSalesLine

Raised after initializing the sales invoice line from a sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitFromSalesLine(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesInvLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line being initialized.

SalesInvHeader Table Microsoft.Sales.History."Sales Invoice Header"

The sales invoice header record.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The source sales line record.

OnBeforeGetItemLedgEntries

Raised before getting item ledger entries for the sales invoice line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetItemLedgEntries(var SalesInvLine: Record "Sales Invoice Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; SetQuantity: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesInvLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

TempItemLedgEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

The temporary item ledger entry buffer.

SetQuantity Boolean

Specifies whether to set the quantity.

IsHandled Boolean

Set to true to skip the default logic.

OnBeforeCalcVATAmountLines

Raised before calculating VAT amount lines for the sales invoice.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcVATAmountLines(SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean)

Parameters

Name Type Description
SalesInvLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

SalesInvHeader Table Microsoft.Sales.History."Sales Invoice Header"

The sales invoice header record.

TempVATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The temporary VAT amount line buffer.

IsHandled Boolean

Set to true to skip the default logic.

OnGetItemLedgEntriesOnBeforeTempItemLedgEntryInsert

Raised before inserting the temporary item ledger entry during GetItemLedgEntries.

[IntegrationEvent(False,False)]
local procedure OnGetItemLedgEntriesOnBeforeTempItemLedgEntryInsert(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; ValueEntry: Record "Value Entry"; SetQuantity: Boolean)

Parameters

Name Type Description
TempItemLedgerEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

The temporary item ledger entry being inserted.

ValueEntry Table Microsoft.Inventory.Ledger."Value Entry"

The source value entry record.

SetQuantity Boolean

Specifies whether to set the quantity.

OnBeforeShowDeferrals

Raised before showing deferrals for the sales invoice line.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowDeferrals(SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

IsHandled Boolean

Set to true to skip the default logic.

OnBeforeSetSecurityFilterOnRespCenter

Raised before setting the security filter on responsibility center for the sales invoice line.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSecurityFilterOnRespCenter(var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

IsHandled Boolean

Set to true to skip the default logic.

OnAfterGetVATPct

Raised after getting the VAT percentage for the sales invoice line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetVATPct(var SalesInvoiceLine: Record "Sales Invoice Line"; var VATPct: Decimal)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

VATPct Decimal

The VAT percentage value.

OnAfterCalcShippedSaleNotReturned

Raised after calculating the shipped sales quantity not returned.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcShippedSaleNotReturned(var SalesInvoiceLine: Record "Sales Invoice Line"; var ShippedQtyNotReturned: Decimal; var RevUnitCostLCY: Decimal; ExactCostReverse: Boolean)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line record.

ShippedQtyNotReturned Decimal

The shipped quantity that has not been returned.

RevUnitCostLCY Decimal

The reverse unit cost in local currency.

ExactCostReverse Boolean

Specifies whether exact cost reversing is enabled.

See also