Fix for reports
This commit is contained in:
parent
8f33d9a3e4
commit
355f4f8a2c
|
|
@ -676,14 +676,11 @@ GroupTotals calculateReportTotals({
|
|||
cell.currencyId != company.currencyId &&
|
||||
shouldConverCurrencies) {
|
||||
double cellValue = cell.value;
|
||||
var rate = cell.exchangeRate;
|
||||
if (rate == null || rate == 0 || rate == 1) {
|
||||
rate = getExchangeRate(currencyMap,
|
||||
fromCurrencyId: cell.currencyId,
|
||||
toCurrencyId: company.currencyId);
|
||||
}
|
||||
final toCurrency = currencyMap[company.currencyId];
|
||||
cellValue = round(cellValue / rate, toCurrency.precision);
|
||||
final rate = getExchangeRate(currencyMap,
|
||||
fromCurrencyId: cell.currencyId,
|
||||
toCurrencyId: company.currencyId);
|
||||
cellValue = round(cellValue * rate, toCurrency.precision);
|
||||
totals[group][column] += cellValue;
|
||||
} else {
|
||||
totals[group][column] += cell.doubleValue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue