Commit ac2fafa
Only fall back to default tax in getTaxName when tax tracking is enabled
When a user deletes tax from an expense (with taxes disabled), the API
returns taxCode: null which Onyx strips to undefined. getTaxName then
falls back to defaultTaxCode via the || operator and displays the
default tax rate instead of showing empty.
This uses policy.tax.trackingEnabled to decide the fallback: if taxes
are enabled and taxCode is falsy, fall back to the default (fixing
issue 85729). If taxes are disabled and taxCode is falsy, return
undefined so the display shows empty (fixing issue 87667).
Co-authored-by: Vinh Hoang <hoangzinh@users.noreply.github.com>1 parent cd199f8 commit ac2fafa
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2141 | 2141 | | |
2142 | 2142 | | |
2143 | 2143 | | |
2144 | | - | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2145 | 2147 | | |
2146 | | - | |
| 2148 | + | |
| 2149 | + | |
2147 | 2150 | | |
2148 | 2151 | | |
2149 | 2152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1829 | 1829 | | |
1830 | 1830 | | |
1831 | 1831 | | |
| 1832 | + | |
1832 | 1833 | | |
1833 | 1834 | | |
1834 | 1835 | | |
| |||
0 commit comments