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