Fix missing tax amount limit error after money-request route migration - #93251
Fix missing tax amount limit error after money-request route migration#93251MelvinBot wants to merge 2 commits into
Conversation
Co-authored-by: huult <huult@users.noreply.github.com>
Co-authored-by: huult <huult@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork ( To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
The failing
|
|
|
|
@MelvinBot please close this PR |
|
@MelvinBot Please close this PR |
1 similar comment
|
@MelvinBot Please close this PR |
|
🤖 |
|
yes |
Explanation of Change
The tax-amount step stopped enforcing the tax limit after PR #92161 migrated the route from the camelCase
taxAmountpath to the kebab-casemoney-request/tax-amountpath.MoneyRequestAmountFormdecides whether the amount input is a tax amount by checking whether the active route contains the substringtaxAmount. After the route rename, that substring was never present, soisTaxAmountFormwas alwaysfalseand the over-limit check (isTaxAmountInvalid) was skipped — letting users save a tax amount above the allowed limit with no error.This change:
CONST.IOU.TAX_AMOUNT_ROUTE_PREFIX = 'money-request/tax-amount'so the route string is no longer a magic literal.MoneyRequestAmountFormto check for that prefix, which matches the new route.Fixed Issues
$ #93236
PROPOSAL: #93236 (comment)
Tests
+→ Create expense → Manual.Tax amount cannot be greater than …) and the value cannot be saved.0) and verify it saves with no error.Offline tests
Same as Tests.
QA Steps
+→ Create expense → Manual → enter amount → Next.0) still saves correctly.PR Author Checklist
### Fixed Issuessection aboveScreenshots/Videos
N/A — logic-only fix. See Tests/QA for verification steps.