Merge pull request #1614 from venkatconflux/MIFOSX-2481

MIFOSX-2481 : Adding Tranche - Branch Closure Issue Resolved
This commit is contained in:
pramod
2016-01-20 16:52:17 +05:30
3 changed files with 10 additions and 10 deletions
@@ -4759,8 +4759,8 @@ public class Loan extends AbstractPersistable<Long> {
}
public ChangedTransactionDetail updateDisbursementDateAndAmountForTranche(final LoanDisbursementDetails disbursementDetails,
final JsonCommand command, final List<Long> existingTransactionIds, final List<Long> existingReversedTransactionIds,
final Map<String, Object> actualChanges, final ScheduleGeneratorDTO scheduleGeneratorDTO, final AppUser currentUser) {
final JsonCommand command,final Map<String, Object> actualChanges, final ScheduleGeneratorDTO scheduleGeneratorDTO,
final AppUser currentUser) {
final Locale locale = command.extractLocale();
validateAccountStatus(LoanEvent.LOAN_EDIT_MULTI_DISBURSE_DATE);
final BigDecimal principal = command.bigDecimalValueOfParameterNamed(LoanApiConstants.updatedDisbursementPrincipalParameterName,
@@ -4774,8 +4774,6 @@ public class Loan extends AbstractPersistable<Long> {
command.stringValueOfParameterNamed(LoanApiConstants.disbursementIdParameterName));
actualChanges.put(LoanApiConstants.disbursementPrincipalParameterName,
command.bigDecimalValueOfParameterNamed(LoanApiConstants.disbursementPrincipalParameterName, locale));
existingTransactionIds.addAll(findExistingTransactionIds());
existingReversedTransactionIds.addAll(findExistingReversedTransactionIds());
Collection<LoanDisbursementDetails> loanDisburseDetails = this.getDisbursementDetails();
BigDecimal setPrincipalAmount = BigDecimal.ZERO;
@@ -2484,6 +2484,8 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
LoanDisbursementDetails loanDisbursementDetails) {
final List<Long> existingTransactionIds = new ArrayList<>();
final List<Long> existingReversedTransactionIds = new ArrayList<>();
existingTransactionIds.addAll(loan.findExistingTransactionIds());
existingReversedTransactionIds.addAll(loan.findExistingReversedTransactionIds());
final Map<String, Object> changes = new LinkedHashMap<>();
LocalDate recalculateFrom = null;
ScheduleGeneratorDTO scheduleGeneratorDTO = this.loanUtilService.buildScheduleGeneratorDTO(loan, recalculateFrom);
@@ -2494,7 +2496,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
if (command.entityId() != null) {
changedTransactionDetail = loan.updateDisbursementDateAndAmountForTranche(loanDisbursementDetails, command,
existingTransactionIds, existingReversedTransactionIds, changes, scheduleGeneratorDTO, currentUser);
changes, scheduleGeneratorDTO, currentUser);
} else {
// BigDecimal setAmount = loan.getApprovedPrincipal();
Collection<LoanDisbursementDetails> loanDisburseDetails = loan.getDisbursementDetails();
@@ -1,8 +1,8 @@
ALTER TABLE `m_savings_account`
ADD COLUMN `nominal_annual_interest_rate_overdraft` DECIMAL(19,6) NULL DEFAULT NULL AFTER `overdraft_limit`,
ADD COLUMN `total_overdraft_interest_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_interest_posted_derived`,
ADD COLUMN `min_overdraft_for_interest_calculation` DECIMAL(19,6) NULL DEFAULT NULL AFTER `nominal_annual_interest_rate_overdraft`;
ADD COLUMN `nominal_annual_interest_rate_overdraft` DECIMAL(19,6) NULL DEFAULT 0 AFTER `overdraft_limit`,
ADD COLUMN `total_overdraft_interest_derived` DECIMAL(19,6) NULL DEFAULT 0 AFTER `total_interest_posted_derived`,
ADD COLUMN `min_overdraft_for_interest_calculation` DECIMAL(19,6) NULL DEFAULT 0 AFTER `nominal_annual_interest_rate_overdraft`;
ALTER TABLE `m_savings_product`
ADD COLUMN `nominal_annual_interest_rate_overdraft` DECIMAL(19,6) NULL DEFAULT NULL AFTER `overdraft_limit`,
ADD COLUMN `min_overdraft_for_interest_calculation` DECIMAL(19,6) NULL DEFAULT NULL AFTER `nominal_annual_interest_rate_overdraft`;
ADD COLUMN `nominal_annual_interest_rate_overdraft` DECIMAL(19,6) NULL DEFAULT 0 AFTER `overdraft_limit`,
ADD COLUMN `min_overdraft_for_interest_calculation` DECIMAL(19,6) NULL DEFAULT 0 AFTER `nominal_annual_interest_rate_overdraft`;