akulikov 2024-12-16 17:20:31 +03:00
parent 045a806dc7
commit 8664625c89

View file

@ -302,11 +302,13 @@ public class KSRepLccValueReportBuilder extends CSVReportBuilder<EmptyParams, KS
row.setReportDate(reportDate);
row.setTkr(tkr);
row.setSumValue(sumValue);
row.setValue(values.get(rate.getCurrencyId()));
row.setSingleLimit(NPR);
row.setCurrency(rate.getCurrency());
row.setNccRealAccount("");
BigDecimal valueForRate = values.get(rate.getCurrencyId());
row.setValue(valueForRate.compareTo(BigDecimal.ZERO) <= 0 ? BigDecimal.ZERO : valueForRate);
BigDecimal quantity = quantities.get(rate.getCurrencyId());
BigDecimal freeQuantity;
boolean freeQuantityIsDelta = false;
@ -339,7 +341,7 @@ public class KSRepLccValueReportBuilder extends CSVReportBuilder<EmptyParams, KS
} else freeQuantity = BigDecimal.ZERO;
}
BigDecimal lockQuantity = quantity.subtract(freeQuantity);
row.setQuantity(quantity);
row.setQuantity(quantity.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : quantity);
row.setLockQuantity(lockQuantity);
row.setFreeQuantity(freeQuantity);