diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index c24f6b33ae5b..3fec3e8bcc1c 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -108513,7 +108513,7 @@ return new A.ReportsScreenVM(t1, t5, t3, groupTotals, new A.ReportsScreenVM_fromStore_closure(t1, reportSettings, store), new A.ReportsScreenVM_fromStore_closure0(_box_1, t1, groupTotals), new A.ReportsScreenVM_fromStore_closure1(store, report), new A.ReportsScreenVM_fromStore_closure2(store, t1), new A.ReportsScreenVM_fromStore_closure3(store, t1), new A.ReportsScreenVM_fromStore_closure4(t1, store)); }, calculateReportTotals(company, currencyMap, reportResult, reportSettings, reportState) { - var groupCurrencies, line, shouldConverCurrencies, i, row, columnIndex, toZone, groupCell, group, j, cell, column, currencyId, t3, t4, t5, t6, t7, t8, age, date, cellValue, rate, rows, sortedColumns, + var groupCurrencies, line, shouldConverCurrencies, i, row, columnIndex, toZone, groupCell, group, j, cell, column, currencyId, t3, t4, t5, t6, t7, t8, age, date, t9, cellValue, rate, rows, sortedColumns, t1 = type$.legacy_String, totals = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.legacy_Map_of_legacy_String_and_legacy_double), data = reportResult.data, @@ -108613,8 +108613,16 @@ if (t7 || cell instanceof A.ReportAgeValue || cell instanceof A.ReportDurationValue) { if (!totals.$index(0, group).containsKey$1(0, column)) totals.$index(0, group).$indexSet(0, column, 0); - if (t7 && cell.currencyId != null) - totals.$index(0, group).$indexSet(0, A.S(column) + "_currency_id", A.parseDouble(cell.currencyId, false)); + if (t7 && cell.currencyId != null) { + t8 = totals.$index(0, group); + if (shouldConverCurrencies) { + t9 = company.settings.currencyId; + if (t9 == null) + t9 = "1"; + } else + t9 = cell.currencyId; + t8.$indexSet(0, A.S(column) + "_currency_id", A.parseDouble(t9, false)); + } if (t7) { t7 = cell.currencyId; if (t7 != null) { @@ -108635,7 +108643,7 @@ t7 = company.settings.currencyId; if (t7 == null) t7 = "1"; - cellValue = A.round(cellValue / rate, currencyMap._map$_map.$index(0, t7).precision); + cellValue = A.round(cellValue * rate, currencyMap._map$_map.$index(0, t7).precision); t7 = totals.$index(0, group); t7.$indexSet(0, column, t7.$index(0, column) + cellValue); } else {