in service/src/main/java/org/apache/fineract/cn/deposit/service/internal/service/TransactionService.java [290:307]
private void validateAccount(MoneyData requestAmount, Account account) {
validateAccount(account);
String accountId = account.getIdentifier();
if (account.getHolders() != null) { // customer account
ProductInstanceEntity instance = productInstanceRepository.findByAccountIdentifier(accountId).orElseThrow(
() -> ServiceException.notFound("Account {0} not found", accountId)
);
ProductDefinition productDefinition = productDefinitionService.findProductDefinition(instance.getProductDefinition().getIdentifier()).get();
if (!Boolean.TRUE.equals(productDefinition.getActive()))
throw new UnsupportedOperationException("Product Definition is inactive");
Currency currency = productDefinition.getCurrency();
if (!currency.getCode().equals(requestAmount.getCurrency()))
throw new UnsupportedOperationException();
}
}