Skip to content

fix: default exchange_rate to 1.0 when it is 0.0 or None in Expense Claim advances - #5011

Open
mujeerhashmi wants to merge 1 commit into
frappe:version-16-hotfixfrom
4csolutions:fix-exchange-rate-default
Open

fix: default exchange_rate to 1.0 when it is 0.0 or None in Expense Claim advances#5011
mujeerhashmi wants to merge 1 commit into
frappe:version-16-hotfixfrom
4csolutions:fix-exchange-rate-default

Conversation

@mujeerhashmi

Copy link
Copy Markdown
Contributor

Ensure that when the exchange rate is not set (is 0.0 or None) for an Employee Advance, it defaults to 1.0. This prevents the system from calculating an incorrect exchange gain/loss difference and incorrectly attempting to create a Journal Entry.

Please provide enough information so that others can review your pull request:

Explain the details for making this change. What existing problem does the pull request solve?

Screenshots/GIFs

Comment thread hrms/hr/doctype/expense_claim/expense_claim.py
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

The implementation appears safe to merge, though the requested Journal Entry regression assertion remains absent.

The new test validates the zero gain/loss value but does not verify that no gain/loss Journal Entry was created.

Files Needing Attention: hrms/hr/doctype/expense_claim/test_expense_claim.py

Reviews (3): Last reviewed commit: "fix: default exchange_rate to 1.0 when i..." | Re-trigger Greptile

@mujeerhashmi
mujeerhashmi force-pushed the fix-exchange-rate-default branch 2 times, most recently from a9f96fd to 45495b1 Compare July 28, 2026 08:55
@mujeerhashmi
mujeerhashmi force-pushed the fix-exchange-rate-default branch from 45495b1 to 355ec78 Compare July 28, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant