fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] incubator-fineract git commit: issue 205 for jlg change of disbursement date at time of disbursement
Date Fri, 05 May 2017 13:05:31 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 2efae80c1 -> 0c658956b


issue 205 for jlg change of disbursement date at time of disbursement


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/6c60d84a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/6c60d84a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/6c60d84a

Branch: refs/heads/develop
Commit: 6c60d84a85311561c1eaa84cfd38c7628af05b2e
Parents: 8baf9f4
Author: nazeer1100126 <nazeer.shaik@confluxtechnologies.com>
Authored: Wed May 3 16:26:59 2017 +0530
Committer: nazeer1100126 <nazeer.shaik@confluxtechnologies.com>
Committed: Wed May 3 16:26:59 2017 +0530

----------------------------------------------------------------------
 .../org/apache/fineract/portfolio/loanaccount/domain/Loan.java | 6 +++++-
 .../service/LoanWritePlatformServiceJpaRepositoryImpl.java     | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/6c60d84a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
index 56eba26..0c3d05d 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java
@@ -3874,7 +3874,11 @@ public class Loan extends AbstractPersistableCustom<Long> {
         return disbursementDate;
     }
 
-    public LocalDate getWrittenOffDate() {
+	public void setActualDisbursementDate(Date actualDisbursementDate) {
+		this.actualDisbursementDate = actualDisbursementDate;
+	}
+
+	public LocalDate getWrittenOffDate() {
         LocalDate writtenOffDate = null;
         if (this.writtenOffOnDate != null) {
             writtenOffDate = new LocalDate(this.writtenOffOnDate);

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/6c60d84a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
index abb6353..836b314 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
@@ -257,6 +257,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
         final Loan loan = this.loanAssembler.assembleFrom(loanId);
         
         final LocalDate actualDisbursementDate = command.localDateValueOfParameterNamed("actualDisbursementDate");
+        
         // validate ActualDisbursement Date Against Expected Disbursement Date
         LoanProduct loanProduct = loan.loanProduct();
         if(loanProduct.syncExpectedWithDisbursementDate()){
@@ -274,6 +275,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
         checkForProductMixRestrictions(loan);
         
         LocalDate recalculateFrom = null;
+        loan.setActualDisbursementDate(actualDisbursementDate.toDate());
         ScheduleGeneratorDTO scheduleGeneratorDTO = this.loanUtilService.buildScheduleGeneratorDTO(loan,
recalculateFrom);
 
         // validate actual disbursement date against meeting date
@@ -678,6 +680,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
         final ApplicationCurrency applicationCurrency = this.applicationCurrencyRepository.findOneWithNotFoundDetection(currency);
 
         final LocalDate recalculateFrom = null;
+        loan.setActualDisbursementDate(null);
         ScheduleGeneratorDTO scheduleGeneratorDTO = this.loanUtilService.buildScheduleGeneratorDTO(loan,
recalculateFrom);
 
         final Map<String, Object> changes = loan.undoDisbursal(scheduleGeneratorDTO,
existingTransactionIds,


Mime
View raw message