diff --git a/CHANGELOG.md b/CHANGELOG.md index d75591329..26f4bd99d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ See VERSIONING (https://github.com/openMF/mifosx/blob/master/VERSIONING.md) for Releases =============== + +1. 12 Dec 2013 - 1.15.2.RELEASE 1. 04 Dec 2013 - 1.15.1.RELEASE 1. 01 Dec 2013 - 1.15.0.RELEASE 1. 21 Nov 2013 - 1.14.0.RELEASE @@ -51,13 +53,27 @@ Releases 1. 05 April 2013 - 0.11.1.beta 1. 05 April 2013 - 0.11.0.beta + + +1.15.2.RELEASE +============= +Bug Release + +Bugs + - [MIFOSX-816] - Future loan amounts should be with respect to Loan cycle (not to be confused with borrower cycle) + - [MIFOSX-818] - Not able to retrieve Global Configurations through API + - [MIFOSX-820] - Fix spelling mistakes in permissions for better Display on community app + - [MIFOSX-821] - Null pointer exception while disbursing the loan + - [MIFOSX-822] - Backdated transaction that results in transaction reversals does not create journal entries for new transactions + + 1.15.1.RELEASE ============= Bug Release Bugs - [MIFOSX-801] - Clean up implementation of [MIFOSX-765] - - MIFOSX-805] - Terms vary based on loan cycle is not getting updated in Edit Loan Product page. + - [MIFOSX-805] - Terms vary based on loan cycle is not getting updated in Edit Loan Product page. - [MIFOSX-810] - Unhandled API error while creating multiple users with same name - [MIFOSX-811] - Repayment schedule dates for Loan disbursement after undo disbursal is not proper - [MIFOSX-744] - Implementation of mifosx-735 should be optional diff --git a/INSTALL.md b/INSTALL.md index 637d07230..4e35fa4e5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -12,7 +12,7 @@ The release artifact (.zip file) has the following structure: + api-docs ... folder contains html based documentation on the platform API for this release + database ... folder contains database setup and upgrade scripts required for installation + pentahoReports ... folder contains any out-of-the-box reports provided through pentaho - + apps ... folder contains apps like reference app that speak to the platform + + apps ... folder contains apps like reference app and community app that speak to the platform | -- CHANGELOG.MD ... file documents changelog of project up to this release -- CONTRIBUTORS.MD ... file provides details on contributors to project @@ -221,10 +221,12 @@ The two ways to get up and running with mifos platform is: Drop the following from the release artifact into [TOMCAT_HOME]/webapps/ROOT folder: - The entire ```apps/IndividualLendingGeneralJavaScript``` folder + - The entire ```apps/community-app``` folder. This contains a preview version of the community-app which will soon deprecate the older Reference app (IndividualLendingGeneralJavaScript) - The entire api-docs folder #### 2.3.7 Startup tomcat Startup tomcat: - Platform application should be available @ https://[server ip address]:8443/mifosng-provider/api/v1/offices?tenantIdentifier=default&pretty=true - Reference application should be available @ https://[server ip address]:8443/IndividualLendingGeneralJavaScript/IndivLendHome.html?baseApiUrl=https://[server ip address]:8443/mifosng-provider/api/v1/ + - Preview version of the Community application should be available @ https://[server ip address]:8443/community-app?baseApiUrl=https://[server ip address]:8443/mifosng-provider/api/v1/ (Refresh the Browser if you see untranslated labels while loading the application for the first time) - API docs should be available @ https://[server ip address]:8443/api-docs/apiLive.htm diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index ab6eed3ed..6526774d7 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -90,7 +90,7 @@
- +

Overview

diff --git a/mifosng-provider/gradle.properties b/mifosng-provider/gradle.properties index 7136494e2..3a567cec6 100644 --- a/mifosng-provider/gradle.properties +++ b/mifosng-provider/gradle.properties @@ -1,3 +1,4 @@ -releaseVersion=1.16.0.DEVELOP +releaseVersion=1.16.0.RELEASE + diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java index 442e7c60a..8d7728244 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java @@ -64,9 +64,9 @@ public class LoanScheduleCalculationPlatformServiceImpl implements LoanScheduleC final Long groupId = this.fromJsonHelper.extractLongNamed("groupId", query.parsedJson()); Integer cycleNumber = 0; if (clientId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId, loanProduct.getId()); } else if (groupId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue()); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue(), loanProduct.getId()); } this.loanProductCommandFromApiJsonDeserializer.validateMinMaxConstraints(query.parsedJson(), baseDataValidator, loanProduct, cycleNumber); diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index 6356d6155..d78039c7d 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -180,9 +180,9 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa final Long groupId = this.fromJsonHelper.extractLongNamed("groupId", command.parsedJson()); Integer cycleNumber = 0; if (clientId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId, loanProduct.getId()); } else if (groupId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue()); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue(), loanProduct.getId()); } this.loanProductCommandFromApiJsonDeserializer.validateMinMaxConstraints(command.parsedJson(), baseDataValidator, loanProduct, cycleNumber); @@ -314,9 +314,9 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa final Long groupId = this.fromJsonHelper.extractLongNamed("groupId", command.parsedJson()); Integer cycleNumber = 0; if (clientId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(clientId, loanProduct.getId()); } else if (groupId != null) { - cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue()); + cycleNumber = this.loanReadPlatformService.retriveLoanCounter(groupId, AccountType.GROUP.getValue(), loanProduct.getId()); } this.loanProductCommandFromApiJsonDeserializer.validateMinMaxConstraints(command.parsedJson(), baseDataValidator, loanProduct, cycleNumber); diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformService.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformService.java index a14b047c5..f4321cb57 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformService.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformService.java @@ -62,7 +62,7 @@ public interface LoanReadPlatformService { */ Collection retrieveAllLoansWithOverdueInstallmentsNotAlreadyPenalized(final Long penaltyWaitPeriod); - Integer retriveLoanCounter(Long groupId, Integer loanType); + Integer retriveLoanCounter(Long groupId, Integer loanType, Long productId); - Integer retriveLoanCounter(Long clientId); + Integer retriveLoanCounter(Long clientId, Long productId); } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index b7161e181..e1af7f225 100755 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -1067,9 +1067,9 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { Integer loanCycleCounter = null; if (loanProduct.useBorrowerCycle()) { if (clientId == null) { - loanCycleCounter = retriveLoanCounter(groupId, AccountType.GROUP.getValue()); + loanCycleCounter = retriveLoanCounter(groupId, AccountType.GROUP.getValue(), loanProduct.getId()); } else { - loanCycleCounter = retriveLoanCounter(clientId); + loanCycleCounter = retriveLoanCounter(clientId, loanProduct.getId()); } } return LoanAccountData.loanProductWithTemplateDefaults(loanProduct, loanTermFrequencyTypeOptions, repaymentFrequencyTypeOptions, @@ -1161,14 +1161,14 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { } @Override - public Integer retriveLoanCounter(final Long groupId, final Integer loanType) { - final String sql = "Select MAX(l.loan_counter) from m_loan l where l.group_id = ? " + " and l.loan_type_enum = ?"; - return this.jdbcTemplate.queryForInt(sql, groupId, loanType); + public Integer retriveLoanCounter(final Long groupId, final Integer loanType, Long productId) { + final String sql = "Select MAX(l.loan_product_counter) from m_loan l where l.group_id = ? and l.loan_type_enum = ? and l.product_id=?"; + return this.jdbcTemplate.queryForInt(sql, groupId, loanType,productId); } @Override - public Integer retriveLoanCounter(final Long clientId) { - final String sql = "Select MAX(l.loan_counter) from m_loan l where l.client_id = ?"; - return this.jdbcTemplate.queryForInt(sql, clientId); + public Integer retriveLoanCounter(final Long clientId, Long productId) { + final String sql = "Select MAX(l.loan_product_counter) from m_loan l where l.client_id = ? and l.product_id=?"; + return this.jdbcTemplate.queryForInt(sql, clientId,productId); } } \ No newline at end of file diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanproduct/domain/LoanProduct.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanproduct/domain/LoanProduct.java index f13bafb30..660da76aa 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanproduct/domain/LoanProduct.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/loanproduct/domain/LoanProduct.java @@ -680,20 +680,31 @@ public class LoanProduct extends AbstractPersistable { public Map fetchBorrowerCycleVariationsForCycleNumber(final Integer cycleNumber) { Map borrowerCycleVariations = new HashMap(); borrowerCycleVariations.put(LoanProductConstants.principal, this.loanProductRelatedDetail.getPrincipal().getAmount()); - borrowerCycleVariations.put(LoanProductConstants.minPrincipal, this.loanProductMinMaxConstraints.getMinPrincipal()); - borrowerCycleVariations.put(LoanProductConstants.maxPrincipal, this.loanProductMinMaxConstraints.getMaxPrincipal()); borrowerCycleVariations.put(LoanProductConstants.interestRatePerPeriod, this.loanProductRelatedDetail.getNominalInterestRatePerPeriod()); - borrowerCycleVariations.put(LoanProductConstants.minInterestRatePerPeriod, - this.loanProductMinMaxConstraints.getMinNominalInterestRatePerPeriod()); - borrowerCycleVariations.put(LoanProductConstants.maxInterestRatePerPeriod, - this.loanProductMinMaxConstraints.getMaxNominalInterestRatePerPeriod()); - borrowerCycleVariations.put(LoanProductConstants.numberOfRepayments, - BigDecimal.valueOf(this.loanProductRelatedDetail.getNumberOfRepayments())); - borrowerCycleVariations.put(LoanProductConstants.minNumberOfRepayments, - BigDecimal.valueOf(this.loanProductMinMaxConstraints.getMinNumberOfRepayments())); - borrowerCycleVariations.put(LoanProductConstants.maxNumberOfRepayments, - BigDecimal.valueOf(this.loanProductMinMaxConstraints.getMaxNumberOfRepayments())); + if(this.loanProductRelatedDetail.getNumberOfRepayments() != null){ + borrowerCycleVariations.put(LoanProductConstants.numberOfRepayments, + BigDecimal.valueOf(this.loanProductRelatedDetail.getNumberOfRepayments())); + } + + if(this.loanProductMinMaxConstraints !=null){ + borrowerCycleVariations.put(LoanProductConstants.minPrincipal, this.loanProductMinMaxConstraints.getMinPrincipal()); + borrowerCycleVariations.put(LoanProductConstants.maxPrincipal, this.loanProductMinMaxConstraints.getMaxPrincipal()); + borrowerCycleVariations.put(LoanProductConstants.minInterestRatePerPeriod, + this.loanProductMinMaxConstraints.getMinNominalInterestRatePerPeriod()); + borrowerCycleVariations.put(LoanProductConstants.maxInterestRatePerPeriod, + this.loanProductMinMaxConstraints.getMaxNominalInterestRatePerPeriod()); + + if(this.loanProductMinMaxConstraints.getMinNumberOfRepayments() != null){ + borrowerCycleVariations.put(LoanProductConstants.minNumberOfRepayments, + BigDecimal.valueOf(this.loanProductMinMaxConstraints.getMinNumberOfRepayments())); + } + + if(this.loanProductMinMaxConstraints.getMaxNumberOfRepayments() != null){ + borrowerCycleVariations.put(LoanProductConstants.maxNumberOfRepayments, + BigDecimal.valueOf(this.loanProductMinMaxConstraints.getMaxNumberOfRepayments())); + } + } if (cycleNumber > 0) { Integer principalCycleUsed = 0; Integer interestCycleUsed = 0;