fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [2/4] incubator-fineract git commit: FINERACT-98:fix for deleting a tranche
Date Mon, 28 Mar 2016 11:11:08 GMT
FINERACT-98:fix for deleting a tranche


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

Branch: refs/heads/develop
Commit: 3c69d35da78d30902002c2c1cba5c54438584402
Parents: 9c38078
Author: sachinkulkarni12 <sachin.kulkarni@confluxtechnologies.com>
Authored: Fri Mar 25 11:01:55 2016 +0530
Committer: sachinkulkarni12 <sachin.kulkarni@confluxtechnologies.com>
Committed: Fri Mar 25 11:01:55 2016 +0530

----------------------------------------------------------------------
 .../org/apache/fineract/portfolio/loanaccount/domain/Loan.java   | 2 +-
 .../apache/fineract/portfolio/loanaccount/domain/LoanCharge.java | 1 +
 .../loanaccount/domain/LoanTrancheDisbursementCharge.java        | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/3c69d35d/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 ebc2b6c..e152d72 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
@@ -4982,7 +4982,7 @@ public class Loan extends AbstractPersistable<Long> {
 
     private LoanScheduleDTO getRecalculatedSchedule(final ScheduleGeneratorDTO generatorDTO)
{
 
-        if (!this.repaymentScheduleDetail().isInterestRecalculationEnabled() || isNpa ||
!isOpen()) { return null; }
+        if (!this.repaymentScheduleDetail().isInterestRecalculationEnabled() || isNpa) {
return null; }
         final InterestMethod interestMethod = this.loanRepaymentScheduleDetail.getInterestMethod();
         final LoanScheduleGenerator loanScheduleGenerator = generatorDTO.getLoanScheduleFactory().create(interestMethod);
 

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/3c69d35d/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java
index d76cf08..ee2c382 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java
@@ -865,6 +865,7 @@ public class LoanCharge extends AbstractPersistable<Long> {
         this.active = active;
         if (!active) {
             this.overdueInstallmentCharge = null;
+            this.loanTrancheDisbursementCharge = null;
             this.clearLoanInstallmentCharges();
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/3c69d35d/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java
index 64830f9..fa65d0d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java
@@ -29,11 +29,11 @@ import org.springframework.data.jpa.domain.AbstractPersistable;
 @Table(name="m_loan_tranche_disbursement_charge")
 public class LoanTrancheDisbursementCharge extends AbstractPersistable<Long> {
     
-    @ManyToOne(cascade = CascadeType.ALL, optional = false)
+    @ManyToOne
     @JoinColumn(name = "loan_charge_id", referencedColumnName = "id", nullable = false)
     private LoanCharge loancharge;
     
-    @ManyToOne(cascade = CascadeType.ALL, optional = false)
+    @ManyToOne(cascade = CascadeType.PERSIST, optional = false)
     @JoinColumn(name="disbursement_detail_id", referencedColumnName = "id", nullable = false)
     private LoanDisbursementDetails loanDisbursementDetails; 
     


Mime
View raw message