+3
@@ -6,6 +6,7 @@
|
|||||||
package org.mifosplatform.portfolio.account.service;
|
package org.mifosplatform.portfolio.account.service;
|
||||||
|
|
||||||
import org.mifosplatform.infrastructure.core.service.Page;
|
import org.mifosplatform.infrastructure.core.service.Page;
|
||||||
|
import org.mifosplatform.portfolio.account.PortfolioAccountType;
|
||||||
import org.mifosplatform.portfolio.account.data.AccountTransferData;
|
import org.mifosplatform.portfolio.account.data.AccountTransferData;
|
||||||
import org.mifosplatform.portfolio.group.service.SearchParameters;
|
import org.mifosplatform.portfolio.group.service.SearchParameters;
|
||||||
|
|
||||||
@@ -17,4 +18,6 @@ public interface AccountTransfersReadPlatformService {
|
|||||||
Page<AccountTransferData> retrieveAll(SearchParameters searchParameters);
|
Page<AccountTransferData> retrieveAll(SearchParameters searchParameters);
|
||||||
|
|
||||||
AccountTransferData retrieveOne(Long transferId);
|
AccountTransferData retrieveOne(Long transferId);
|
||||||
|
|
||||||
|
boolean isAccountTransfer(Long transactionId,PortfolioAccountType accountType);
|
||||||
}
|
}
|
||||||
+28
-3
@@ -247,6 +247,7 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers
|
|||||||
sqlBuilder.append("fromclient.id as fromClientId, fromclient.display_name as fromClientName,");
|
sqlBuilder.append("fromclient.id as fromClientId, fromclient.display_name as fromClientName,");
|
||||||
sqlBuilder.append("toclient.id as toClientId, toclient.display_name as toClientName,");
|
sqlBuilder.append("toclient.id as toClientId, toclient.display_name as toClientName,");
|
||||||
sqlBuilder.append("fromsavacc.id as fromSavingsAccountId, fromsavacc.account_no as fromSavingsAccountNo,");
|
sqlBuilder.append("fromsavacc.id as fromSavingsAccountId, fromsavacc.account_no as fromSavingsAccountNo,");
|
||||||
|
sqlBuilder.append("fromloanacc.id as fromLoanAccountId, fromloanacc.account_no as fromLoanAccountNo,");
|
||||||
sqlBuilder.append("tosavacc.id as toSavingsAccountId, tosavacc.account_no as toSavingsAccountNo,");
|
sqlBuilder.append("tosavacc.id as toSavingsAccountId, tosavacc.account_no as toSavingsAccountNo,");
|
||||||
sqlBuilder.append("toloanacc.id as toLoanAccountId, toloanacc.account_no as toLoanAccountNo,");
|
sqlBuilder.append("toloanacc.id as toLoanAccountId, toloanacc.account_no as toLoanAccountNo,");
|
||||||
sqlBuilder.append("fromsavtran.id as fromSavingsAccountTransactionId,");
|
sqlBuilder.append("fromsavtran.id as fromSavingsAccountTransactionId,");
|
||||||
@@ -260,6 +261,7 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers
|
|||||||
sqlBuilder.append("join m_client fromclient on fromclient.id = sat.from_client_id ");
|
sqlBuilder.append("join m_client fromclient on fromclient.id = sat.from_client_id ");
|
||||||
sqlBuilder.append("join m_client toclient on toclient.id = sat.to_client_id ");
|
sqlBuilder.append("join m_client toclient on toclient.id = sat.to_client_id ");
|
||||||
sqlBuilder.append("left join m_savings_account fromsavacc on fromsavacc.id = sat.from_savings_account_id ");
|
sqlBuilder.append("left join m_savings_account fromsavacc on fromsavacc.id = sat.from_savings_account_id ");
|
||||||
|
sqlBuilder.append("left join m_savings_account fromloanacc on fromloanacc.id = sat.from_loan_account_id ");
|
||||||
sqlBuilder.append("left join m_savings_account tosavacc on tosavacc.id = sat.to_savings_account_id ");
|
sqlBuilder.append("left join m_savings_account tosavacc on tosavacc.id = sat.to_savings_account_id ");
|
||||||
sqlBuilder.append("left join m_loan toloanacc on toloanacc.id = sat.to_loan_account_id ");
|
sqlBuilder.append("left join m_loan toloanacc on toloanacc.id = sat.to_loan_account_id ");
|
||||||
sqlBuilder.append("left join m_savings_account_transaction fromsavtran on fromsavtran.id = sat.from_savings_transaction_id ");
|
sqlBuilder.append("left join m_savings_account_transaction fromsavtran on fromsavtran.id = sat.from_savings_transaction_id ");
|
||||||
@@ -307,11 +309,20 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers
|
|||||||
final String toClientName = rs.getString("toClientName");
|
final String toClientName = rs.getString("toClientName");
|
||||||
final ClientData toClient = ClientData.lookup(toClientId, toClientName, toOfficeId, toOfficeName);
|
final ClientData toClient = ClientData.lookup(toClientId, toClientName, toOfficeId, toOfficeName);
|
||||||
|
|
||||||
final EnumOptionData fromAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.SAVINGS);
|
|
||||||
|
|
||||||
final Long fromSavingsAccountId = JdbcSupport.getLong(rs, "fromSavingsAccountId");
|
final Long fromSavingsAccountId = JdbcSupport.getLong(rs, "fromSavingsAccountId");
|
||||||
final String fromSavingsAccountNo = rs.getString("fromSavingsAccountNo");
|
final String fromSavingsAccountNo = rs.getString("fromSavingsAccountNo");
|
||||||
final PortfolioAccountData fromSavingsAccount = PortfolioAccountData.lookup(fromSavingsAccountId, fromSavingsAccountNo);
|
final Long fromLoanAccountId = JdbcSupport.getLong(rs, "fromLoanAccountId");
|
||||||
|
final String fromLoanAccountNo = rs.getString("fromLoanAccountNo");
|
||||||
|
PortfolioAccountData fromAccount = null;
|
||||||
|
EnumOptionData fromAccountType = null;
|
||||||
|
if(fromSavingsAccountId != null){
|
||||||
|
fromAccount = PortfolioAccountData.lookup(fromSavingsAccountId, fromSavingsAccountNo);
|
||||||
|
fromAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.SAVINGS);
|
||||||
|
}else if(fromLoanAccountId != null){
|
||||||
|
fromAccount = PortfolioAccountData.lookup(fromLoanAccountId, fromLoanAccountNo);
|
||||||
|
fromAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.LOAN);
|
||||||
|
}
|
||||||
|
|
||||||
PortfolioAccountData toAccount = null;
|
PortfolioAccountData toAccount = null;
|
||||||
EnumOptionData toAccountType = null;
|
EnumOptionData toAccountType = null;
|
||||||
@@ -329,7 +340,21 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers
|
|||||||
}
|
}
|
||||||
|
|
||||||
return AccountTransferData.instance(id, reversed, transferDate, currency, transferAmount, transferDescription, fromOffice,
|
return AccountTransferData.instance(id, reversed, transferDate, currency, transferAmount, transferDescription, fromOffice,
|
||||||
toOffice, fromClient, toClient, fromAccountType, fromSavingsAccount, toAccountType, toAccount);
|
toOffice, fromClient, toClient, fromAccountType, fromAccount, toAccountType, toAccount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAccountTransfer(Long transactionId, PortfolioAccountType accountType) {
|
||||||
|
StringBuilder sql = new StringBuilder("select count(*) from m_savings_account_transfer at where ");
|
||||||
|
if (accountType.isLoanAccount()) {
|
||||||
|
sql.append("at.from_loan_transaction_id=").append(transactionId).append(" or at.to_loan_transaction_id=").append(transactionId);
|
||||||
|
} else {
|
||||||
|
sql.append("at.from_savings_transaction_id=").append(transactionId).append(" or at.to_savings_transaction_id=").append(transactionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = this.jdbcTemplate.queryForInt(sql.toString());
|
||||||
|
return count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+8
-4
@@ -11,6 +11,7 @@ import java.util.Collection;
|
|||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import org.mifosplatform.infrastructure.codes.data.CodeValueData;
|
import org.mifosplatform.infrastructure.codes.data.CodeValueData;
|
||||||
import org.mifosplatform.organisation.monetary.data.CurrencyData;
|
import org.mifosplatform.organisation.monetary.data.CurrencyData;
|
||||||
|
import org.mifosplatform.portfolio.account.data.AccountTransferData;
|
||||||
import org.mifosplatform.portfolio.paymentdetail.data.PaymentDetailData;
|
import org.mifosplatform.portfolio.paymentdetail.data.PaymentDetailData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +36,7 @@ public class LoanTransactionData {
|
|||||||
private final BigDecimal feeChargesPortion;
|
private final BigDecimal feeChargesPortion;
|
||||||
private final BigDecimal penaltyChargesPortion;
|
private final BigDecimal penaltyChargesPortion;
|
||||||
private final String externalId;
|
private final String externalId;
|
||||||
|
private final AccountTransferData transfer;
|
||||||
|
|
||||||
// templates
|
// templates
|
||||||
final Collection<CodeValueData> paymentTypeOptions;
|
final Collection<CodeValueData> paymentTypeOptions;
|
||||||
@@ -44,21 +46,22 @@ public class LoanTransactionData {
|
|||||||
loanTransactionData.type, loanTransactionData.paymentDetailData, loanTransactionData.currency, loanTransactionData.date,
|
loanTransactionData.type, loanTransactionData.paymentDetailData, loanTransactionData.currency, loanTransactionData.date,
|
||||||
loanTransactionData.amount, loanTransactionData.principalPortion, loanTransactionData.interestPortion,
|
loanTransactionData.amount, loanTransactionData.principalPortion, loanTransactionData.interestPortion,
|
||||||
loanTransactionData.feeChargesPortion, loanTransactionData.penaltyChargesPortion, paymentTypeOptions,
|
loanTransactionData.feeChargesPortion, loanTransactionData.penaltyChargesPortion, paymentTypeOptions,
|
||||||
loanTransactionData.externalId);
|
loanTransactionData.externalId,loanTransactionData.transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanTransactionData(final Long id, final Long officeId, final String officeName, final LoanTransactionEnumData transactionType,
|
public LoanTransactionData(final Long id, final Long officeId, final String officeName, final LoanTransactionEnumData transactionType,
|
||||||
final PaymentDetailData paymentDetailData, final CurrencyData currency, final LocalDate date, final BigDecimal amount,
|
final PaymentDetailData paymentDetailData, final CurrencyData currency, final LocalDate date, final BigDecimal amount,
|
||||||
final BigDecimal principalPortion, final BigDecimal interestPortion, final BigDecimal feeChargesPortion,
|
final BigDecimal principalPortion, final BigDecimal interestPortion, final BigDecimal feeChargesPortion,
|
||||||
final BigDecimal penaltyChargesPortion, final String externalId) {
|
final BigDecimal penaltyChargesPortion, final String externalId, AccountTransferData transfer) {
|
||||||
this(id, officeId, officeName, transactionType, paymentDetailData, currency, date, amount, principalPortion, interestPortion,
|
this(id, officeId, officeName, transactionType, paymentDetailData, currency, date, amount, principalPortion, interestPortion,
|
||||||
feeChargesPortion, penaltyChargesPortion, null, externalId);
|
feeChargesPortion, penaltyChargesPortion, null, externalId,transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanTransactionData(final Long id, final Long officeId, final String officeName, final LoanTransactionEnumData transactionType,
|
public LoanTransactionData(final Long id, final Long officeId, final String officeName, final LoanTransactionEnumData transactionType,
|
||||||
final PaymentDetailData paymentDetailData, final CurrencyData currency, final LocalDate date, final BigDecimal amount,
|
final PaymentDetailData paymentDetailData, final CurrencyData currency, final LocalDate date, final BigDecimal amount,
|
||||||
final BigDecimal principalPortion, final BigDecimal interestPortion, final BigDecimal feeChargesPortion,
|
final BigDecimal principalPortion, final BigDecimal interestPortion, final BigDecimal feeChargesPortion,
|
||||||
final BigDecimal penaltyChargesPortion, final Collection<CodeValueData> paymentTypeOptions, final String externalId) {
|
final BigDecimal penaltyChargesPortion, final Collection<CodeValueData> paymentTypeOptions, final String externalId,
|
||||||
|
final AccountTransferData transfer) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.officeId = officeId;
|
this.officeId = officeId;
|
||||||
this.officeName = officeName;
|
this.officeName = officeName;
|
||||||
@@ -73,6 +76,7 @@ public class LoanTransactionData {
|
|||||||
this.penaltyChargesPortion = penaltyChargesPortion;
|
this.penaltyChargesPortion = penaltyChargesPortion;
|
||||||
this.paymentTypeOptions = paymentTypeOptions;
|
this.paymentTypeOptions = paymentTypeOptions;
|
||||||
this.externalId = externalId;
|
this.externalId = externalId;
|
||||||
|
this.transfer = transfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate dateOf() {
|
public LocalDate dateOf() {
|
||||||
|
|||||||
+3
-2
@@ -32,6 +32,7 @@ import org.mifosplatform.organisation.monetary.data.CurrencyData;
|
|||||||
import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
||||||
import org.mifosplatform.organisation.monetary.domain.Money;
|
import org.mifosplatform.organisation.monetary.domain.Money;
|
||||||
import org.mifosplatform.organisation.office.domain.Office;
|
import org.mifosplatform.organisation.office.domain.Office;
|
||||||
|
import org.mifosplatform.portfolio.account.data.AccountTransferData;
|
||||||
import org.mifosplatform.portfolio.loanaccount.data.LoanTransactionData;
|
import org.mifosplatform.portfolio.loanaccount.data.LoanTransactionData;
|
||||||
import org.mifosplatform.portfolio.loanaccount.data.LoanTransactionEnumData;
|
import org.mifosplatform.portfolio.loanaccount.data.LoanTransactionEnumData;
|
||||||
import org.mifosplatform.portfolio.loanproduct.service.LoanEnumerations;
|
import org.mifosplatform.portfolio.loanproduct.service.LoanEnumerations;
|
||||||
@@ -395,7 +396,7 @@ public final class LoanTransaction extends AbstractPersistable<Long> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanTransactionData toData(final CurrencyData currencyData) {
|
public LoanTransactionData toData(final CurrencyData currencyData,final AccountTransferData transfer) {
|
||||||
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(this.typeOf);
|
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(this.typeOf);
|
||||||
PaymentDetailData paymentDetailData = null;
|
PaymentDetailData paymentDetailData = null;
|
||||||
if (this.paymentDetail != null) {
|
if (this.paymentDetail != null) {
|
||||||
@@ -403,7 +404,7 @@ public final class LoanTransaction extends AbstractPersistable<Long> {
|
|||||||
}
|
}
|
||||||
return new LoanTransactionData(this.getId(), this.office.getId(), this.office.getName(), transactionType, paymentDetailData,
|
return new LoanTransactionData(this.getId(), this.office.getId(), this.office.getName(), transactionType, paymentDetailData,
|
||||||
currencyData, getTransactionDate(), this.amount, this.principalPortion, this.interestPortion, this.feeChargesPortion,
|
currencyData, getTransactionDate(), this.amount, this.principalPortion, this.interestPortion, this.feeChargesPortion,
|
||||||
this.penaltyChargesPortion, this.externalId);
|
this.penaltyChargesPortion, this.externalId, transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> toMapData(final CurrencyData currencyData) {
|
public Map<String, Object> toMapData(final CurrencyData currencyData) {
|
||||||
|
|||||||
+99
-8
@@ -31,6 +31,7 @@ import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
|||||||
import org.mifosplatform.organisation.monetary.domain.Money;
|
import org.mifosplatform.organisation.monetary.domain.Money;
|
||||||
import org.mifosplatform.organisation.staff.data.StaffData;
|
import org.mifosplatform.organisation.staff.data.StaffData;
|
||||||
import org.mifosplatform.organisation.staff.service.StaffReadPlatformService;
|
import org.mifosplatform.organisation.staff.service.StaffReadPlatformService;
|
||||||
|
import org.mifosplatform.portfolio.account.data.AccountTransferData;
|
||||||
import org.mifosplatform.portfolio.accountdetails.service.AccountEnumerations;
|
import org.mifosplatform.portfolio.accountdetails.service.AccountEnumerations;
|
||||||
import org.mifosplatform.portfolio.calendar.data.CalendarData;
|
import org.mifosplatform.portfolio.calendar.data.CalendarData;
|
||||||
import org.mifosplatform.portfolio.calendar.domain.CalendarEntityType;
|
import org.mifosplatform.portfolio.calendar.domain.CalendarEntityType;
|
||||||
@@ -329,7 +330,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
final Collection<CodeValueData> paymentOptions = codeValueReadPlatformService
|
final Collection<CodeValueData> paymentOptions = codeValueReadPlatformService
|
||||||
.retrieveCodeValuesByCode(PaymentDetailConstants.paymentTypeCodeName);
|
.retrieveCodeValuesByCode(PaymentDetailConstants.paymentTypeCodeName);
|
||||||
return new LoanTransactionData(null, null, null, transactionType, null, currencyData, earliestUnpaidInstallmentDate,
|
return new LoanTransactionData(null, null, null, transactionType, null, currencyData, earliestUnpaidInstallmentDate,
|
||||||
possibleNextRepaymentAmount.getAmount(), null, null, null, null, paymentOptions, null);
|
possibleNextRepaymentAmount.getAmount(), null, null, null, null, paymentOptions, null,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -353,7 +354,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
|
|
||||||
final BigDecimal amount = waiveOfInterest.getAmount(currency).getAmount();
|
final BigDecimal amount = waiveOfInterest.getAmount(currency).getAmount();
|
||||||
return new LoanTransactionData(null, null, null, transactionType, null, currencyData, waiveOfInterest.getTransactionDate(), amount,
|
return new LoanTransactionData(null, null, null, transactionType, null, currencyData, waiveOfInterest.getTransactionDate(), amount,
|
||||||
null, null, null, null, null);
|
null, null, null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -363,7 +364,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
|
|
||||||
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(LoanTransactionType.WRITEOFF);
|
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(LoanTransactionType.WRITEOFF);
|
||||||
return new LoanTransactionData(null, null, null, transactionType, null, null, DateUtils.getLocalDateOfTenant(), null, null, null,
|
return new LoanTransactionData(null, null, null, transactionType, null, null, DateUtils.getLocalDateOfTenant(), null, null, null,
|
||||||
null, null, null);
|
null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -374,7 +375,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
final Collection<CodeValueData> paymentOptions = codeValueReadPlatformService
|
final Collection<CodeValueData> paymentOptions = codeValueReadPlatformService
|
||||||
.retrieveCodeValuesByCode(PaymentDetailConstants.paymentTypeCodeName);
|
.retrieveCodeValuesByCode(PaymentDetailConstants.paymentTypeCodeName);
|
||||||
return new LoanTransactionData(null, null, null, transactionType, null, null, loan.getExpectedDisbursedOnLocalDate(), null, null,
|
return new LoanTransactionData(null, null, null, transactionType, null, null, loan.getExpectedDisbursedOnLocalDate(), null, null,
|
||||||
null, null, null, paymentOptions, null);
|
null, null, null, paymentOptions, null,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -394,7 +395,12 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
|
|
||||||
if (transaction.isNotBelongingToLoanOf(loan)) { throw new LoanTransactionNotFoundException(transactionId, loanId); }
|
if (transaction.isNotBelongingToLoanOf(loan)) { throw new LoanTransactionNotFoundException(transactionId, loanId); }
|
||||||
|
|
||||||
return transaction.toData(currencyData);
|
LoanTransactionsAccountTransferMapper trasfermapper = new LoanTransactionsAccountTransferMapper();
|
||||||
|
String sql = "select "
|
||||||
|
+ trasfermapper.accountTransferSchema()
|
||||||
|
+ " where tr.loan_id = ? and tr.id = ?";
|
||||||
|
AccountTransferData accountTransferData = this.jdbcTemplate.queryForObject(sql, trasfermapper, loanId, transactionId);
|
||||||
|
return transaction.toData(currencyData,accountTransferData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class LoanMapper implements RowMapper<LoanAccountData> {
|
private static final class LoanMapper implements RowMapper<LoanAccountData> {
|
||||||
@@ -861,12 +867,20 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
+ " pd.receipt_number as receiptNumber, pd.bank_number as bankNumber,pd.routing_code as routingCode, "
|
+ " pd.receipt_number as receiptNumber, pd.bank_number as bankNumber,pd.routing_code as routingCode, "
|
||||||
+ " l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc.`name` as currencyName, "
|
+ " l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc.`name` as currencyName, "
|
||||||
+ " rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode, "
|
+ " rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode, "
|
||||||
+ " cv.code_value as paymentTypeName, tr.external_id as externalId, tr.office_id as officeId, office.name as officeName "
|
+ " cv.code_value as paymentTypeName, tr.external_id as externalId, tr.office_id as officeId, office.name as officeName, "
|
||||||
|
+ " fromtran.id as fromTransferId, fromtran.is_reversed as fromTransferReversed,"
|
||||||
|
+ " fromtran.transaction_date as fromTransferDate, fromtran.amount as fromTransferAmount,"
|
||||||
|
+ " fromtran.description as fromTransferDescription,"
|
||||||
|
+ " totran.id as toTransferId, totran.is_reversed as toTransferReversed,"
|
||||||
|
+ " totran.transaction_date as toTransferDate, totran.amount as toTransferAmount,"
|
||||||
|
+ " totran.description as toTransferDescription "
|
||||||
+ " from m_loan l join m_loan_transaction tr on tr.loan_id = l.id"
|
+ " from m_loan l join m_loan_transaction tr on tr.loan_id = l.id"
|
||||||
+ " join m_currency rc on rc.`code` = l.currency_code "
|
+ " join m_currency rc on rc.`code` = l.currency_code "
|
||||||
+ " left JOIN m_payment_detail pd ON tr.payment_detail_id = pd.id"
|
+ " left JOIN m_payment_detail pd ON tr.payment_detail_id = pd.id"
|
||||||
+ " left join m_code_value cv on pd.payment_type_cv_id = cv.id"
|
+ " left join m_code_value cv on pd.payment_type_cv_id = cv.id"
|
||||||
+ " left join m_office office on office.id=tr.office_id";
|
+ " left join m_office office on office.id=tr.office_id"
|
||||||
|
+ " left join m_savings_account_transfer fromtran on fromtran.from_loan_transaction_id = tr.id "
|
||||||
|
+ " left join m_savings_account_transfer totran on totran.to_loan_transaction_id = tr.id ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -911,11 +925,88 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
final BigDecimal penaltyChargesPortion = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "penalties");
|
final BigDecimal penaltyChargesPortion = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "penalties");
|
||||||
final String externalId = rs.getString("externalId");
|
final String externalId = rs.getString("externalId");
|
||||||
|
|
||||||
|
AccountTransferData transfer = null;
|
||||||
|
final Long fromTransferId = JdbcSupport.getLong(rs, "fromTransferId");
|
||||||
|
final Long toTransferId = JdbcSupport.getLong(rs, "toTransferId");
|
||||||
|
if (fromTransferId != null) {
|
||||||
|
final LocalDate fromTransferDate = JdbcSupport.getLocalDate(rs, "fromTransferDate");
|
||||||
|
final BigDecimal fromTransferAmount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "fromTransferAmount");
|
||||||
|
final boolean fromTransferReversed = rs.getBoolean("fromTransferReversed");
|
||||||
|
final String fromTransferDescription = rs.getString("fromTransferDescription");
|
||||||
|
|
||||||
|
transfer = AccountTransferData.transferBasicDetails(fromTransferId, currencyData, fromTransferAmount, fromTransferDate,
|
||||||
|
fromTransferDescription, fromTransferReversed);
|
||||||
|
} else if (toTransferId != null) {
|
||||||
|
final LocalDate toTransferDate = JdbcSupport.getLocalDate(rs, "toTransferDate");
|
||||||
|
final BigDecimal toTransferAmount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "toTransferAmount");
|
||||||
|
final boolean toTransferReversed = rs.getBoolean("toTransferReversed");
|
||||||
|
final String toTransferDescription = rs.getString("toTransferDescription");
|
||||||
|
|
||||||
|
transfer = AccountTransferData.transferBasicDetails(toTransferId, currencyData, toTransferAmount, toTransferDate,
|
||||||
|
toTransferDescription, toTransferReversed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return new LoanTransactionData(id, officeId, officeName, transactionType, paymentDetailData, currencyData, date, totalAmount,
|
return new LoanTransactionData(id, officeId, officeName, transactionType, paymentDetailData, currencyData, date, totalAmount,
|
||||||
principalPortion, interestPortion, feeChargesPortion, penaltyChargesPortion, externalId);
|
principalPortion, interestPortion, feeChargesPortion, penaltyChargesPortion, externalId, transfer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final class LoanTransactionsAccountTransferMapper implements RowMapper<AccountTransferData> {
|
||||||
|
|
||||||
|
public String accountTransferSchema() {
|
||||||
|
|
||||||
|
return " l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc.`name` as currencyName, "
|
||||||
|
+ " rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode, "
|
||||||
|
+ " fromtran.id as fromTransferId, fromtran.is_reversed as fromTransferReversed,"
|
||||||
|
+ " fromtran.transaction_date as fromTransferDate, fromtran.amount as fromTransferAmount,"
|
||||||
|
+ " fromtran.description as fromTransferDescription,"
|
||||||
|
+ " totran.id as toTransferId, totran.is_reversed as toTransferReversed,"
|
||||||
|
+ " totran.transaction_date as toTransferDate, totran.amount as toTransferAmount,"
|
||||||
|
+ " totran.description as toTransferDescription "
|
||||||
|
+ " from m_loan l join m_loan_transaction tr on tr.loan_id = l.id"
|
||||||
|
+ " join m_currency rc on rc.`code` = l.currency_code "
|
||||||
|
+ " left join m_savings_account_transfer fromtran on fromtran.from_loan_transaction_id = tr.id "
|
||||||
|
+ " left join m_savings_account_transfer totran on totran.to_loan_transaction_id = tr.id ";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AccountTransferData mapRow(final ResultSet rs, @SuppressWarnings("unused") final int rowNum) throws SQLException {
|
||||||
|
|
||||||
|
final String currencyCode = rs.getString("currencyCode");
|
||||||
|
final String currencyName = rs.getString("currencyName");
|
||||||
|
final String currencyNameCode = rs.getString("currencyNameCode");
|
||||||
|
final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
|
||||||
|
final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits");
|
||||||
|
final Integer inMultiplesOf = JdbcSupport.getInteger(rs, "inMultiplesOf");
|
||||||
|
final CurrencyData currencyData = new CurrencyData(currencyCode, currencyName, currencyDigits, inMultiplesOf,
|
||||||
|
currencyDisplaySymbol, currencyNameCode);
|
||||||
|
|
||||||
|
AccountTransferData transfer = null;
|
||||||
|
final Long fromTransferId = JdbcSupport.getLong(rs, "fromTransferId");
|
||||||
|
final Long toTransferId = JdbcSupport.getLong(rs, "toTransferId");
|
||||||
|
if (fromTransferId != null) {
|
||||||
|
final LocalDate fromTransferDate = JdbcSupport.getLocalDate(rs, "fromTransferDate");
|
||||||
|
final BigDecimal fromTransferAmount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "fromTransferAmount");
|
||||||
|
final boolean fromTransferReversed = rs.getBoolean("fromTransferReversed");
|
||||||
|
final String fromTransferDescription = rs.getString("fromTransferDescription");
|
||||||
|
|
||||||
|
transfer = AccountTransferData.transferBasicDetails(fromTransferId, currencyData, fromTransferAmount, fromTransferDate,
|
||||||
|
fromTransferDescription, fromTransferReversed);
|
||||||
|
} else if (toTransferId != null) {
|
||||||
|
final LocalDate toTransferDate = JdbcSupport.getLocalDate(rs, "toTransferDate");
|
||||||
|
final BigDecimal toTransferAmount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "toTransferAmount");
|
||||||
|
final boolean toTransferReversed = rs.getBoolean("toTransferReversed");
|
||||||
|
final String toTransferDescription = rs.getString("toTransferDescription");
|
||||||
|
|
||||||
|
transfer = AccountTransferData.transferBasicDetails(toTransferId, currencyData, toTransferAmount, toTransferDate,
|
||||||
|
toTransferDescription, toTransferReversed);
|
||||||
|
}
|
||||||
|
return transfer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LoanAccountData retrieveLoanProductDetailsTemplate(final Long productId) {
|
public LoanAccountData retrieveLoanProductDetailsTemplate(final Long productId) {
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -21,6 +21,7 @@ import org.mifosplatform.infrastructure.configuration.domain.ConfigurationDomain
|
|||||||
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
||||||
import org.mifosplatform.infrastructure.core.data.CommandProcessingResult;
|
import org.mifosplatform.infrastructure.core.data.CommandProcessingResult;
|
||||||
import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder;
|
import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder;
|
||||||
|
import org.mifosplatform.infrastructure.core.exception.PlatformServiceUnavailableException;
|
||||||
import org.mifosplatform.infrastructure.jobs.annotation.CronTarget;
|
import org.mifosplatform.infrastructure.jobs.annotation.CronTarget;
|
||||||
import org.mifosplatform.infrastructure.jobs.service.JobName;
|
import org.mifosplatform.infrastructure.jobs.service.JobName;
|
||||||
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
||||||
@@ -35,6 +36,7 @@ import org.mifosplatform.organisation.staff.domain.Staff;
|
|||||||
import org.mifosplatform.organisation.workingdays.domain.WorkingDays;
|
import org.mifosplatform.organisation.workingdays.domain.WorkingDays;
|
||||||
import org.mifosplatform.organisation.workingdays.domain.WorkingDaysRepositoryWrapper;
|
import org.mifosplatform.organisation.workingdays.domain.WorkingDaysRepositoryWrapper;
|
||||||
import org.mifosplatform.portfolio.account.PortfolioAccountType;
|
import org.mifosplatform.portfolio.account.PortfolioAccountType;
|
||||||
|
import org.mifosplatform.portfolio.account.service.AccountTransfersReadPlatformService;
|
||||||
import org.mifosplatform.portfolio.account.service.AccountTransfersWritePlatformService;
|
import org.mifosplatform.portfolio.account.service.AccountTransfersWritePlatformService;
|
||||||
import org.mifosplatform.portfolio.accountdetails.domain.AccountType;
|
import org.mifosplatform.portfolio.accountdetails.domain.AccountType;
|
||||||
import org.mifosplatform.portfolio.calendar.domain.Calendar;
|
import org.mifosplatform.portfolio.calendar.domain.Calendar;
|
||||||
@@ -115,6 +117,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
private final WorkingDaysRepositoryWrapper workingDaysRepository;
|
private final WorkingDaysRepositoryWrapper workingDaysRepository;
|
||||||
private final LoanProductReadPlatformService loanProductReadPlatformService;
|
private final LoanProductReadPlatformService loanProductReadPlatformService;
|
||||||
private final AccountTransfersWritePlatformService accountTransfersWritePlatformService;
|
private final AccountTransfersWritePlatformService accountTransfersWritePlatformService;
|
||||||
|
private final AccountTransfersReadPlatformService accountTransfersReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public LoanWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
public LoanWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
||||||
@@ -129,7 +132,8 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
final PaymentDetailWritePlatformService paymentDetailWritePlatformService, final HolidayRepository holidayRepository,
|
final PaymentDetailWritePlatformService paymentDetailWritePlatformService, final HolidayRepository holidayRepository,
|
||||||
final ConfigurationDomainService configurationDomainService, final WorkingDaysRepositoryWrapper workingDaysRepository,
|
final ConfigurationDomainService configurationDomainService, final WorkingDaysRepositoryWrapper workingDaysRepository,
|
||||||
final LoanProductReadPlatformService loanProductReadPlatformService,
|
final LoanProductReadPlatformService loanProductReadPlatformService,
|
||||||
final AccountTransfersWritePlatformService accountTransfersWritePlatformService) {
|
final AccountTransfersWritePlatformService accountTransfersWritePlatformService,
|
||||||
|
final AccountTransfersReadPlatformService accountTransfersReadPlatformService) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.loanEventApiJsonValidator = loanEventApiJsonValidator;
|
this.loanEventApiJsonValidator = loanEventApiJsonValidator;
|
||||||
this.loanAssembler = loanAssembler;
|
this.loanAssembler = loanAssembler;
|
||||||
@@ -150,6 +154,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
this.workingDaysRepository = workingDaysRepository;
|
this.workingDaysRepository = workingDaysRepository;
|
||||||
this.loanProductReadPlatformService = loanProductReadPlatformService;
|
this.loanProductReadPlatformService = loanProductReadPlatformService;
|
||||||
this.accountTransfersWritePlatformService = accountTransfersWritePlatformService;
|
this.accountTransfersWritePlatformService = accountTransfersWritePlatformService;
|
||||||
|
this.accountTransfersReadPlatformService = accountTransfersReadPlatformService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoanLifecycleStateMachine defaultLoanLifecycleStateMachine() {
|
private LoanLifecycleStateMachine defaultLoanLifecycleStateMachine() {
|
||||||
@@ -429,6 +434,10 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
final LoanTransaction transactionToAdjust = this.loanTransactionRepository.findOne(transactionId);
|
final LoanTransaction transactionToAdjust = this.loanTransactionRepository.findOne(transactionId);
|
||||||
if (transactionToAdjust == null) { throw new LoanTransactionNotFoundException(transactionId); }
|
if (transactionToAdjust == null) { throw new LoanTransactionNotFoundException(transactionId); }
|
||||||
|
|
||||||
|
if(accountTransfersReadPlatformService.isAccountTransfer(transactionId, PortfolioAccountType.LOAN)){
|
||||||
|
throw new PlatformServiceUnavailableException("error.msg.loan.transfer.transaction.update.not.allowed","Loan transaction:"+transactionId+" update not allowed as it involves in account transfer",transactionId);
|
||||||
|
}
|
||||||
|
|
||||||
final LocalDate transactionDate = command.localDateValueOfParameterNamed("transactionDate");
|
final LocalDate transactionDate = command.localDateValueOfParameterNamed("transactionDate");
|
||||||
final BigDecimal transactionAmount = command.bigDecimalValueOfParameterNamed("transactionAmount");
|
final BigDecimal transactionAmount = command.bigDecimalValueOfParameterNamed("transactionAmount");
|
||||||
final String txnExternalId = command.stringValueOfParameterNamedAllowingNull("externalId");
|
final String txnExternalId = command.stringValueOfParameterNamedAllowingNull("externalId");
|
||||||
|
|||||||
+16
-2
@@ -27,6 +27,7 @@ import org.mifosplatform.infrastructure.core.data.CommandProcessingResult;
|
|||||||
import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder;
|
import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder;
|
||||||
import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
|
import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
|
||||||
import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException;
|
import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException;
|
||||||
|
import org.mifosplatform.infrastructure.core.exception.PlatformServiceUnavailableException;
|
||||||
import org.mifosplatform.infrastructure.core.service.DateUtils;
|
import org.mifosplatform.infrastructure.core.service.DateUtils;
|
||||||
import org.mifosplatform.infrastructure.jobs.annotation.CronTarget;
|
import org.mifosplatform.infrastructure.jobs.annotation.CronTarget;
|
||||||
import org.mifosplatform.infrastructure.jobs.service.JobName;
|
import org.mifosplatform.infrastructure.jobs.service.JobName;
|
||||||
@@ -34,6 +35,8 @@ import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext
|
|||||||
import org.mifosplatform.organisation.monetary.domain.ApplicationCurrency;
|
import org.mifosplatform.organisation.monetary.domain.ApplicationCurrency;
|
||||||
import org.mifosplatform.organisation.monetary.domain.ApplicationCurrencyRepositoryWrapper;
|
import org.mifosplatform.organisation.monetary.domain.ApplicationCurrencyRepositoryWrapper;
|
||||||
import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
||||||
|
import org.mifosplatform.portfolio.account.PortfolioAccountType;
|
||||||
|
import org.mifosplatform.portfolio.account.service.AccountTransfersReadPlatformService;
|
||||||
import org.mifosplatform.portfolio.client.domain.Client;
|
import org.mifosplatform.portfolio.client.domain.Client;
|
||||||
import org.mifosplatform.portfolio.client.exception.ClientNotActiveException;
|
import org.mifosplatform.portfolio.client.exception.ClientNotActiveException;
|
||||||
import org.mifosplatform.portfolio.group.domain.Group;
|
import org.mifosplatform.portfolio.group.domain.Group;
|
||||||
@@ -72,6 +75,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
private final JournalEntryWritePlatformService journalEntryWritePlatformService;
|
private final JournalEntryWritePlatformService journalEntryWritePlatformService;
|
||||||
private final SavingsAccountDomainService savingsAccountDomainService;
|
private final SavingsAccountDomainService savingsAccountDomainService;
|
||||||
private final NoteRepository noteRepository;
|
private final NoteRepository noteRepository;
|
||||||
|
private final AccountTransfersReadPlatformService accountTransfersReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public SavingsAccountWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
public SavingsAccountWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
||||||
@@ -82,7 +86,8 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
final PaymentDetailWritePlatformService paymentDetailWritePlatformService,
|
final PaymentDetailWritePlatformService paymentDetailWritePlatformService,
|
||||||
final ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper,
|
final ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper,
|
||||||
final JournalEntryWritePlatformService journalEntryWritePlatformService,
|
final JournalEntryWritePlatformService journalEntryWritePlatformService,
|
||||||
final SavingsAccountDomainService savingsAccountDomainService, final NoteRepository noteRepository) {
|
final SavingsAccountDomainService savingsAccountDomainService, final NoteRepository noteRepository,
|
||||||
|
final AccountTransfersReadPlatformService accountTransfersReadPlatformService) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.savingAccountRepository = savingAccountRepository;
|
this.savingAccountRepository = savingAccountRepository;
|
||||||
this.savingsAccountTransactionRepository = savingsAccountTransactionRepository;
|
this.savingsAccountTransactionRepository = savingsAccountTransactionRepository;
|
||||||
@@ -93,6 +98,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
this.journalEntryWritePlatformService = journalEntryWritePlatformService;
|
this.journalEntryWritePlatformService = journalEntryWritePlatformService;
|
||||||
this.savingsAccountDomainService = savingsAccountDomainService;
|
this.savingsAccountDomainService = savingsAccountDomainService;
|
||||||
this.noteRepository = noteRepository;
|
this.noteRepository = noteRepository;
|
||||||
|
this.accountTransfersReadPlatformService = accountTransfersReadPlatformService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -300,6 +306,10 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
transactionId, savingsId);
|
transactionId, savingsId);
|
||||||
if (savingsAccountTransaction == null) { throw new SavingsAccountTransactionNotFoundException(savingsId, transactionId); }
|
if (savingsAccountTransaction == null) { throw new SavingsAccountTransactionNotFoundException(savingsId, transactionId); }
|
||||||
|
|
||||||
|
if(accountTransfersReadPlatformService.isAccountTransfer(transactionId, PortfolioAccountType.SAVINGS)){
|
||||||
|
throw new PlatformServiceUnavailableException("error.msg.saving.account.transfer.transaction.update.not.allowed","Savings account transaction:"+transactionId+" update not allowed as it involves in account transfer",transactionId);
|
||||||
|
}
|
||||||
|
|
||||||
final LocalDate today = DateUtils.getLocalDateOfTenant();
|
final LocalDate today = DateUtils.getLocalDateOfTenant();
|
||||||
final MathContext mc = new MathContext(15, RoundingMode.HALF_EVEN);
|
final MathContext mc = new MathContext(15, RoundingMode.HALF_EVEN);
|
||||||
|
|
||||||
@@ -337,6 +347,10 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
|
|
||||||
if (!(savingsAccountTransaction.isDeposit() || savingsAccountTransaction.isWithdrawal()) || savingsAccountTransaction.isReversed()) { throw new TransactionUpdateNotAllowedException(
|
if (!(savingsAccountTransaction.isDeposit() || savingsAccountTransaction.isWithdrawal()) || savingsAccountTransaction.isReversed()) { throw new TransactionUpdateNotAllowedException(
|
||||||
savingsId, transactionId); }
|
savingsId, transactionId); }
|
||||||
|
|
||||||
|
if(accountTransfersReadPlatformService.isAccountTransfer(transactionId, PortfolioAccountType.SAVINGS)){
|
||||||
|
throw new PlatformServiceUnavailableException("error.msg.saving.account.transfer.transaction.update.not.allowed","Savings account transaction:"+transactionId+" update not allowed as it involves in account transfer",transactionId);
|
||||||
|
}
|
||||||
this.savingsAccountTransactionDataValidator.validate(command);
|
this.savingsAccountTransactionDataValidator.validate(command);
|
||||||
|
|
||||||
final LocalDate today = DateUtils.getLocalDateOfTenant();
|
final LocalDate today = DateUtils.getLocalDateOfTenant();
|
||||||
@@ -361,7 +375,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
//for undo withdrawal fee
|
//for undo withdrawal fee
|
||||||
SavingsAccountTransaction nextSavingsAccountTransaction = this.savingsAccountTransactionRepository.findOneByIdAndSavingsAccountId(
|
SavingsAccountTransaction nextSavingsAccountTransaction = this.savingsAccountTransactionRepository.findOneByIdAndSavingsAccountId(
|
||||||
transactionId+1, savingsId);
|
transactionId+1, savingsId);
|
||||||
if(nextSavingsAccountTransaction.isWithdrawalFeeAndNotReversed()){
|
if(nextSavingsAccountTransaction!=null && nextSavingsAccountTransaction.isWithdrawalFeeAndNotReversed()){
|
||||||
account.undoTransaction(transactionId+1, existingReversedTransactionIds);
|
account.undoTransaction(transactionId+1, existingReversedTransactionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user