Introducing a new way to review your PRs.

Read the announcement

frappe / hrms

Open Source HR and Payroll Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / employee-expenses-and-travel

Employee expenses and travel

Employee expenses and travel form a connected reimbursement flow. Employees can request money before an expense, report actual spending after it occurs, and plan travel with itinerary and expected costs. The flow carries employee, company, currency, approval, funding, tax, and accounting context from planning through settlement. See Workforce management and Compensation, benefits, and tax for related workforce and payroll systems.

Reimbursement workflow

The reimbursement workflow separates planned funding from actual spending. An employee advance provides money before an expense. An expense claim records what the employee spent and what the organization approves. The claim can use the advance to reduce the amount still owed to the employee, or record the unused part for return or salary repayment.

This diagram shows how a work expense can move through funding, claim review, and settlement.

flowchart LR
    A[Travel request or expense need] --> B[Employee advance]
    A --> C[Travel itinerary and cost plan]
    B --> D[Expense claim]
    C --> D
    D --> E[Approval]
    E --> F[Taxes and accounting]
    F --> G[Reimbursement or advance adjustment]
    B --> H[Return unused amount]

Travel requests and expense claims remain separate records. Shared employee, company, expense type, and accounting context relates planned and actual amounts. The code read for this page does not show an automatic conversion from a travel request into a claim.

Funding stages

An employee advance is a request for a stated amount and purpose. Its status tracks whether the amount is unpaid, partly paid, paid, claimed, returned, partly claimed and returned, or cancelled. A claim can use an advance only after a valid positive payment is recorded. It can use a partly paid advance for the amount that was paid.

The advance account must be a receivable account in the advance currency. This keeps the advance as an amount due from the employee until settlement. The system also prevents payments above the requested advance amount and returns above the unclaimed amount.

Unused funds can return through a direct journal entry or through payroll. A salary repayment creates an additional salary deduction. Payroll posts the repayment against the advance account and moves the advance to Returned when the full amount is recovered. Scheduled deductions cannot exceed the amount still due.

References: hrms/…/employee_advance.py• L61-175 hrms/…/employee_advance.py• L185-272 hrms/…/employee_advance.py• L292-319 hrms/…/employee_advance.py• L467-488 hrms/…/test_employee_advance.py• L163-274 hrms/…/test_employee_advance.py• L276-337

Claim stages

An expense claim is the record of actual employee spending. Each expense line has a type, date, description, claimed amount, and sanctioned amount. The sanctioned amount is the part approved for reimbursement, so the claim can preserve a difference between reported and accepted spending.

The claim moves through approval before it becomes a payable or paid result. An approved claim is Paid when its reimbursed amount is complete or when advances reduce the amount due to zero. When reimbursement is greater than zero but does not cover the full amount, it is Partially Paid. A rejected claim has no sanctioned amount. When configured, an employee cannot approve their own claim.

Claims for another employee require a role with write access beyond employee self-service roles. This keeps the employee named on the claim aligned with the person allowed to create or change it.

References: hrms/…/expense_claim.py• L99-217 hrms/…/expense_claim.py• L231-274 hrms/…/expense_claim.py• L660-665 hrms/…/expense_claim.py• L675-734

Advance adjustment

The advances section of a claim links paid employee advances to the expenses they fund. It records the payment, amount already claimed, unused amount, return amount, and amount allocated to the claim. The system checks that the advance belongs to the same employee and uses the same currency as the claim.

One payment can fund more than one advance. To avoid reducing the wrong balance, the system calculates claimed amounts for the selected employee advance and payment reference only. It considers approved and submitted claims.

When an approved claim is submitted or cancelled, the linked advance's claimed balance is updated. An allocated row must retain the advance account and payment reference needed for accounting.

References: hrms/…/expense_claim.py• L598-658 hrms/…/expense_claim.py• L761-824 hrms/…/expense_claim.py• L827-965 hrms/…/employee_advance.py• L254-272 hrms/…/test_employee_advance.py• L73-161 hrms/…/test_employee_advance.py• L295-337

Travel planning

Travel requests capture the business reason and practical needs for an employee trip before travel takes place. They support domestic or international travel, funding and sponsorship choices, trip details, itinerary segments, and expected costs.

Travel request

A travel request groups the information needed to plan and review a trip. It can state whether the organization fully funds the trip, another party sponsors it, or both parties share the cost. The request identifies the employee and purpose of travel. It can also carry sponsor, event, invitation, identity, company, and cost-center context for review.

References: hrms/…/travel_request.json• L43-90 hrms/…/travel_request.json• L93-150 hrms/…/travel_request.json• L153-225

Travel itinerary

An itinerary describes each travel segment within a request. It records the origin, destination, travel mode, departure and arrival times, and meal preference. It can also state whether the employee needs an advance and whether lodging is required. Lodging details include dates and a preferred area.

References: hrms/…/travel_itinerary.json• L24-109

Request costing

Travel request costing turns the trip plan into a funding view. Each costing line uses an expense type and separates the sponsored amount from the amount the organization must fund. The total amount gives the expected cost for that category. Comments provide context for review.

These planned amounts support funding decisions and may guide a later advance or claim. They are not actual expense lines. The expense claim records actual and sanctioned spending after the employee incurs the cost.

References: hrms/…/travel_request_costing.json• L16-60 hrms/…/travel_request.json• L153-178

Tax and accounting treatment

An expense claim combines approved expense amounts, tax charges, and advance offsets into a reimbursement amount. It keeps transaction-currency values with company-currency values so accounting can post the claim in the company's books.

Tax charges

Expense taxes and charges apply to the total sanctioned expense amount. A tax row identifies the account, rate, amount, description, cost center, and project. The claim adds these charges before it subtracts linked advances.

The claim total follows this relationship:

Grand total = sanctioned expenses + taxes and charges - allocated advances

References: hrms/…/expense_claim.py• L546-596 hrms/…/expense_claim.py• L423-443 hrms/…/expense_taxes_and_charges.json• L25-128

Currency conversion

The claim uses an employee transaction currency and exchange rate when multi-currency claims are enabled. Otherwise, it uses the company's default currency with a rate of one. It stores equivalent totals in company currency. An advance can offset a claim only when both use the same currency.

When an advance was paid at a different rate from the claim, the difference is tracked as an exchange gain or loss. If the advance has no exchange rate, the system leaves that difference at zero and does not create a gain or loss journal.

References: hrms/…/expense_claim.py• L465-519 hrms/…/expense_claim.py• L537-545 hrms/…/expense_claim.py• L761-824 hrms/…/test_employee_advance.py• L413-495

Accounting settlement

An approved claim assigns each expense to its configured expense account and accounting dimensions such as cost center or project. It records a payable to the employee when the claim is not paid at submission. If it is paid at submission, the payment method and bank or cash account complete the settlement.

Payment entries, journal entries, and payment reconciliation can change the amount already reimbursed. The claim status therefore reflects accounting settlement as well as approval: Unpaid means no reimbursement is recorded, Partially Paid means only part is reimbursed, and Paid means the full amount is covered. Linked project and task totals can also receive sanctioned expense amounts for work-cost tracking.

References: hrms/…/expense_claim.py• L302-421 hrms/…/expense_claim.py• L675-709 hrms/…/expense_claim.py• L968-1014

Cross-system relationships

These records use a common employee and company context but serve different points in the reimbursement process. Travel requests plan a trip. Advances provide funds. Claims settle actual costs. Accounting records then show the payable, payment, tax, and advance adjustment.

RecordMain questionDownstream relationship
Travel requestWhy and how will the employee travel?Supplies itinerary and expected funding details.
Employee advanceWhat money did the employee receive before spending?Can be allocated to an expense claim or returned.
Expense claimWhat did the employee spend and what amount is approved?Creates the reimbursement and accounting result.
Expense claim detailWhat is each expense line?Supplies expense type, amount, sanction, and dimensions.
Travel request costingHow much of the planned trip is sponsored or funded?Supports review and funding decisions before actual claims.

