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/Credit Note Line — entity reference
REFERENCE · Last reviewed

Credit Note Line — entity reference

One item or charge line of a CreditNote, and like its parent it carries three flavours driven by the parent's TransactionType: a financial line (GL repost on approval only), a SaleReturn line (item/price/tax setup, inventory posting, and return-quantity write-backs to the source InvoiceLine, DeliveryOrderLine and OrderLine), and a BillReturn line (same setup plus write-backs to Bill, PurchaseOrder and GoodsReceipt lines). CreditNoteLineHandler owns those write-backs and recomputes them as a SUM over the lines, so edits and deletes stay correct. Which amount column the ledger reads depends on the parent: the financial CreditNote posting purpose reads GLAmount, while the Return and BillReturn purposes read Amount.

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountLookup → Account
AmountAmountCurrencyThe line's net value, and the amount the ledger reads for the two return purposes: a SaleReturn note posts its revenue/AR reversal legs from this column and a BillReturn note posts its GR-IR leg from it. It also rolls up into the parent's calculated Amount. A financial credit note posts from GLAmount instead.
ApplyPostTaxDiscountApply Post Tax DiscountBooleanYesSwitches the line's discounts from pre-tax to post-tax. When set, every discount rate on the line (trade, cash, contract and scheme) is applied to BaseAmount PLUS TaxAmount rather than to BaseAmount alone, and GrossAmount then subtracts those discounts explicitly. It therefore changes the discount value, not just its presentation.
AssetIdAssetLookup → Asset
BaseAmountBase AmountCalculated (calculated)Calculated as Quantity times the effective unit price — UnitPrice2 when it is positive, otherwise UnitPrice. It is the value before any discount and before tax, and it is the base every discount percentage on the line is applied to.
BillIdBillLookup → Bill
BillLineIdBill LineLookup → BillLineThe supplier bill line being returned, on a purchase-return (parent TransactionType "BillReturn") line. Purchase returns write quantities back to Bill, PurchaseOrder and GoodsReceipt lines the way sale returns write back to Invoice/DeliveryOrder/Order lines.
BranchIdBranchLookup
ChassisNumberChassis NumberText
ClaimableQuantityClaimable QuantityCalculated (calculated)Calculated: the line's Quantity when ReturnType is "Damaged", "Shortage" or "Excess", and zero otherwise — the quantity that can be claimed from the supplier. "Expired" is deliberately excluded. Paired with IsClaimed, which records that the claim was raised.
ClaimLineIdClaim LineLookup → ClaimLine
ContractDiscountContract DiscountPercent
ContractDiscountAmountContract Discount AmountCurrency
ConversionRatioConversion RatioNumber
ConversionRatio1Conversion Ratio 1Number
CostCostNumber
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
CreditNoteIdCredit NoteLookup → CreditNote
DamagedQuantityDamaged QuantityCalculated (calculated)Calculated, not entered: it is the line's whole Quantity when ReturnType is "Damaged" and zero otherwise. So it does not split a line into good and damaged portions — the whole line is one condition, and a mixed return needs separate lines.
DeliveryOrderLineIdDelivery Order LineLookup → DeliveryOrderLineThe delivery-order line the returned goods went out on; the third sale-return write-back target, recomputed as a SUM over the credit-note lines referencing it.
DeliveryQuantityDelivery QuantityNumber
DescriptionDescriptionText
DiscountDiscountPercent
Discount2Cash DiscountPercent
DiscountAmountDiscount AmountNumber
DiscountAmount2Cash Discount AmountCurrency
DocumentNumberDocument NumberNumberYes
EngineNumberEngine NumberText
ExcessQuantityExcess QuantityCalculated (calculated)Calculated from ReturnType: the line's Quantity NEGATED when ReturnType is "Excess", zero otherwise — so like ShortageQuantity it is normally a negative number, not a positive over-receipt.
ExpiredQuantityExpired QuantityCalculated (calculated)Calculated, not entered: the line's whole Quantity when ReturnType is "Expired", zero otherwise — the expiry counterpart of DamagedQuantity.
ExternalIdExternalText, unique
GeneralLedgerIdGeneral LedgerLookup → GeneralLedger
GLAccountIdGL AccountLookup → GLAccountAn explicit GL account for this line's income/expense leg. When set it wins over PostingDefinition and account-type resolution, which is how a specific charge is directed to its own account rather than the document's default income account.
GLAmountGL AmountCalculated (calculated)Calculated as a copy of Amount, and the column the financial (non-return) CreditNote posting purpose reads for this line's income leg. On sale-return and purchase-return notes the posting engine reads Amount directly instead, so the two are equal by construction but only one of them is the documented input for a given purpose.
GoodsReceiptIdGoods ReceiptLookup → GoodsReceipt
GoodsReceiptLineIdGoods Receipt LineLookup → GoodsReceiptLine
GrossAmountGross AmountCalculated (calculated)Calculated as Amount plus TaxAmount, less the scheme and net discounts when ApplyPostTaxDiscount is set (they are already netted out of Amount otherwise). It is the tax-inclusive line total, the figure the parent's TotalAmount is meant to sum — though that formula names a stale child collection, so sum this column directly.
IdRecordGuidYes
InventoryLedgerIdInventory LedgerLookup → InventoryLedgerSet when the line has been posted to the inventory ledger, and used as the not-yet-posted marker: the PerformInventoryPosting action posts only lines where this is null, and refuses the invoke outright when no such lines remain.
InvoiceIdInvoiceLookup → Invoice
InvoiceLineIdInvoice LineLookup → InvoiceLineThe invoice line being returned or credited. It is the key the sale-return write-back uses: when lines are inserted, updated or deleted, the handler recomputes the returned quantity on this InvoiceLine as a SUM over the credit-note lines pointing at it.
IsApprovedApprovedBooleanYes
IsClaimedClaimedBoolean
IsGLPostedIs GL PostedBooleanYes
IsGLPostingApprovedIs GL Posting ApprovedBooleanYes
IsILPostedIL PostedBooleanYes
IsILPostingApprovedIL Posting ApprovedBooleanYes
IsSchemeGeneratedScheme GeneratedBoolean
ItemIdItemLookup → Item
ItemLotIdItem LotLookup → ItemLot
ItemLotTypeIdItem Lot TypeLookup → ItemLotType
LineNumberLine NumberText
ModifiedByIdModified ByLookup → UserAccountYes
NameNameTextYes
NetDiscountNet DiscountCalculated (calculated)Calculated: the sum of the three discount slots — trade (Discount/DiscountAmount), cash (Discount2/DiscountAmount2) and contract (ContractDiscount/ContractDiscountAmount). Each slot resolves the same way: an explicit positive Amount wins outright, otherwise the rate is applied to BaseAmount, or to BaseAmount plus TaxAmount when ApplyPostTaxDiscount is set. This is the discount figure to report; the individual Discount columns are inputs. Scheme discount is tracked separately in NetSchemeDiscount.
NetSchemeDiscountNet Scheme DiscountCalculated (calculated)Calculated scheme/promotion discount on the line, kept separate from NetDiscount: an explicit SchemeDiscountAmount wins, otherwise the SchemeDiscount rate is applied to BaseAmount, or to BaseAmount plus TaxAmount when ApplyPostTaxDiscount is set. This is the column the parent's scheme-discount total is meant to sum.
OrderLineIdSale Order LineLookup → OrderLine
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountCalculated
PendingDeliveryQuantityPending Delivery QuantityCalculated (calculated)Calculated as Quantity minus DeliveryQuantity: what is still to be shipped back to the vendor on a purchase return. The delivery-release actions consider only lines with a positive value here, and SelectiveDeliveryOrder falls back to this quantity when the caller supplies no explicit RequestedQuantity.
PriceAsOnDatePrice As On DateDate
PriceListIdPrice ListLookup → PriceList
PriceListRuleIdPrice List RuleLookup → PriceListRule
PurchaseOrderIdPurchase OrderLookup → PurchaseOrder
PurchaseOrderLineIdPurchase Order LineLookup → PurchaseOrderLine
QuantityQuantityNumber
RecordTypeIdRecord TypeGuid, hidden
RequestedQuantityRequested QuantityDecimalA virtual (not persisted) quantity used to drive the SelectiveDeliveryOrder action: the caller passes a per-line requested quantity in the action payload and the handler applies it, defaulting to PendingDeliveryQuantity when the value is zero. Do not expect it to hold a value when reading a stored line.
ReturnTypeReturn TypePickListClassifies why the line is coming back, and it is a driver rather than a label: DamagedQuantity, ExpiredQuantity, ShortageQuantity, ExcessQuantity and ClaimableQuantity are all calculated from it. The values those formulas recognise are "Damaged", "Expired", "Shortage" and "Excess"; anything else (including blank) leaves every one of those quantities at zero, which is the usual case for an ordinary return of good stock. Because the whole line Quantity is attributed to one type, a mixed return needs one line per condition.
SchemeBenefitIdScheme BenefitLookup → SchemeBenefit
SchemeDiscountScheme DiscountPercent
SchemeDiscountAmountScheme Discount AmountNumber
SchemeLineIdSchemeLineLookup → SchemeLine
SchemeRewardPointsScheme Reward PointsNumber
ServiceOrderLineIdWork Orde LineLookup → ServiceOrderLine
ShortageQuantityShortage QuantityCalculated (calculated)Calculated from ReturnType: the line's Quantity NEGATED when ReturnType is "Shortage", zero otherwise. The sign is deliberate — a shortage is stock never received, so it moves the opposite way to a return of goods — and it means this column is normally negative, not positive.
SKUIdSKULookup → SKU
StorageLocationIdStorage LocationLookup → StorageLocation
Tax1Tax 1CurrencyTax amount in component slot 1. The six generic Tax{i}/Tax{i}Name/Tax{i}Rate/Tax{i}Type slots exist because the posting engine iterates them unconditionally; which real tax sits in slot 1 depends on the tax group applied, so always read Tax1Type rather than assuming a component.
Tax1NameTax Name 1Text
Tax1RateTax Rate 1Currency
Tax1TypeTax Type 1TextThe tax component type string for slot 1 (CGST, SGST, IGST, cess and so on). The posting engine loops the six Tax{i} slots and resolves each tax GL account BY this type string, so a component whose type is missing here does not post and the journal comes out short by that tax.
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 AmountCurrencyTotal tax on the line — the sum of the six component slots. This is the figure to use for a line's tax; the parent's Total* tax columns are calculated over a stale child-collection name and are unreliable.
TaxGroupIdTax GroupLookup → TaxGroup
UIPropsUI PropsText
UnitCostUnit CostCurrency
UnitCost2Unit CostCurrency
UnitPriceUnit PriceNumber
UnitPrice2Unit Price 2Currency
UOMUOMText
UOM1UOM 1Text
UOMQuantityUOM QuantityNumber
UOMQuantity1UOM Quantity1Number
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete
EditEditEditEdit
EditInLineEditEditInlineEdit
EditListRowEditEditEditListRow
NewNewNewNew
NewInLineNewNewInlineNew

Lookup filters

FilterLookup fieldNotes
Invoice Line FilterInvoiceLineId