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

Expense Claim — entity reference

An employee reimbursement claim, anchored on the claimant Resource (resourceId - the same person key HR/payroll use; employeeAccountId is the legacy Account-based key). Expense heads live on child ExpenseClaimLine rows. It carries three independent status fields: Status (the lifecycle: Draft, Submitted, ManagerApproved, FinanceReview, ApprovedForPayment, ApprovedForPayroll, Posted, PartiallyPaid, Paid, Settled, Rejected, ReturnedForCorrection, Cancelled), PostingStatus (NotPosted/Posted/Reversed/Failed) and PaymentStatus (Unpaid/Partial/Paid). Approval routes through the finance-wide ApprovalProcess engine; a decision listener mirrors the outcome onto ApprovalStatus/Status and on final approval automatically posts the claim: Dr expense heads (plus Dr Input GST for ITC-eligible lines) / Cr Employee Payable, raising an Employee-Payable OpenTransaction keyed on the ResourceId. Reimbursement then settles that open item - singly (PostReimbursement), in a batch (ExpenseReimbursementBatch), through payroll (reimbursementMode Payroll), or by adjusting an ExpenseAdvance. Policy checks write ExpensePolicyViolation rows and set hasPolicyViolation.

Fields

FieldLabelTypeRequiredWhat it does
AdvanceAdjustedAmountAdvance Adjusted AmountCurrencyCumulative amount of employee advances applied to this claim. Each advance settlement adds to it; at posting time the employee payable raised is the gross claim minus this amount, and posting fails if the advance already covers the whole claim (settle via the advance instead).
ApprovalStatusApproval StatusTextThin mirror of the approval-engine outcome (Pending, Approved, Rejected), stamped by the decision listener - the routing itself lives in ApprovalProcess/ApprovalRequest, not on the claim. A recalled request clears it to empty; a reverted approval sets it back to Pending.
BranchIdBranchLookup → Branch
BusinessUnitIdBusiness UnitLookup → BusinessUnit
ClaimDateClaim DateDate
ClaimPeriodFromClaim Period FromDate
ClaimPeriodToClaim Period ToDate
CostCenterIdCost CenterLookup → CostCenter
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
CurrencyCodeCurrency CodeText
DepartmentIdDepartmentLookup
EmployeeAccountIdEmployee AccountLookup → AccountLegacy claimant key pointing at a CRM Account in the employee role. The canonical anchor is resourceId; the expense posting and open-item machinery key on the Resource, not this Account.
EmployeeIdEmployeeLookup → Employee
EmployeePayableOpenTransactionIdEmployee Payable Open TransactionLookup → OpenTransactionPoints at the Employee-Payable OpenTransaction (per-employee subledger row) raised when the claim posted. Reimbursement, batch payment, payroll settlement and advance settlement all resolve the open item through this pointer, falling back to a lookup by source entity and record.
GLIdGLLookup → JournalThe posting journal of the claim. A non-empty value means the claim has hit the ledger - posting treats it as already-posted and refuses to post again.
HasPolicyViolationHas Policy ViolationBooleanSet by policy evaluation: true when the run recorded any ExpensePolicyViolation rows for the claim, false when it recorded none. A summary flag only - the detail (rule, severity, excess) lives on the violation rows.
IdIdGuidYes
IncludedInPayrollRunIdIncluded In Payroll RunLookup → PayrollRun
IsGLPostedIs GL PostedBoolean
IsGLPostingApprovedIs GL Posting ApprovedBoolean
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberText
NarrationNarrationText
NetReimbursableAmountNet Reimbursable AmountCurrencyThe amount actually payable to the employee: recomputed at posting as gross (amount+tax over postable lines) minus advanceAdjustedAmount, then reduced further by any later advance settlements. Derived - do not set it by hand.
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → Account
PaymentGLAccountIdPaymentGL AccountLookup → GLAccountThe GL account credited for the claim total - the employee-payable control, or cash/bank if paid immediately. Also serves as the default bank account for the Reimburse action when no bankGLAccountId argument is passed.
PaymentStatusPayment StatusTextSettlement state of the employee payable: Unpaid, Partial, Paid. Set to Paid by finance reimbursement, batch reimbursement, payroll settlement, or when advance adjustments fully cover the payable. Distinct from the lifecycle Status, which moves to Settled at the same moments.
PayrollComponentIdPayroll ComponentLookup → PayrollComponent
PayrollPeriodIdPayroll PeriodLookup → PayrollPeriod
PolicyIdPolicyLookup → ExpensePolicy
PostingStatusPosting StatusTextLedger state of the claim: NotPosted, Posted, Reversed, Failed. Posted (or a non-empty glId) is the idempotency guard - posting refuses a claim that is already Posted, and the approval listener skips auto-posting when it sees it.
ProjectIdProjectLookup → Project
RecordTypeIdRecord TypeGuid, hidden
ReimbursementModeReimbursement ModePickListWhere the approved claim gets paid: FinancePayment (settled by a finance/treasury payment) or Payroll (handed to a payroll run as Payroll Payable). Finance reimbursement refuses Payroll-mode claims, and the approval listener chooses ApprovedForPayroll vs ApprovedForPayment from this field. Values: Cash, Bank Transfer.
ResourceIdResourceLookup → ResourceThe claimant as a Resource - the canonical employee key shared with HR and payroll. Posting refuses a claim without it, and the Employee-Payable open item is keyed on it (not on an Account), which is also how duplicate detection finds the employee's prior claims.
StatusStatusTextThe claim lifecycle: Draft, Submitted, ManagerApproved, FinanceReview, ApprovedForPayment, ApprovedForPayroll, Posted, PartiallyPaid, Paid, Settled, Rejected, ReturnedForCorrection, Cancelled. Moved by the approval listener (ApprovedForPayment or ApprovedForPayroll depending on reimbursementMode, Rejected, back to Draft on recall, Submitted on revert), by posting (Posted) and by settlement (Settled). It is one of three independent status fields - do not confuse it with postingStatus or paymentStatus.
TaxablePerquisiteFlagTaxable Perquisite FlagBooleanPayroll-bridge marker: flags the reimbursement as a taxable perquisite for the payroll module that consumes Payroll-mode claims. The expense posting itself does not read it.
TotalAmountTotal AmountCurrency
TotalApprovedAmountTotal Approved AmountCurrency
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete the selected records.
CloneCloneServerAction (Clone)Create a copy of this record
ComputeRechargeCompute RechargeServerAction (ComputeRecharge)Collects the claim's billable lines (isBillableToCustomer with a customerAccountId), moves their billingStatus to PendingBilling, and returns totals grouped by customer and project: raw cost (amount+tax) versus recharge (cost with each line's markupPercent applied) and the line count. No journal and no invoice are created - invoice generation is a separate sales flow.
DeleteDeleteDeleteDelete this ExpenseClaim.
DeleteRecordDeleteDeleteDelete
EditEditEditEdit this ExpenseClaim.
EditInLineEditEditInlineEdit
EditRecordEditEditEdit
EvaluatePolicyEvaluate PolicyServerAction (EvaluatePolicy)Runs the policy engine against the claim: gathers every active rule of active policies matching the tenant, the claimant's grade and the claim date, checks the six enforced rule types (category/grade-hotel limits, receipt-mandatory-above, blocked category, late submission, duplicate detection) plus the automatic inactive-category guard, writes ExpensePolicyViolation rows, sets policyViolationFlag/duplicateFlag on offending lines, adds AutoDisallow excesses to disallowedAmount, and sets the claim's hasPolicyViolation. Returns the violation list with blocked and requires-higher-approval indicators. Evaluation records and flags - run it before submission/approval so disallowances reach the posted amount.
LinkRechargeInvoiceLink Recharge InvoiceServerAction (LinkRechargeInvoice)Stamps the generated customer invoice onto the claim's billable lines: requires a rechargeInvoiceId argument, sets it on every billable line and marks them Billed. Purely a linkage/status update - the invoice itself must already exist.
NewNewNewCreate a ExpenseClaim.
PostClaimPostServerAction (PostClaim)Posts the claim to the ledger. Preconditions: not already posted, a claimant resourceId, at least one line with an expense GL account and non-zero amount, no deactivated expense categories, and an EmployeePayable control account configured. Effects: a journal debiting each expense head (ITC-eligible tax goes to the Input GST control instead), crediting Employee Payable for gross minus advanceAdjustedAmount; an Employee-Payable open item keyed on the Resource; best-effort GST/ITC analytics capture; stamps glId, postingStatus Posted, status Posted, totals and paymentStatus Unpaid. Fails if the advance adjustment covers the whole claim. Note this also runs automatically on final approval via the approval decision listener - manual use is mainly recovery when auto-posting failed.
PostReimbursementReimburseServerAction (PostReimbursement)Pays a posted claim from the bank: Dr Employee Payable / Cr Bank for the full open payable balance, settling the open item and stamping the claim Paid/Settled. Uses the bankGLAccountId argument, falling back to the claim's paymentGLAccountId. Refuses claims that are unposted, already fully paid, or set to reimbursementMode Payroll (those settle through the payroll run).
SettleViaPayrollSettle via PayrollServerAction (SettleClaimViaPayroll)Hands a posted Payroll-mode claim to payroll: Dr Employee Payable / Cr Payroll Payable, settling the expense open item, tagging includedInPayrollRunId and stamping the claim Paid/Settled - the salary payment then discharges Payroll Payable, and the claim is NOT re-accrued as a payroll earning. Requires a posted claim with an open payable and a PayrollPayable control account. Note the underlying handler registers this operation under the name SettleClaimViaPayroll; the reliable path is automatic - the payroll-run integration pulls every posted, unpaid Payroll-mode claim of the run's employees and performs this settlement per claim.

Lookup filters

FilterLookup fieldNotes
BranchFilterBranchId
PartnerAccountFilterPartnerAccountId