FINERACT-1981: Generate loan schedule as dto

This commit is contained in:
Adam Saghy
2024-10-25 14:35:29 +02:00
parent b23fe71864
commit e60ce9a401
16 changed files with 507 additions and 236 deletions
@@ -186,7 +186,7 @@ public class ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl implements
GLAccount expenseAccount = glAccountRepository.findById(data.getExpenseAccount()).orElseThrow();
MonetaryCurrency currency = loanProduct.getPrincipalAmount().getCurrency();
Money money = Money.of(currency, data.getBalance());
Money amountToReserve = money.percentageOf(data.getPercentage(), MoneyHelper.getRoundingMode());
Money amountToReserve = money.percentageOf(data.getPercentage(), MoneyHelper.getMathContext());
Long criteraId = data.getCriteriaId();
LoanProductProvisioningEntry entry = new LoanProductProvisioningEntry().setLoanProduct(loanProduct).setOffice(office)
.setCurrencyCode(data.getCurrencyCode()).setProvisioningCategory(provisioningCategory)