Return-Path: X-Original-To: apmail-fineract-dev-archive@minotaur.apache.org Delivered-To: apmail-fineract-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9427A184CD for ; Tue, 19 Apr 2016 12:27:28 +0000 (UTC) Received: (qmail 18255 invoked by uid 500); 19 Apr 2016 12:27:28 -0000 Delivered-To: apmail-fineract-dev-archive@fineract.apache.org Received: (qmail 18219 invoked by uid 500); 19 Apr 2016 12:27:28 -0000 Mailing-List: contact dev-help@fineract.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fineract.incubator.apache.org Delivered-To: mailing list dev@fineract.incubator.apache.org Received: (qmail 18203 invoked by uid 99); 19 Apr 2016 12:27:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 12:27:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1287DC0BC3 for ; Tue, 19 Apr 2016 12:27:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 8zIeGixCna31 for ; Tue, 19 Apr 2016 12:27:26 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 606935F241 for ; Tue, 19 Apr 2016 12:27:26 +0000 (UTC) Received: (qmail 17970 invoked by uid 99); 19 Apr 2016 12:27:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 12:27:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CD0712C1F5D for ; Tue, 19 Apr 2016 12:27:25 +0000 (UTC) Date: Tue, 19 Apr 2016 12:27:25 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@fineract.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FINERACT-60) Improvements to Interest Compounding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FINERACT-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15247648#comment-15247648 ] ASF GitHub Bot commented on FINERACT-60: ---------------------------------------- Github user pramodn02 commented on a diff in the pull request: https://github.com/apache/incubator-fineract/pull/63#discussion_r60220623 --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java --- @@ -711,9 +699,67 @@ public CommandProcessingResult modifyApplication(final Long loanId, final JsonCo this.calendarInstanceRepository.save(calendarInstance); } - } else if (ciList != null && !ciList.isEmpty()) { - final CalendarInstance calendarInstance = ciList.get(0); - this.calendarInstanceRepository.delete(calendarInstance); + } else { + if (ciList != null && !ciList.isEmpty()) { + final CalendarInstance existingCalendarInstance = ciList.get(0); + final boolean isCalendarAssociatedWithEntity = this.calendarReadPlatformService.isCalendarAssociatedWithEntity( --- End diff -- As per the code this will always returns true since you are passing all values from the calendar instance (which is retrieved from DB). can you please let me know if you are getting false with any scenario? > Improvements to Interest Compounding > ------------------------------------ > > Key: FINERACT-60 > URL: https://issues.apache.org/jira/browse/FINERACT-60 > Project: Apache Fineract > Issue Type: Improvement > Components: Loan > Reporter: Binny Gopinath Sreevas > Assignee: Markus Geiss > Attachments: Samples_ForInterestCompounding.xlsx > > > Currently, Fineract expects the interest compounding frequency to match with the disbursement date or repayment date. Many financial institutions may follow a different date. For example: Loan disbursed on 12th December 2015, repayments falling on every 5th but interest compounded on the last day of each month is a common approach that many commercial banks follow. > Many organizations that follow interest compounding also expect the "interest compounding" to be recorded as an explicit transaction. The means that the interest will be "capitalized" on the compounding date. > For supporting this, the following enhancements are needed: > a) Allow meeting dates, loan repayment dates, interest compounding day and Date for Principal Outstanding Recalculation to fall on one of the following calendar patterns: > the last day of the month > the first, second, third, fourth weekday (Mon, Tue, Wed etc) of the month > the last weekday (Mon, Tue, Wed etc) of the month > b) At product level, if compounding is enabled for interest and/or fee: then allow user to specify a flag specifying if such compounding of interest should be stored as an explicit transaction against the loan or not > c) If the above flag is enabled then: > - at the time of creation of a backdated loan, then post compounding entries till today as an explicit transaction that will increase the loan outstanding balance. > d) If the above flag is enabled then: > - a batch job will post the entries for interest/fee compounding and will increase the loan outstanding balance. > e) Currently the system allows users to specify for each loan, a date for starting interest compounding and a date for starting recalculating loan outstanding balance. The system can default this based on the disbursement date and the frequency at which this recurrence is specified, rather than allowing user to specify it. (the upgrade script will have a data migration SQL script which will ensure that any existing data in the old format is moved into the new format when specifying such recurrence pattern) > f) Some financial institutions want the interest compounding to happen on the last day of the month. And since this job is expected to run as an EOD job, then the interest posted should include the interest for 30th. Include a new parameter at the product level to specify if interest calculations for compounding should include the current date or not. > In other words - interest calculated for repayments (which is an intra-day transaction) will not include interest current date > However, interest compounding (which is an EOD transaction) will include interest for the current date. > The above enhancement will not impact loans: > i) without interest recalculations and without interest compounding enabled > ii) with interest compounding period as "Same as repayment period" and Rest frequency either as "Daily" or as "Same as repayment" > The above enhancement will impact the way interest is calculated on monthly or weekly compounding frequencies. > Example calculations are attached in Excel sheets. -- This message was sent by Atlassian JIRA (v6.3.4#6332)