Commit fe81f4e
Clear stale convertedAmount when moving cross-currency expenses from Self DM
When an unreported expense (from Self DM) is moved to a report with a different
currency, the sourceCurrency is undefined. This caused shouldClearConvertedAmount
to bail out early, leaving stale convertedAmount/convertedTaxAmount on the
transaction. Downstream readers (getBillableAndTaxTotal, calculateGroupTotal) then
displayed incorrect Tax and Billable totals while offline.
- Fall back to the transaction's own currency when sourceCurrency is missing
- Clear convertedTaxAmount alongside convertedAmount in optimistic and failure data
Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>1 parent 58141ba commit fe81f4e
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
| 1045 | + | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1050 | 1056 | | |
1051 | 1057 | | |
1052 | 1058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| 1092 | + | |
1092 | 1093 | | |
1093 | 1094 | | |
1094 | 1095 | | |
| |||
1112 | 1113 | | |
1113 | 1114 | | |
1114 | 1115 | | |
| 1116 | + | |
1115 | 1117 | | |
1116 | 1118 | | |
1117 | 1119 | | |
| |||
0 commit comments