Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4153,6 +4153,7 @@ const CONST = {
},
},

MAX_TAX_RATE_INTEGER_PLACES: 4,
MAX_TAX_RATE_DECIMAL_PLACES: 4,
} as const;

Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/taxes/ValuePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={<Text style={styles.iouAmountText}>%</Text>}
ref={inputCallbackRef}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={<Text style={styles.iouAmountText}>%</Text>}
/>
</View>
Expand Down