diff --git a/src/CONST.ts b/src/CONST.ts index 47caa5e64a90..c57ac575f7e6 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -4153,6 +4153,7 @@ const CONST = { }, }, + MAX_TAX_RATE_INTEGER_PLACES: 4, MAX_TAX_RATE_DECIMAL_PLACES: 4, } as const; diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index 4ec932fbcc14..392fb90bbd22 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -91,8 +91,8 @@ function ValuePage({ hideCurrencySymbol // The default currency uses 2 decimal places, so we substract it extraDecimals={CONST.MAX_TAX_RATE_DECIMAL_PLACES - 2} - // We increase the amount max length. We have to add 2 places for one digit and comma. - amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + 2} + // We increase the amount max length to support the extra decimals. + amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + CONST.MAX_TAX_RATE_INTEGER_PLACES} extraSymbol={%} ref={inputCallbackRef} /> diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index 9d7c1a400870..e76e57768963 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -108,8 +108,8 @@ function WorkspaceCreateTaxPage({ hideCurrencySymbol // The default currency uses 2 decimal places, so we substract it extraDecimals={CONST.MAX_TAX_RATE_DECIMAL_PLACES - 2} - // We increase the amount max length. We have to add 2 places for one digit and comma. - amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + 2} + // We increase the amount max length to support the extra decimals. + amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + CONST.MAX_TAX_RATE_INTEGER_PLACES} extraSymbol={%} />