Employee and company context

The employee is the common party across advances, claims, and travel requests. Company, department, currency, cost center, project, and expense type add the context needed for approval and accounting. Validation keeps the employee, company, department, account, and currency relationships aligned across the employee-facing and financial records.

References: hrms/…/employee_advance.py• L61-67 hrms/…/expense_claim.py• L108-205 hrms/…/expense_claim.py• L521-545 hrms/…/travel_request.json• L98-104 hrms/…/travel_request.json• L220-225

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to advance payment, return, or salary repayment rules must keep advance status, claim totals, and the employee advance balance in agreement.
  • Changes to advance allocation must keep payment references tied to the selected advance when one payment funds several advances.
  • Changes to expense types or company accounts must preserve the mapping from each claim line to its expense account.
  • Changes to currency or exchange-rate rules must preserve same-currency advance allocation and company-currency totals.
  • Changes to tax calculation must keep the grand-total relationship and tax account entries aligned.
  • Changes to payment, journal-entry, or reconciliation links must continue to update reimbursement amounts, outstanding balances, and settlement status.
  • Changes to approval settings must keep the self-approval rule consistent between form behavior and server validation.
  • Changes to travel funding or costing must keep sponsored and organization-funded amounts distinct from actual expense and sanctioned amounts.

Important failure modes

TriggerConsequenceGuard
A claim uses an advance for another employeeThe claim cannot be settled reliably against the advance.Require matching employee records.
A claim uses an advance in another currencyThe advance offsets the claim at an invalid value.Allow adjustment only when currencies match.
A payment funds several advances but allocation is not tied to the selected advance and paymentOne advance's available balance is reduced by another claim.Sum approved submitted claims for the same advance and payment reference.
An advance account is not receivablePayment or claim adjustment can create an invalid ledger position.Require a receivable account in the advance currency.
An advance was paid while its account had the wrong typeThe payment ledger can remain incompatible with later claim settlement.Require a positive receivable payment ledger entry and recreate an invalid payment.
Allocated advance exceeds its unclaimed balanceThe employee's advance is settled more than once.Reject allocation above the remaining unclaimed amount.
An allocated advance row lacks its account or payment referenceAccounting cannot post the adjustment against the advance.Require the advance account, reference type, and reference name.
Salary repayment exceeds the unclaimed advance amountPayroll tries to recover more than the employee owes.Reject the repayment above the available amount.
Sanctioned expense exceeds the claimed line amountApproved reimbursement is greater than reported spending.Reject the claim during validation.
A paid claim has no payment methodThe cash or bank source for settlement is unknown.Require a mode of payment for immediate payment.
An employee approves their own claim while self-approval is disabledThe claim cannot pass the approval step.Reject self-approval during submission.
A claim department belongs to another companyWorkforce and accounting context do not agree.Reject the claim when department and company differ.

Key files

FileWhy to read it
hrms/…/employee_advance.pyShows the advance lifecycle, balance tracking, returns, and settlement states.
hrms/…/test_employee_advance.pyDemonstrates payment, claim allocation, direct return, salary repayment, payroll posting, currency, and status guarantees.
hrms/…/expense_claim.pyShows how claims connect approval, advances, taxes, reimbursement, currency, and accounting.
hrms/…/expense_claim.jsonDefines the claim's employee, expense, advance, tax, currency, and accounting sections.
hrms/…/expense_claim_detail.jsonDefines the information captured for each actual expense line.
hrms/…/expense_taxes_and_charges.jsonDefines tax rows and their accounting dimensions.
hrms/…/travel_request.jsonDefines trip purpose, funding choice, employee details, itinerary, costing, and accounting context.
hrms/…/travel_itinerary.jsonDefines travel segments, advance needs, lodging, and timing.
hrms/…/travel_request_costing.jsonDefines planned sponsored, funded, and total travel costs.