akulikov 2025-01-29 17:59:48 +03:00
parent 91f5952a58
commit ee781393fb

View file

@ -323,7 +323,8 @@ public class KSRepLccValueReportBuilder extends CSVReportBuilder<EmptyParams, KS
if (currRate.getCurrency().equals(rate.getCurrency())) continue;
BigDecimal value = posMoneys.get(currRate.getCurrencyId()).multiply(currRate.getValue());
sValueExt = sValueExt.add(value);
m0ValueExt = m0ValueExt.add(value.multiply(risk.get(currRate.getCurrencyId()).getValue()));
BigDecimal valueForM0Ext = value.compareTo(BigDecimal.ZERO) < 0 ? value.negate() : value;
m0ValueExt = m0ValueExt.add(valueForM0Ext.multiply(risk.get(currRate.getCurrencyId()).getValue()));
}
constValue = sValueExt.subtract(m0ValueExt);
BigDecimal posMoney = posMoneys.get(rate.getCurrencyId());