FINERACT-2326: Fix external id generation during reinvest

This commit is contained in:
Adam Saghy
2025-12-11 13:04:59 +01:00
parent 1d0100bfcf
commit 767c66f245
5 changed files with 56 additions and 35 deletions
@@ -0,0 +1,26 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.savings.domain;
import org.apache.fineract.portfolio.savings.DepositAccountType;
public interface IDepositAccountType {
DepositAccountType depositAccountType();
}
@@ -135,7 +135,7 @@ import org.springframework.util.CollectionUtils;
@DiscriminatorColumn(name = "deposit_type_enum", discriminatorType = DiscriminatorType.INTEGER)
@DiscriminatorValue("100")
@SuppressWarnings({ "MemberName" })
public class SavingsAccount extends AbstractAuditableWithUTCDateTimeCustom<Long> {
public class SavingsAccount extends AbstractAuditableWithUTCDateTimeCustom<Long> implements IDepositAccountType {
private static final Logger LOG = LoggerFactory.getLogger(SavingsAccount.class);
@@ -3270,10 +3270,6 @@ public class SavingsAccount extends AbstractAuditableWithUTCDateTimeCustom<Long>
return getActivationDate() == null ? getSubmittedOnDate() : getActivationDate();
}
public DepositAccountType depositAccountType() {
return DepositAccountType.fromInt(depositType);
}
protected boolean isTransferInterestToOtherAccount() {
return false;
}
@@ -3825,10 +3821,6 @@ public class SavingsAccount extends AbstractAuditableWithUTCDateTimeCustom<Long>
return this.minOverdraftForInterestCalculation;
}
public Integer getDepositType() {
return this.depositType;
}
public BigDecimal getMinRequiredBalance() {
return this.minRequiredBalance;
}
@@ -3890,4 +3882,9 @@ public class SavingsAccount extends AbstractAuditableWithUTCDateTimeCustom<Long>
.map(transaction -> transaction.toSavingsAccountTransactionDetailsForPostingPeriod(this.currency, this.allowOverdraft))
.toList();
}
@Override
public DepositAccountType depositAccountType() {
return DepositAccountType.fromInt(100);
}
}