Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Sep 14, 2022
2 parents f6bfc4f + cdf607b commit c3f9cc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ui/reports/reports_screen_vm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ GroupTotals calculateReportTotals({
}

if (cell is ReportNumberValue && cell.currencyId != null) {
totals[group]['${column}_currency_id'] = parseDouble(cell.currencyId);
totals[group]['${column}_currency_id'] = parseDouble(
shouldConverCurrencies ? company.currencyId : cell.currencyId);
}

if (cell is ReportNumberValue &&
Expand All @@ -644,7 +645,7 @@ GroupTotals calculateReportTotals({
toCurrencyId: company.currencyId);
}
final toCurrency = currencyMap[company.currencyId];
cellValue = round(cellValue * 1 / rate, toCurrency.precision);
cellValue = round(cellValue * rate, toCurrency.precision);
totals[group][column] += cellValue;
} else {
totals[group][column] += cell.doubleValue;
Expand Down

0 comments on commit c3f9cc8

Please sign in to comment.