xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Entity Reference/Invoice Line — entity reference
REFERENCE · Last reviewed

Invoice Line — entity reference

One billed item on an Invoice, and the level at which price, discount and tax are actually resolved. Its money chain is entirely metadata-calculated: BaseAmount is Quantity times UnitPrice2 when that is non-zero else UnitPrice; NetDiscount and NetSchemeDiscount collapse the percentage/amount discount pairs; Amount is BaseAmount less those discounts; GrossAmount is Amount plus TaxAmount. Tax1 through Tax6 are generic component slots filled from the line's tax group, not fixed tax types.

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountCalculated (calculated)A denormalised copy of the parent invoice's customer, calculated as the invoice's AccountId converted to text. Note it is stored as a string rather than a key, so it is not a usable foreign key or lookup — join through the parent invoice instead.
AllocatedQuantityAllocated QuantityDecimal
AmountAmountCalculated (calculated)The net line value before tax, metadata-calculated. When post-tax discounting applies it is simply BaseAmount, because the discount is instead removed later in GrossAmount; otherwise it is BaseAmount less NetDiscount and NetSchemeDiscount. This is the amount rolled into the header TotalLineAmount and the value that becomes the line's ledger leg.
ApplyPostTaxDiscountApply Post Tax DiscountBooleanSwitches where discount is taken. It is copied from the owning company's Account setting when the line's taxes are computed, not chosen per line. When on, discounts are excluded from Amount and instead subtracted in GrossAmount, and the discount rates are applied to BaseAmount plus tax rather than to BaseAmount alone.
AssessableAmountAssessable AmountCalculated (calculated)
AssetIdAssetLookup → Asset
BarcodeBarcodeText
BaseAmountBase AmountCalculated (calculated)Metadata-calculated as Quantity times UnitPrice2 when that override is non-zero, otherwise Quantity times UnitPrice. It is the gross-of-discount, pre-tax starting point for every discount and tax formula on the line.
BenefitIndexBenefit IndexNumber
BillingFrequencyBilling FrequencyText
BillingTypeBilling TypeText
BranchIdBranchText
CancelledQuantityCancelled QuantityDecimal
ChargeTypeCharge TypeTextValues: One Time.
ClaimLineIdClaim LineLookup → ClaimLine
ContractDiscountContract DiscountPercent
ContractDiscountAmountContract Discount AmountCurrency
ConversionRatioConversion RatioDecimal
ConversionRatio1Conversion Ratio 1Decimal
CostPriceCost PriceCurrencyDead: no code path anywhere populates it. An earlier invoice-time cost-of-goods-sold block summed this field and therefore always computed zero; it was removed deliberately, and cost of goods sold is now recognised at goods issue from engine cost instead. Do not use this field for margin.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DeliveredQuantityDelivered QuantityDecimal
DeliveryOrderLineIdDelivery Order LineLookup → DeliveryOrderLine
DeliveryQuantityDelivery QuantityDecimalA rolling total of the quantity delivered against this line, maintained as the sum of the related DeliveryOrderLine quantities rather than entered by hand. It is the subtrahend behind PendingDeliveryQuantity. It is distinct from DeliveredQuantity, which is derived from inventory fulfilment allocation instead.
DiscountDiscountPercentA discount rate expressed as a multiplier, not a percentage out of a hundred: the formulas compute BaseAmount times this value, so 0.10 is ten percent. It is ignored whenever DiscountAmount is positive, since an explicit amount always wins over the rate.
Discount2Cash DiscountPercent
DiscountAmountDiscount AmountCurrencyIt is one of three pairs (with Discount2/DiscountAmount2 and ContractDiscount/ContractDiscountAmount) that add up into NetDiscount.
DiscountAmount2Cash Discount AmountCurrency
DiscountGroupRuleIdDiscount Group RuleLookup → DiscountGroupRule
EligibleReturnQuantityEligible Return QuantityCalculated (calculated)Metadata-calculated as Quantity minus ReturnedQuantity — how much of the line can still be taken back on a credit note. Cancellation is accounted for separately in the metadata formulas rather than being netted here in code.
ExternalIdExternal IDText
FieldSalesIdField SalesLookup → FieldSales
FreeQuantityFreeQuantityDecimalNot an independently entered figure: it is the line's own Quantity when the line was generated by the promotional-scheme engine, and zero otherwise. It exists so free-goods lines can be reported without inspecting the scheme linkage, and it is both a stored column and a calculated fallback.
GeneralLedgerIdGeneral LedgerLookup → GeneralLedger
GLAccountIdGL AccountLookup → GLAccount
GLAmountGL AmountCalculated (calculated)Metadata-calculated as a copy of Amount, and it is the field posting actually reads for the line's ledger leg. A line whose amount is zero contributes no leg at all, while its tax slots are still posted independently.
GLPostingTypeGL Posting TypeText
GrossAmountGross AmountCalculated (calculated)Metadata-calculated as Amount plus TaxAmount, less the discounts again when the line is flagged for post-tax discounting (which is where those discounts are actually taken, since Amount left them in). It is the tax-inclusive line value and is what the header TotalAmount and TotalLineGrossAmount both roll up.
HsnSacCodeHSN/SAC CodeText
IdIdGuidYes
InventoryFulfilmentAllocationLineIdInventory Fulfillment Allocation LineLookup → InventoryFulfilmentAllocationLine
InventoryLedgerIdInventory LedgerLookup → InventoryLedger
InvLineNameInvLineName (For E-invoice)TextA system-generated line document name in the form INVL-ddMMyyyy followed by the last three digits of the sequence, reformatted from the name the document-naming service produced. It is stamped on insert and not maintained afterwards.
InvoiceDiscountInvoice DiscountCalculated (calculated)A read-through of the header invoice's Discount rate, held as a calculated field so line-level reporting can see the header discount that was pushed down. It is informational and is not itself one of the discount pairs that feed NetDiscount.
InvoiceIdSale InvoiceLookup → Invoice
IsClaimedClaimedBoolean
IsGLPostedGL PostedBoolean
IsGLPostingApprovedGL Posting ApprovedBoolean
IsILPostedIL PostedBoolean
IsILPostingApprovedIL Posting ApprovedBoolean
IsPriceBundledPrice BundledBoolean
IsSchemeGeneratedScheme GeneratedBoolean
ItemAliasIdItem AliasLookup → ItemAlias
ItemAlternateIdAlternate ItemLookup → ItemAlternate
ItemComponentIdItem ComponentLookup → ItemComponent
ItemIdItemLookup → Item
ItemLotIdItem LotLookup → ItemLot
ItemLotTypeIdItem Lot TypeLookup → ItemLotType
ItemNameItem NameText
ItemServiceContractIdService ContractLookup → ItemServiceContract
LimitExpiryDaysLimit Expiry DaysNumber
LineNumberLine NumberText
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberText
NetDiscountNet DiscountCalculated (calculated)The collapsed ordinary discount on the line: for each of the three pairs — Discount/DiscountAmount, Discount2/DiscountAmount2 and ContractDiscount/ContractDiscountAmount — an explicit positive amount wins, otherwise the rate is applied to BaseAmount, or to BaseAmount plus tax when post-tax discounting is on. Scheme discount is excluded and handled by NetSchemeDiscount.
NetSchemeDiscountNet Scheme DiscountCalculated (calculated)The promotional-scheme discount, resolved the same way as NetDiscount: SchemeDiscountAmount wins when positive, otherwise the SchemeDiscount rate is applied to BaseAmount, or to BaseAmount plus tax under post-tax discounting. It is kept separate from ordinary discount so scheme cost can be reported on its own.
OrderLineIdOrder LineLookup → OrderLine
OriginalAssetIdOriginal AssetLookup → Asset
OriginalItemIdOriginal ItemLookup → Item
OwnerIdOwnerLookup → UserAccountYes
PackageInvoiceLineIdPackage Invoice LineLookup → InvoiceLine
PackageOrderLineIdPackage Order LineLookup → OrderLine
PartnerAccountIdPartner AccountCalculated (calculated)A denormalised copy of the parent invoice's owning company, calculated as the invoice's PartnerAccountId converted to text. Like AccountId on this entity it is a string, not a key, so it cannot be used as a relation and exists only to make line-level queries filterable by company.
PendingDeliveryQuantityPending Delivery QuantityCalculated (calculated)Metadata-calculated as Quantity minus DeliveryQuantity — what is still undelivered on this line. The delivery action only picks up lines where this is above zero, and validation refuses the action when no line has anything pending.
PendingShipmentQuantityPending Shipment QuantityCalculated (calculated)
PickedQuantityPicked QuantityDecimal
PriceAsOnDatePrice As On DateDate
PriceListIdPrice ListLookup → PriceList
PriceListRuleIdPrice List RuleLookup → PriceListRule
QuantityQuantityDecimal
RecordTypeIdRecord TypeGuid, hidden
RequestedQuantityRequested QuantityDecimal
ReturnedQuantityReturned QuantityDecimal
RNAExternalIdRNA External IDText
RNASaleInvoiceExternalIdRNA Sale Invoice External IDText
SchemeBenefitIdScheme BenefitLookup → SchemeBenefit
SchemeDiscountScheme DiscountPercent
SchemeDiscountAmountScheme Discount AmountCurrency
SchemeLineIdScheme SlabLookup → SchemeLine
SchemeRewardPointsScheme Reward PointsLargeNumber
ServiceOrderLineIdService Order LineLookup → ServiceOrderLine
ShipmentQuantityShipment QuantityDecimal
SkipSchemeSkip SchemeBoolean
SKUIdSKULookup → SKU
SoftCommittedQuantitySoft Committed QuantityCalculated (calculated)Metadata-calculated: it equals the line quantity when the originating order line or service order line has already reached the inventory ledger, and zero otherwise. It flags stock notionally committed by this line rather than holding an independently maintained reservation.
StorageLocationIdStorage LocationLookup → StorageLocation
SubscriptionIdSubscriptionLookup → Subscription
SubscriptionUsageIdSubscription UsageLookup → SubscriptionUsage
SubscriptionUsageSummaryIdSubscription Usage SummaryLookup → SubscriptionUsageSummary
Tax1Tax 1CurrencyThe first of six generic tax-component slots, not a fixed tax type. Which component lands here is decided by the posting-field name configured on the Tax master in the line's tax group, so slot 1 might be CGST on one tenant and IGST on another. Every slot is cleared and recomputed whenever the line's taxes are recalculated.
Tax1NameTax Name 1Text
Tax1RateTax Rate 1Currency
Tax1TypeTax Type 1TextA copy of the tax type from the Tax master that filled slot 1, stamped when the line's taxes were computed. Posting uses it to pick the tax account for the leg (an account whose subtype names this component wins over the generic tax account), and a slot with an empty type is skipped entirely at posting time even if its amount is non-zero.
Tax2Tax 2Currency
Tax2NameTax Name 2Text
Tax2RateTax Rate 2Currency
Tax2TypeTax Type 2Text
Tax3Tax 3Currency
Tax3NameTax Name 3Text
Tax3RateTax Rate 3Currency
Tax3TypeTax Type 3Text
Tax4Tax 4Currency
Tax4NameTax Name 4Text
Tax4RateTax Rate 4Currency
Tax4TypeTax Type 4Text
Tax5Tax 5Currency
Tax5NameTax Name 5Text
Tax5RateTax Rate 5Currency
Tax5TypeTax Type 5Text
Tax6Tax 6Currency
Tax6NameTax Name 6Text
Tax6RateTax Rate 6Currency
Tax6TypeTax Type 6Text
TaxAmountTax AmountCurrencyThe total of every tax component that landed in the six tax slots on this line, written by the tax service as the sum of the line's tax-group components. Each component is computed on the discounted line value, not on BaseAmount, so changing a discount changes tax. It is the value the header TotalLineTaxAmount rolls up.
TaxGroupIdTax GroupLookup → TaxGroup
TdsSectionIdTDS SectionLookup → TdsSectionTags the line with a withholding section for tax collected at source. When present, posting the invoice raises a collection entry (debiting the receivable and crediting the collection liability) that grows the customer's balance; unlike the GST analytics capture this is a ledger entry, so a failure here rolls the whole invoice posting back.
UIPropsUI PropsText
UnitCostUnit CostCurrencyThe cost side of the line, copied from the inventory fulfilment allocation line when the invoice is built from allocated stock, so it reflects the lot or layer cost actually drawn. It does not participate in any price, discount or tax formula and is not what the cost-of-goods-sold journal uses.
UnitPriceUnit PriceCurrency
UnitPrice2Unit Price (Alt)CurrencyAn alternate price copied from the price-list rule's second price, and it takes precedence: BaseAmount uses it whenever it is non-zero and only falls back to UnitPrice otherwise.
UOMUOMText
UOM1UOM1Text
UOMQuantityUOM QuantityDecimal
UOMQuantity1UOM Quantity 1Decimal
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDelete the selected records.
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditInlineEditInLine
EditInListEditEditEdit
NewNewNewNew
NewInLineQuick AddNewInlineNew In Line

Validations

ValidationApplies toError messageNotes
Quantity Rule ValidationQuantity, ErrorQuantity should be in Positive.Quantity should be in Positive.
Returned Quantity ValidationReturnedQuantity, ErrorReturned Quantity can not be greater than QuantityReturned Quantity can not be greater than Quantity
Unit Price Rule ValidationUnitPrice, ErrorUnit price can not be NegativeUnit price can not be Negative

Lookup filters

FilterLookup fieldNotes
Lot For SKUItemLotId
Lot Type for ItemItemLotTypeId
SKU For ItemSKUId