KSRepCashNettoReportBuilder fix currency_netto
This commit is contained in:
parent
55dd0cc8b6
commit
35d9fe2d3e
1 changed files with 5 additions and 3 deletions
|
|
@ -125,7 +125,8 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
}
|
||||
|
||||
boolean invalid = false;
|
||||
BigDecimal currencyNetto = null;
|
||||
BigDecimal currencyNettoCmt = BigDecimal.ZERO;
|
||||
BigDecimal currencyNettoLmt = BigDecimal.ZERO;
|
||||
if (!cmtRegistries.isEmpty() || !lmtRegistries.isEmpty()) {
|
||||
String sourceTradingCode = null;
|
||||
String sourceTkr = null;
|
||||
|
|
@ -150,7 +151,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
|
||||
break;
|
||||
}
|
||||
currencyNetto = currRegistry.getBalance();
|
||||
currencyNettoCmt = currencyNettoCmt.add(currRegistry.getBalance());
|
||||
}
|
||||
for (Registry currRegistry : lmtRegistries) {
|
||||
if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) {
|
||||
|
|
@ -163,6 +164,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
|
||||
break;
|
||||
}
|
||||
currencyNettoLmt = currencyNettoLmt.add(currRegistry.getBalance());
|
||||
}
|
||||
if (invalid) continue;
|
||||
}
|
||||
|
|
@ -246,7 +248,7 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
ksRepCashNettoReport.setLotCurrency(registry.getSecuritySymbol());
|
||||
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, registry.getSessionType());
|
||||
if (sessionType == SessionType.CURR) {
|
||||
ksRepCashNettoReport.setCurrencyNetto(currencyNetto);
|
||||
ksRepCashNettoReport.setCurrencyNetto(currencyNettoCmt.subtract(currencyNettoLmt));
|
||||
ksRepCashNettoReport.setTrExecDate(LocalDate.now());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue