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 — entity reference
REFERENCE · Last reviewed

Credit Note — entity reference

A credit document that reduces what a party owes, and the merged home of three different documents discriminated by TransactionType: null/empty is a pure financial AR credit note (Dr Sales / Cr AR, party = AccountId); "SaleReturn" is a customer goods return (the mirror of an Invoice, revenue and AR reversal, lines carry items and post to inventory); "BillReturn" is a purchase return to a supplier (Dr AP / Cr GR-IR plus input-tax reversal, party = SupplierAccountId). CreditNoteHandler gates almost all return behaviour on this discriminator, so the same entity behaves as three documents and a query that ignores TransactionType mixes sales and purchase traffic. Children are CreditNoteLine; it can point at the Invoice, DeliveryOrder, GoodsReceipt or PurchaseOrder it reverses, and at the Claim that generated it. Settlement against open invoices is recorded as PaymentAdjustment rows (legacy) or SettlementAllocation against an OpenTransaction (the current open-item engine).

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountLookup → AccountThe customer the note is issued to, and the party the ledger posts against for the financial CreditNote and SaleReturn purposes. A BillReturn credit note does NOT use this field — its party is SupplierAccountId — so party analysis over credit notes must branch on TransactionType.
AdjustedAmountAdjusted AmountCurrencyHow much of the note's value has already been consumed settling other documents. It is maintained by the settlement code (the claim-engine credit application and the payment-adjustment service), not by the user, and OpenAmount is kept as Amount minus this value.
AmountAmountCalculated (calculated)Calculated field: the sum of CreditNoteLine.Amount over the note's lines. It is the note's face value and the base of OpenAmount (OpenAmount = Amount - AdjustedAmount when a settlement is applied), not a user-entered figure.
BranchIdBranchLookup → Branch
ClaimIdClaimLookup → Claim
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
CurrencyCurrencyPickListValues: INR, GBP.
DeliveryOrderIdDelivery OrderLookup → DeliveryOrderThe outbound delivery the returned goods came out on, for sale-return notes; return quantities are written back to its lines. Purchase-return notes instead RELEASE a delivery order for the goods going back to the vendor, via the PerformReleaseDelivery / SelectiveDeliveryOrder actions.
DeliveryOrderLineIdDelivery Order LineLookup → DeliveryOrderLine
DescriptionDescriptionText
DiscountGroupIdDiscount GroupLookup → DiscountGroup
DocumentDateDocument DateDateYesThe note's accounting date — the date every posting purpose for this entity uses to date its journal, so it decides which fiscal period the credit lands in. Defaulted to the current date when a sale-return note is created.
DueDateDue DateDate
ExternalIdExternalText
GeneralLedgerIdGeneral LedgerLookup → GeneralLedgerLegacy pointer to the decommissioned GeneralLedger entity, retained on the row and guarded as a system field. The current ledger links the other way: Journal.SourceEntityName + Journal.SourceRecordId identify the document that produced the journal.
GLAccountIdGL AccountLookup → GLAccountAn explicit header (control) GL account for the note. Where a posting purpose opts into it, this beats PostingDefinition and chart-of-accounts resolution, which is how a charge lands in the same subledger as the document it relates to instead of whichever account resolution by type would pick.
GLAmountGL AmountCalculated (calculated)Calculated as a copy of Amount, and the header-side amount the financial CreditNote posting purpose uses when the note has no lines to post. Note the asymmetry: the CreditNote purpose reads GLAmount on the lines too, while the SaleReturn (Return) and BillReturn purposes read CreditNoteLine.Amount instead.
GoodsReceiptIdGoods ReceiptLookup → GoodsReceipt
IdIdGuidYes
InvoiceIdInvoiceLookup → InvoiceThe customer invoice this note credits or returns against. It is the audit link to the original supply — GST credit/debit-note reporting quotes the original invoice — but it does NOT itself settle the invoice: settlement is a separate PaymentAdjustment or SettlementAllocation row.
IsGLPostedIs GL PostedBooleanYesA legacy posting marker guarded as a system field (a client attempting to change it is rejected). No first-party code sets it on a credit note under the journal-based ledger, so it stays false even on fully posted notes — do not use it to test whether a note has posted. The reliable test is the existence of a Journal whose SourceEntityName is "CreditNote" and SourceRecordId is this row, or the note's OpenTransaction.
IsGLPostingApprovedIs GL Posting ApprovedBooleanYesThe flag that actually triggers ledger posting. When it is true as the note is saved, the handler posts the note through DocumentJournalPostingService under the purpose chosen by TransactionType and captures the GST tax transactions.
IsInJobQueueIn Job QueueBoolean
IsReturnedReturnedBooleanSet true by the handler when PerformReturn is approved on a purchase-return (BillReturn) note; it marks the return as executed. Not maintained on financial or sale-return notes.
ItemIdItemLookup → Item
JobInterfaceQueueIdJob QueueLookup → InterfaceQueue
LineSubTotalLine Sub TotalCalculated
ModifiedByIdModified ByLookup → UserAccount
NameNameTextYes
NotesNotesLongMultiLineText
OpenAmountOpen AmountCalculatedThe unconsumed balance of the credit note — a STORED column recomputed as Amount minus AdjustedAmount whenever a settlement is applied, not a live formula. Zero means the credit is fully consumed; the credit-application pass skips notes with nothing left. For an authoritative party balance prefer the matching OpenTransaction row, which the ledger maintains.
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → AccountThe trading partner (dealer/distributor) the note belongs to, used for branch validation on sale returns and as the key the credit-application pass uses to find that partner's open invoices. Distinct from AccountId (the customer) and SupplierAccountId (the vendor).
PerformGLPostingPerform GL PostingBooleanYes
PerformInventoryPostingPerform Inventory PostingBooleanRequest flag for posting the note's lines to the inventory ledger. The PerformInventoryPosting action is what performs it, and it validates first: if every CreditNoteLine already carries an InventoryLedgerId the invoke fails with "No Credit Note Lines found for Inventory Posting".
PerformReturnPerform ReturnBooleanTwo distinct meanings by TransactionType. On a SaleReturn note it drives the PerformReturn action, which builds return lines from the invoice lines the user picked. On a BillReturn note, setting it true during a save makes the handler flip IsReturned to true and reset this flag back to false — so it behaves as a one-shot trigger, not a state.
PlaceOfSupplyPlace of SupplyPickList
PriceAsOnDatePrice As On DateDate
PriceListIdPrice ListLookup → PriceList
PriceListRuleIdPrice List RuleLookup → PriceListRule
PurchaseOrderIdPurchase OrderLookup → PurchaseOrder
RecordTypeIdRecord TypeGuid, hidden
RemarksRemarksText
ResourceIdExecutiveLookup → Resource
RoundOffRound OffCurrency
SourceOfSupplySource of SupplyPickList
StatusStatusPickList
SupplierAccountIdSupplier AccountLookup → AccountThe vendor a purchase-return (TransactionType "BillReturn") credit note is raised on, and the party its Dr Accounts Payable posting hits. Validated to be an account flagged as a supplier on insert and update. Null on financial and sale-return notes.
SupplierInvoiceAmountSupplier Invoice AmountCurrency
SupplierInvoiceDateSupplier Invoice DateDate
SupplierInvoiceNumberSupplier Invoice NumberTextThe vendor's own document number for the purchase being returned, carried on a BillReturn note for reconciliation against the supplier's books and for GST credit-note reporting on the inward side. Free text supplied by the user, not a link.
TaxSupplyTypeTax Supply TypePickList
TotalAmountTotal AmountCalculated (calculated)A calculated total whose stored formula sums a "ReturnLines" collection — the child navigation of the pre-merge Return document. The merged CreditNote type exposes its children as CreditNoteLines only, so do not rely on this column: sum CreditNoteLine directly (GrossAmount for the gross figure) when the number matters. The same caveat applies to the other Total* columns on this entity.
TotalDiscountAmountTotal Discount AmountCalculated (calculated)Calculated total of line net discount, summing the pre-merge "ReturnLines" collection rather than CreditNoteLines — unreliable; sum CreditNoteLine.NetDiscount directly.
TotalLineAmountTotal Line AmountCalculated (calculated)Calculated total of the line amounts, but its stored formula sums the pre-merge "ReturnLines" collection rather than CreditNoteLines — treat the value as unreliable and sum CreditNoteLine.Amount directly.
TotalLineBaseAmountTotal Line Base AmountCalculated (calculated)Calculated total of line base (pre-discount, pre-tax) amounts, summing the pre-merge "ReturnLines" collection rather than CreditNoteLines — unreliable; sum CreditNoteLine.BaseAmount directly.
TotalLineGrossAmountTotal Line Gross AmountCalculated (calculated)Header amount the BillReturn (purchase-return) posting purpose reads when posting the note, calculated over the pre-merge "BillReturnLines" collection — the same stale-navigation caveat as the other Total* columns applies, so verify against CreditNoteLine.GrossAmount.
TotalLineTaxAmountTotal Line Tax AmountCalculated (calculated)Calculated total of line tax, summing the pre-merge "ReturnLines" collection rather than CreditNoteLines — unreliable on merged credit notes; sum CreditNoteLine.TaxAmount directly.
TotalSchemeDiscountAmountTotal Scheme AmountCalculated (calculated)Calculated total of scheme discount on the lines (labelled "Total Scheme Amount"), summing the pre-merge "ReturnLines" collection rather than CreditNoteLines — unreliable; sum CreditNoteLine.NetSchemeDiscount directly.
TotalTaxAmountTotal Tax Posting AmountCurrencyA stored (non-calculated) decimal labelled "Total Tax Posting Amount". Easy to confuse with TotalTaxAmount2, which is labelled "Total Tax Amount" and IS calculated — the two names and the two labels are crossed, so check which column a screen or query actually means. Neither is the note's true total tax; sum CreditNoteLine.TaxAmount for that.
TotalTaxAmount2Total Tax AmountCalculated (calculated)Despite its label "Total Tax Amount" this is a calculated sum of a single tax slot only — Tax2 across the lines — and it sums the pre-merge "ReturnLines" collection at that. It is not the note's total tax. Use CreditNoteLine.TaxAmount for the real figure.
TransactionTypeTransaction TypePickListThe discriminator that decides which of three documents this row is, and therefore how it posts: null or empty = financial AR credit note (CreditNote posting purpose, party AccountId), "SaleReturn" = customer goods return (Return purpose, revenue/AR reversal), "BillReturn" = purchase return to a supplier (BillReturn purpose, party SupplierAccountId). Validation, defaults, inventory posting and the delivery-release actions are all gated on it. Filter on it before aggregating credit notes — otherwise sales and purchase traffic land in the same total. Values: SaleReturn, BillReturn, Claim Settlement.
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete the selected records.
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditEdit in page.
EditInLine1EditEditInlineEdit
EditListRowEditEdit, inactiveEditListRow
NewNewNewNew
PerformReturnPerform ReturnServerAction (PerformReturn)On a sale-return credit note, creates CreditNoteLine rows from the invoice lines passed in the action payload (an "InvoiceLines" array). The quantity write-backs to the Invoice, DeliveryOrder and Order lines are NOT done here — inserting the lines runs the line handler, which owns those aggregates and recomputes them as a SUM, so they stay correct when a line is later edited or removed.
PostAdjustmentsPost AdjustmentsServerAction (PostAdjustments)Advertised as a supported action on this entity, but the credit-note handler has no dispatch branch for it: invoking it reaches the handler and falls through to a NotSupportedException, and the seeded action row asks for no confirmation, so the user sees a raw error. Do not describe it as posting anything. Credit-note settlement is actually recorded by creating PaymentAdjustment rows (the claim-settlement path nets a note against the partner's open invoices oldest-first) or, on the current open-item engine, SettlementAllocation rows against the note's OpenTransaction.
PostGeneralLedgerPost General LedgerServerAction (PostGeneralLedger)Sets IsGLPostingApproved on the note and saves it; the save pipeline is what posts. The handler then posts through DocumentJournalPostingService under the purpose chosen by TransactionType — CreditNote (Dr Sales / Cr AR) for a financial note, Return (revenue and AR reversal) for a sale return, BillReturn (Dr AP / Cr GR-IR plus input-tax reversal, party SupplierAccountId) for a purchase return — creating one balanced journal plus the note's OpenTransaction, and captures GST tax transactions afterwards (outward for sales notes, inward for purchase returns). Posting is append-only: re-posting an already-posted document produces reversal journals rather than editing the ledger. A GST capture failure is swallowed and never blocks the ledger posting.

Lookup filters

FilterLookup fieldNotes
Branch For Partner AccountBranchId
Customer Account FilterAccountId
Partner Account FilterPartnerAccountId