Merge branch 'FINERACT-406' into develop

This commit is contained in:
Nazeer Hussain Shaik
2017-03-07 13:03:05 +05:30
2 changed files with 5 additions and 5 deletions
@@ -301,7 +301,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
"loanIdToClose is invalid, Currency code is different."); "loanIdToClose is invalid, Currency code is different.");
} }
final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate(); final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate();
if(!newLoanApplication.getDisbursementDate().isAfter(lastUserTransactionOnLoanToClose)){ if(newLoanApplication.getDisbursementDate().isBefore(lastUserTransactionOnLoanToClose)){
throw new GeneralPlatformDomainRuleException( throw new GeneralPlatformDomainRuleException(
"error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed", "error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed",
"Disbursal date of this loan application "+newLoanApplication.getDisbursementDate() "Disbursal date of this loan application "+newLoanApplication.getDisbursementDate()
@@ -710,7 +710,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
"loanIdToClose is invalid, Currency code is different."); "loanIdToClose is invalid, Currency code is different.");
} }
final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate(); final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate();
if(!existingLoanApplication.getDisbursementDate().isAfter(lastUserTransactionOnLoanToClose)){ if(existingLoanApplication.getDisbursementDate().isBefore(lastUserTransactionOnLoanToClose)){
throw new GeneralPlatformDomainRuleException( throw new GeneralPlatformDomainRuleException(
"error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed", "error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed",
"Disbursal date of this loan application "+existingLoanApplication.getDisbursementDate() "Disbursal date of this loan application "+existingLoanApplication.getDisbursementDate()
@@ -1123,7 +1123,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
} }
final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate(); final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate();
if(!loan.getDisbursementDate().isAfter(lastUserTransactionOnLoanToClose)){ if(loan.getDisbursementDate().isBefore(lastUserTransactionOnLoanToClose)){
throw new GeneralPlatformDomainRuleException( throw new GeneralPlatformDomainRuleException(
"error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed", "error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed",
"Disbursal date of this loan application "+loan.getDisbursementDate() "Disbursal date of this loan application "+loan.getDisbursementDate()
@@ -1376,4 +1376,4 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
} }
} }
} }
@@ -317,7 +317,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
"Loan to be closed with this topup is not active."); "Loan to be closed with this topup is not active.");
} }
final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate(); final LocalDate lastUserTransactionOnLoanToClose = loanToClose.getLastUserTransactionDate();
if(!loan.getDisbursementDate().isAfter(lastUserTransactionOnLoanToClose)){ if(loan.getDisbursementDate().isBefore(lastUserTransactionOnLoanToClose)){
throw new GeneralPlatformDomainRuleException( throw new GeneralPlatformDomainRuleException(
"error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed", "error.msg.loan.disbursal.date.should.be.after.last.transaction.date.of.loan.to.be.closed",
"Disbursal date of this loan application "+loan.getDisbursementDate() "Disbursal date of this loan application "+loan.getDisbursementDate()