Package org.mifosplatform.organisation.monetary.domain

Examples of org.mifosplatform.organisation.monetary.domain.Money.plus()


                        amount = amount.add(totalInterestChargedForFullLoanTerm.getAmount());
                    } else {
                        amount = amount.add(principalDisbursed.getAmount());
                    }
                    BigDecimal loanChargeAmt = amount.multiply(loanCharge.getPercentage()).divide(BigDecimal.valueOf(100));
                    cumulative = cumulative.plus(loanChargeAmt);
                } else if (loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
                    cumulative = cumulative.plus(loanCharge.amount());
                }
            }
        }
View Full Code Here


                        amount = amount.add(principalDisbursed.getAmount());
                    }
                    BigDecimal loanChargeAmt = amount.multiply(loanCharge.getPercentage()).divide(BigDecimal.valueOf(100));
                    cumulative = cumulative.plus(loanChargeAmt);
                } else if (loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
                    cumulative = cumulative.plus(loanCharge.amount());
                }
            }
        }

        return cumulative;
View Full Code Here

            }
            if (!isBeforeFirstInstallment) {
                for (LoanRepaymentScheduleInstallment installment : scheduleInstallments) {
                    principalUnprocessed = principalUnprocessed.plus(installment.getPrincipalOutstanding(currency));
                    interestUnprocessed = interestUnprocessed.plus(installment.getInterestOutstanding(currency));
                    feeUnprocessed = feeUnprocessed.plus(installment.getFeeChargesOutstanding(currency));
                    feeUnprocessed = feeUnprocessed.plus(installment.getPenaltyChargesOutstanding(currency));
                }
            }
            if (interestUnprocessed.isLessThan(loanTransaction.getAmount(currency))) {
                LoanRepaymentScheduleInstallment lastProcessedInstallment = scheduleInstallments.get(scheduleInstallments.size() - 1);
View Full Code Here

            if (!isBeforeFirstInstallment) {
                for (LoanRepaymentScheduleInstallment installment : scheduleInstallments) {
                    principalUnprocessed = principalUnprocessed.plus(installment.getPrincipalOutstanding(currency));
                    interestUnprocessed = interestUnprocessed.plus(installment.getInterestOutstanding(currency));
                    feeUnprocessed = feeUnprocessed.plus(installment.getFeeChargesOutstanding(currency));
                    feeUnprocessed = feeUnprocessed.plus(installment.getPenaltyChargesOutstanding(currency));
                }
            }
            if (interestUnprocessed.isLessThan(loanTransaction.getAmount(currency))) {
                LoanRepaymentScheduleInstallment lastProcessedInstallment = scheduleInstallments.get(scheduleInstallments.size() - 1);
                LocalDate startDate = lastProcessedInstallment.getDueDate();
View Full Code Here

                    totalOutstanding = installment.getTotalOutstanding(currency);
                    if (totalOutstanding.isGreaterThanZero()) {
                        Money latepaymentoutstanding = installment.getPrincipalOutstanding(currency);
                        switch (loanApplicationTerms.getInterestRecalculationCompoundingMethod()) {
                            case INTEREST:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getInterestOutstanding(currency));
                            break;
                            case INTEREST_AND_FEE:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getInterestOutstanding(currency))
                                        .plus(installment.getFeeChargesOutstanding(currency))
                                        .plus(installment.getPenaltyChargesOutstanding(currency));
View Full Code Here

                        switch (loanApplicationTerms.getInterestRecalculationCompoundingMethod()) {
                            case INTEREST:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getInterestOutstanding(currency));
                            break;
                            case INTEREST_AND_FEE:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getInterestOutstanding(currency))
                                        .plus(installment.getFeeChargesOutstanding(currency))
                                        .plus(installment.getPenaltyChargesOutstanding(currency));
                            break;
                            case FEE:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getFeeChargesOutstanding(currency)).plus(
View Full Code Here

                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getInterestOutstanding(currency))
                                        .plus(installment.getFeeChargesOutstanding(currency))
                                        .plus(installment.getPenaltyChargesOutstanding(currency));
                            break;
                            case FEE:
                                latepaymentoutstanding = latepaymentoutstanding.plus(installment.getFeeChargesOutstanding(currency)).plus(
                                        installment.getPenaltyChargesOutstanding(currency));
                            break;

                            default:
                            break;
View Full Code Here

                            break;
                            default:
                            break;
                        }
                        BigDecimal loanChargeAmt = amount.multiply(loanCharge.getPercentage()).divide(BigDecimal.valueOf(100));
                        cumulative = cumulative.plus(loanChargeAmt);
                    }
                }
            }
        }
View Full Code Here

            final MonetaryCurrency monetaryCurrency) {
        Money cumulative = Money.zero(monetaryCurrency);
        for (final LoanCharge loanCharge : loanCharges) {
            if (loanCharge.isPenaltyCharge()) {
                if (loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
                    cumulative = cumulative.plus(loanCharge.chargeAmount());
                }
            }
        }
        return cumulative;
    }
View Full Code Here

                    totalPrincipal = totalPrincipal.plus(currentInstallment.getPrincipalOutstanding(currency));
                    totalInterest = totalInterest.plus(currentInstallment.getInterestOutstanding(currency));
                    feeCharges = feeCharges.plus(currentInstallment.getFeeChargesOutstanding(currency));
                    penaltyCharges = penaltyCharges.plus(currentInstallment.getPenaltyChargesOutstanding(currency));
                } else {
                    principalOutstanding = principalOutstanding.plus(currentInstallment.getPrincipal(currency));
                    totalPrincipal = totalPrincipal.minus(currentInstallment.getPrincipalCompleted(currency));
                    totalInterest = totalInterest.minus(currentInstallment.getInterestPaid(currency)).minus(
                            currentInstallment.getInterestWaived(currency));
                    if (currentInstallment.getFromDate().isBefore(periodStartDate)) {
                        if (!isInterestRepayment) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.