шаг 7 для SecondaryAuctionT0 сессии: создание paymentInstruction по ASB/AMB регистрам
This commit is contained in:
parent
b58895da59
commit
a5bb906eea
1 changed files with 5 additions and 5 deletions
|
|
@ -162,7 +162,7 @@ public class FormingPaymentInstructionAssets implements ISessionStage {
|
||||||
addresseeId = Sender.One.getId();
|
addresseeId = Sender.One.getId();
|
||||||
debitLegAccount = tranAcc;
|
debitLegAccount = tranAcc;
|
||||||
creditLegAccount = counterAcc;
|
creditLegAccount = counterAcc;
|
||||||
amount = registry.getBalance() == null ? null : registry.getBalance().abs().negate();
|
amount = registry.getBalance() == null ? null : registry.getBalance().abs();
|
||||||
Optional<Registry> payerAmtO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AM_T);
|
Optional<Registry> payerAmtO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AM_T);
|
||||||
payerAmtO.ifPresent(amt -> {
|
payerAmtO.ifPresent(amt -> {
|
||||||
amt.setSettledDebit(safeBD(amt.getSettledDebit()).subtract(safeBD(registry.getBalance())));
|
amt.setSettledDebit(safeBD(amt.getSettledDebit()).subtract(safeBD(registry.getBalance())));
|
||||||
|
|
@ -173,10 +173,10 @@ public class FormingPaymentInstructionAssets implements ISessionStage {
|
||||||
addresseeId = registry.getCompanyId();
|
addresseeId = registry.getCompanyId();
|
||||||
debitLegAccount = counterAcc;
|
debitLegAccount = counterAcc;
|
||||||
creditLegAccount = tranAcc;
|
creditLegAccount = tranAcc;
|
||||||
amount = registry.getBalance() == null ? null : registry.getBalance().abs();
|
amount = registry.getBalance() == null ? null : registry.getBalance().abs().negate();
|
||||||
Optional<Registry> payerAmtO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AM_T);
|
Optional<Registry> payerAmtO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AM_T);
|
||||||
payerAmtO.ifPresent(amt -> {
|
payerAmtO.ifPresent(amt -> {
|
||||||
amt.setSettledDebit(safeBD(amt.getSettledDebit()).add(safeBD(registry.getBalance())));
|
amt.setSettledCredit(safeBD(amt.getSettledCredit()).add(safeBD(registry.getBalance())));
|
||||||
setUpdatedStoreInImdg(amt, now);
|
setUpdatedStoreInImdg(amt, now);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -233,10 +233,10 @@ public class FormingPaymentInstructionAssets implements ISessionStage {
|
||||||
addresseeId = registry.getCompanyId();
|
addresseeId = registry.getCompanyId();
|
||||||
debitLegAccount = counterAcc;
|
debitLegAccount = counterAcc;
|
||||||
creditLegAccount = dtrnAcc;
|
creditLegAccount = dtrnAcc;
|
||||||
amount = registry.getBalance() == null ? null : registry.getBalance().abs();
|
amount = registry.getBalance() == null ? null : registry.getBalance().abs().negate();
|
||||||
Optional<Registry> payerAstO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AS_T);
|
Optional<Registry> payerAstO = rgsMng.findRelatedAsset(registry.getTradingClearingRegistryId(), registry.getCompanyId(), AS_T);
|
||||||
payerAstO.ifPresent(amt -> {
|
payerAstO.ifPresent(amt -> {
|
||||||
amt.setSettledDebit(safeBD(amt.getSettledDebit()).add(safeBD(registry.getBalance())));
|
amt.setSettledCredit(safeBD(amt.getSettledCredit()).add(safeBD(registry.getBalance())));
|
||||||
setUpdatedStoreInImdg(amt, now);
|
setUpdatedStoreInImdg(amt, now);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue