FINERACT-1971: Minor bug-fixes and enhancements
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AdjustTransactionByExternalIdCommandStrategy implements CommandStrategy {
|
||||
public class AdjustLoanTransactionByExternalIdCommandStrategy implements CommandStrategy {
|
||||
|
||||
/**
|
||||
* Loan transactions api resource {@link LoanTransactionsApiResource}.
|
||||
+1
-1
@@ -44,7 +44,7 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AdjustTransactionCommandStrategy implements CommandStrategy {
|
||||
public class AdjustLoanTransactionCommandStrategy implements CommandStrategy {
|
||||
|
||||
/**
|
||||
* Loan transactions api resource {@link LoanTransactionsApiResource}.
|
||||
+1
-1
@@ -48,7 +48,7 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class GetTransactionByExternalIdCommandStrategy implements CommandStrategy {
|
||||
public class GetLoanTransactionByExternalIdCommandStrategy implements CommandStrategy {
|
||||
|
||||
/**
|
||||
* Loan transactions api resource {@link LoanTransactionsApiResource}.
|
||||
+1
-1
@@ -47,7 +47,7 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class GetTransactionByIdCommandStrategy implements CommandStrategy {
|
||||
public class GetLoanTransactionByIdCommandStrategy implements CommandStrategy {
|
||||
|
||||
/**
|
||||
* Loan transactions api resource {@link LoanTransactionsApiResource}.
|
||||
+2
-5
@@ -42,6 +42,7 @@ import java.util.Map;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
|
||||
import org.apache.fineract.portfolio.savings.SavingsPeriodFrequencyType;
|
||||
import org.apache.fineract.portfolio.savings.service.SavingsEnumerations;
|
||||
@@ -315,11 +316,7 @@ public class DepositAccountTermAndPreClosure extends AbstractPersistableCustom {
|
||||
}
|
||||
|
||||
public boolean isAfterExpectedFirstDepositDate(final LocalDate compareDate) {
|
||||
boolean isAfterExpectedFirstDepositDate = false;
|
||||
if (this.expectedFirstDepositOnDate != null) {
|
||||
isAfterExpectedFirstDepositDate = compareDate.isAfter(getExpectedFirstDepositOnDate());
|
||||
}
|
||||
return isAfterExpectedFirstDepositDate;
|
||||
return this.expectedFirstDepositOnDate != null && DateUtils.isAfter(compareDate, getExpectedFirstDepositOnDate());
|
||||
}
|
||||
|
||||
public Integer getOnAccountClosureType() {
|
||||
|
||||
-9
@@ -144,7 +144,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Transactional
|
||||
@Override
|
||||
public CommandProcessingResult activateFDAccount(final Long savingsId, final JsonCommand command) {
|
||||
|
||||
final AppUser user = this.context.authenticatedUser();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -621,7 +620,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
|
||||
@Override
|
||||
public CommandProcessingResult adjustRDTransaction(final Long savingsId, final Long transactionId, final JsonCommand command) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -894,7 +892,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Override
|
||||
public SavingsAccountTransaction initiateSavingsTransfer(final Long accountId, final LocalDate transferDate,
|
||||
final DepositAccountType depositAccountType) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
.isSavingsInterestPostingAtCurrentPeriodEnd();
|
||||
@@ -927,7 +924,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Override
|
||||
public SavingsAccountTransaction withdrawSavingsTransfer(final Long accountId, final LocalDate transferDate,
|
||||
final DepositAccountType depositAccountType) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -969,7 +965,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Override
|
||||
public SavingsAccountTransaction acceptSavingsTransfer(final Long accountId, final LocalDate transferDate,
|
||||
final Office acceptedInOffice, final Staff fieldOfficer, final DepositAccountType depositAccountType) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -1125,7 +1120,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Override
|
||||
public CommandProcessingResult waiveCharge(final Long savingsAccountId, final Long savingsAccountChargeId,
|
||||
@SuppressWarnings("unused") final DepositAccountType depositAccountType) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -1261,7 +1255,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
.findOneWithNotFoundDetection(savingsAccountChargeId, accountId);
|
||||
|
||||
final DateTimeFormatter fmt = DateTimeFormatter.ofPattern("dd MM yyyy");
|
||||
|
||||
while (transactionDate.isAfter(savingsAccountCharge.getDueLocalDate())) {
|
||||
payCharge(savingsAccountCharge, transactionDate, savingsAccountCharge.amoutOutstanding(), fmt);
|
||||
}
|
||||
@@ -1270,7 +1263,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Transactional
|
||||
private void payCharge(final SavingsAccountCharge savingsAccountCharge, final LocalDate transactionDate, final BigDecimal amountPaid,
|
||||
final DateTimeFormatter formatter) {
|
||||
|
||||
AppUser user = getAppUserIfPresent();
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
@@ -1314,7 +1306,6 @@ public class DepositAccountWritePlatformServiceJpaRepositoryImpl implements Depo
|
||||
@Transactional
|
||||
@Override
|
||||
public void updateMaturityDetails(Long depositAccountId, DepositAccountType depositAccountType) {
|
||||
|
||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService
|
||||
.isSavingsInterestPostingAtCurrentPeriodEnd();
|
||||
final Integer financialYearBeginningMonth = this.configurationDomainService.retrieveFinancialYearBeginningMonth();
|
||||
|
||||
Reference in New Issue
Block a user