From d20d5b71183020c230bf6431d68d36f3b81bbc3b Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Sat, 18 Nov 2023 16:51:32 -0600 Subject: [PATCH] Advanced payment allocation supports Cumulative or Progressive Loan Schedule --- .../make-account-transfers.component.html | 2 +- .../loan-product-summary.component.html | 905 +++++++++++++++++ .../loan-product-summary.component.scss | 47 + .../loan-product-summary.component.spec.ts | 23 + .../loan-product-summary.component.ts | 218 +++++ .../create-loan-product.component.ts | 2 +- .../edit-loan-product.component.ts | 6 +- .../loan-product-preview-step.component.html | 908 +----------------- .../loan-product-preview-step.component.ts | 22 +- .../loan-product-settings-step.component.html | 144 +-- .../loan-product-settings-step.component.ts | 39 +- .../products/loan-products/loan-products.ts | 12 + .../models/loan-product.model.ts | 164 ++++ .../general-tab/general-tab.component.html | 890 +---------------- .../general-tab/general-tab.component.scss | 26 - .../general-tab/general-tab.component.ts | 17 +- src/app/products/products.module.ts | 4 +- .../transactions-tab.component.ts | 2 +- ...ngs-transaction-general-tab.component.html | 26 +- ...vings-transaction-general-tab.component.ts | 7 + src/app/shared/models/general.model.ts | 71 ++ src/app/shared/models/option-data.model.ts | 10 + 22 files changed, 1624 insertions(+), 1921 deletions(-) create mode 100644 src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html create mode 100644 src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.scss create mode 100644 src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.spec.ts create mode 100644 src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts create mode 100644 src/app/products/loan-products/models/loan-product.model.ts create mode 100644 src/app/shared/models/general.model.ts create mode 100644 src/app/shared/models/option-data.model.ts diff --git a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html index ce0fcc4261..40159f045d 100644 --- a/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html +++ b/src/app/account-transfers/make-account-transfers/make-account-transfers.component.html @@ -116,7 +116,7 @@

{{"labels.heading.Transferred To" | translate}} - {{"labels.inputs.Destination" | translate}} + {{"labels.inputs.Description" | translate}} diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html new file mode 100644 index 0000000000..78286ed563 --- /dev/null +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html @@ -0,0 +1,905 @@ +
+ +

Details

+ + + +
+ Name: + {{ loanProduct.name }} +
+ +
+ Short Name: + {{ loanProduct.shortName }} +
+ +
+ Fund Name: + {{ loanProduct.fundName }} +
+ +
+ Include in Customer Loan Counter: + {{ loanProduct.includeInBorrowerCycle | yesNo }} +
+ +
+ Start Date: + {{ loanProduct.startDate | dateFormat }} +
+ +
+ Close Date: + {{ loanProduct.closeDate | dateFormat }} +
+ +
+ Description: + {{ loanProduct.description }} +
+ +

Currency

+ + + +
+ Currency: + {{ loanProduct.currencyCode | find:loanProductsTemplate.currencyOptions:'code':'name' }} +
+ +
+ Currency: + {{ loanProduct.currency.name }} +
+ +
+ Decimal Places: + {{ loanProduct.currency.decimalPlaces }} +
+ +
+ Currency in multiples of: + {{ loanProduct.currency.inMultiplesOf }} +
+ +
+ Installment in multiples of: + {{ loanProduct.installmentAmountInMultiplesOf }} +
+ +

Terms

+ + + +
+ Principal: + {{ loanProduct.principal | formatNumber }} + (Min {{ (loanProduct.minPrincipal ? loanProduct.minPrincipal : loanProduct.principal) | formatNumber }} + : Max {{ (loanProduct.maxPrincipal ? loanProduct.maxPrincipal : loanProduct.principal) | formatNumber }}) + +
+ +
+ Allow Approved / Disbursed Amounts Over Applied: + {{ loanProduct.allowApprovedDisbursedAmountsOverApplied | yesNo }} +
+ +
+ Over Applied Amount: + {{ loanProduct.overAppliedNumber + | formatNumber + }} % + {{ loanProduct.overAppliedNumber | + formatNumber }} {{ + loanProduct.currencyCode }} +
+ +
+ Installment day calculation from: + {{ loanProduct.repaymentStartDateType.value }} +
+ +
+ Number of Repayments: + {{ loanProduct.numberOfRepayments + ' (Min: ' + (loanProduct.minNumberOfRepayments ? + loanProduct.minNumberOfRepayments : loanProduct.numberOfRepayments) + ', Max: ' + + (loanProduct.maxNumberOfRepayments ? loanProduct.maxNumberOfRepayments : loanProduct.numberOfRepayments) + ')' + }} +
+ +
+ Linked to floating interest rates: + {{ loanProduct.isLinkedToFloatingInterestRates | yesNo }} +
+ +
+ Nominal interest rate: + {{ loanProduct.interestRatePerPeriod + ' (Min: ' + (loanProduct.minInterestRatePerPeriod ? + loanProduct.minInterestRatePerPeriod : loanProduct.interestRatePerPeriod) + ', Max: ' + + (loanProduct.maxInterestRatePerPeriod ? loanProduct.maxInterestRatePerPeriod : loanProduct.interestRatePerPeriod) + + ')' + ' ' + loanProduct.interestRateFrequencyType.value }} +
+ +
+ Floating Lending Interest Rate: + {{ loanProduct.floatingRateName }} + Interest Rate Differential: + {{ loanProduct.interestRateDifferential }} + Floating Interest Rate Calculation Allowed: + {{ loanProduct.isFloatingInterestRateCalculationAllowed | yesNo }} + Floating Interest Rate: + {{ loanProduct.defaultDifferentialLendingRate + ' (Min: ' + + (loanProduct.minDifferentialLendingRate ? loanProduct.minDifferentialLendingRate : + loanProduct.defaultDifferentialLendingRate) + ', Max: ' + (loanProduct.maxDifferentialLendingRate ? + loanProduct.maxDifferentialLendingRate : loanProduct.defaultDifferentialLendingRate) + ')' }} +
+ +
+ Terms vary based on loan cycle: + {{ loanProduct.useBorrowerCycle | yesNo }} +
+ +
+ +

Principal by loan cycle

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Condition + {{ variation.valueConditionType.value }} + Loan Cycle + {{ variation.borrowerCycleNumber }} + Minimum + {{ variation.minValue }} + Default + {{ variation.defaultValue }} + Maximum + {{ variation.maxValue }} +
+ +
+ +
+ +

Number of Repayments by loan cycle

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Condition + {{ variation.valueConditionType.value }} + Loan Cycle + {{ variation.borrowerCycleNumber }} + Minimum + {{ variation.minValue }} + Default + {{ variation.defaultValue }} + Maximum + {{ variation.maxValue }} +
+ +
+ +
+ +

Nominal Interest Rate by loan cycle

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Condition + {{ variation.valueConditionType.value }} + Loan Cycle + {{ variation.borrowerCycleNumber }} + Minimum + {{ variation.minValue }} + Default + {{ variation.defaultValue }} + Maximum + {{ variation.maxValue }} +
+ +
+ +
+ Repay Every: + {{ loanProduct.repaymentEvery + ' ' + loanProduct.repaymentFrequencyType.value }} +
+ +
+ Minimum days between disbursal and first repayment date: + {{ loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment }} +
+ +

Settings

+ + + +
+ Amortization: + {{ loanProduct.amortizationType.value }} +
+ +
+ Is Equal Amortization: + {{ loanProduct.isEqualAmortization | yesNo }} +
+ +
+ Interest Method: + {{ loanProduct.interestType.value }} +
+ +
+ Interest Calculation Period: + {{ loanProduct.interestCalculationPeriodType.value }} +
+ +
+ Allow Partial Interest Calculation with same as repayment: + {{ loanProduct.allowPartialPeriodInterestCalculation | yesNo }} +
+ +

Loan Schedule

+ + + +
+ Repayment Strategy: + {{ loanProduct.transactionProcessingStrategyName }} +
+ +
+ Advanced Payment Allocation Transactions: + + + + + + +
+ +
+ Loan Schedule Type: + {{ loanProduct.loanScheduleType.value }} +
+ +
+ Loan Schedule Processing Type: + {{ loanProduct.loanScheduleProcessingType.value }} +
+ +

Down Payments

+ + + +
+ Enable Down Payments: + {{ loanProduct.enableDownPayment | yesNo }} +
+ +
+ Disbursed Amount Percentage Down Payment (%): + {{ loanProduct.disbursedAmountPercentageForDownPayment }} % +
+ +
+ Enable Auto Repayment for Down Payment: + {{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }} +
+ +
+ Do not extend loan schedule for multi disbursal: + {{ loanProduct.disableScheduleExtensionForDownPayment | yesNo }} +
+ +

Moratorium

+ +
+ Delinquency Bucket: + {{ loanProduct.delinquencyBucket.name }} +
+ +
+ Enable installment level Delinquency: + {{ loanProduct.enableInstallmentLevelDelinquency | yesNo }} +
+ +
+ Grace on principal payment: + {{ loanProduct.graceOnPrincipalPayment }} +
+ +
+ Grace on interest payment: + {{ loanProduct.graceOnInterestPayment }} +
+ +
+ Interest free period: + {{ loanProduct.graceOnInterestCharged }} +
+ +
+ Arrears tolerance: + {{ loanProduct.inArrearsTolerance }} +
+ +
+ Days in year: + {{ loanProduct.daysInYearType.value }} +
+ +
+ Days in month: + {{ loanProduct.daysInMonthType.value }} +
+ +
+ Allow fixing of the installment amount: + {{ loanProduct.canDefineInstallmentAmount | yesNo }} +
+ +
+ Number of days a loan may be overdue before moving into arrears: + {{ loanProduct.graceOnArrearsAgeing }} +
+ +
+ Maximum number of days a loan may be overdue before becoming a NPA (non performing asset): + {{ loanProduct.overdueDaysForNPA }} +
+ +
+ Account moves out of NPA only after all arrears have been cleared: + {{ loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion | yesNo }} +
+ +
+ Principal Threshold (%) for Last Instalment: + {{ loanProduct.principalThresholdForLastInstallment }} +
+ +
+ Variable Installments allowed: + {{ loanProduct.allowVariableInstallments | yesNo }} +
+ +
+ Variable Installments: + {{ '(Min: ' + loanProduct.minimumGap + ', Max: ' + (loanProduct.maximumGap ? + loanProduct.maximumGap : loanProduct.minimumGap) + ')' }} +
+ +
+ Allowed to be used for providing Topup Loans: + {{ loanProduct.canUseForTopup | yesNo }} +
+ +

Interest Recalculation

+ + + +
+ Recalculate Interest: + {{ loanProduct.isInterestRecalculationEnabled | yesNo }} +
+ +
+ Pre-closure interest calculation rule: + {{ loanProduct.interestRecalculationData.preClosureInterestCalculationStrategy.value }} + Advance payments adjustment type: + {{ loanProduct.interestRecalculationData.rescheduleStrategyType.value }} + Interest recalculation compounding on: + {{ loanProduct.interestRecalculationData.interestRecalculationCompoundingType.value }} +
+ Frequency for compounding: + + {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.value }} +   {{ + 'on ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyNthDay?.value }} +   {{ + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyWeekday?.value }} +   {{ + 'on day ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay }} + +
+ Frequency Interval for compounding: + {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyInterval }} +
+
+
+ Frequency for recalculate Outstanding Principal: + + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyType.value }} +   {{ + 'on ' + loanProduct.interestRecalculationData.recalculationRestFrequencyNthDay?.value }} +   {{ + loanProduct.interestRecalculationData.recalculationRestFrequencyWeekday?.value }} +   {{ + 'on day ' + loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay }} + +
+
+ Frequency Interval for recalculation: + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }} +
+ Rest Frequency Date: + {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }} +
+
+
+ Is Arrears recognization based on original schedule: + {{ loanProduct.isArrearsBasedOnOriginalSchedule | yesNo }} +
+
+ +

Guarantee Requirements

+ + + +
+ Place Guarantee Funds On-Hold: + {{ loanProduct.holdGuaranteeFunds | yesNo }} +
+ +
+ Mandatory Guarantee(%): + {{ loanProduct.productGuaranteeData.mandatoryGuarantee }} +
+ Minimum Guarantee from Own Funds(%): + {{ loanProduct.productGuaranteeData.minimumGuaranteeFromOwnFunds }} +
+
+ Minimum Guarantee from Guarantor Funds(%): + {{ loanProduct.productGuaranteeData.minimumGuaranteeFromGuarantor }} +
+
+ +

Loan Tranche Details

+ + + +
+ Enable Multiple Disbursals: + {{ loanProduct.multiDisburseLoan | yesNo }} +
+ +
+ Maximum Tranche count: + {{ loanProduct.maxTrancheCount }} +
+ Maximum allowed outstanding balance: + {{ loanProduct.outstandingLoanBalance }} +
+
+ Disallow Expected Disbursements: + {{ loanProduct.disallowExpectedDisbursements | yesNo }} +
+
+ +

Event Settings

+ +
+ Use the Global Configurations values to the Repayment Event (notifications): + {{ useDueForRepaymentsConfigurations | yesNo }} +
+ +
+ Due days for repayment event: + {{ loanProduct.dueDaysForRepaymentEvent | number }} +
+ +
+ OverDue days for repayment event: + {{ loanProduct.overDueDaysForRepaymentEvent | number }} +
+ +

Configurable Terms and Settings

+ + + +
+ Allow overriding select terms and settings in loan accounts: + {{ loanProduct.allowAttributeConfiguration | yesNo }} +
+ +
+ Amortization: + {{ loanProduct.allowAttributeOverrides.amortizationType | yesNo }} + Interest method: + {{ loanProduct.allowAttributeOverrides.interestType | yesNo }} + Repayment strategy: + {{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode | yesNo }} + Interest calculation period: + {{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType | yesNo }} + Arrears tolerance: + {{ loanProduct.allowAttributeOverrides.inArrearsTolerance | yesNo }} + Repaid every: + {{ loanProduct.allowAttributeOverrides.repaymentEvery | yesNo }} + Moratorium: + {{ loanProduct.allowAttributeOverrides.graceOnPrincipalAndInterestPayment | yesNo }} + Number of days a loan may be overdue before moving into arrears: + {{ loanProduct.allowAttributeOverrides.graceOnArrearsAgeing | yesNo }} +
+ +
+ +

Charges

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + {{ charge.name + ', ' + charge.currency.displaySymbol }} + Type + {{ charge.chargeCalculationType.value }} + Amount + {{ charge.amount }} + Collected On + {{ charge.chargeTimeType.value }} +
+ +

Overdue Charges

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + {{ overdueCharge.name + ', ' + overdueCharge.currency.displaySymbol }} + Type + {{ overdueCharge.chargeCalculationType.value }} + Amount + {{ overdueCharge.amount }} + Collected On + {{ overdueCharge.chargeTimeType.value }} +
+ +
+ +

Accounting

+ + + +
+ Type: + {{ accountingRuleData[accountingRule() - 1] }} +
+ +
+ +

Assets / Liabilities

+ +
+ Fund source: + ({{accountingMappings.fundSourceAccount.glCode}}) {{ + accountingMappings.fundSourceAccount.name }} +
+ +

Assets

+ +
+ Loan portfolio: + ({{accountingMappings.loanPortfolioAccount.glCode}}) {{ + accountingMappings.loanPortfolioAccount.name }} +
+ Interest Receivable: + ({{accountingMappings.receivableInterestAccount.glCode}}) {{ + accountingMappings.receivableInterestAccount.name }} + Fees Receivable: + ({{accountingMappings.receivableFeeAccount.glCode}}) {{ + accountingMappings.receivableInterestAccount.name }} + Penalties Receivable: + ({{accountingMappings.receivablePenaltyAccount.glCode}}) {{ + accountingMappings.receivablePenaltyAccount.name }} +
+ Transfer in suspense: + ({{accountingMappings.transfersInSuspenseAccount.glCode}}) {{ + accountingMappings.transfersInSuspenseAccount.name }} +
+ +

Income

+ +
+ Income from Interest: + ({{accountingMappings.interestOnLoanAccount.glCode}}) {{ + accountingMappings.interestOnLoanAccount.name }} + Income from fees: + ({{accountingMappings.incomeFromFeeAccount.glCode}}) {{ + accountingMappings.incomeFromFeeAccount.name }} + Income from penalties: + ({{accountingMappings.incomeFromPenaltyAccount.glCode}}) {{ + accountingMappings.incomeFromPenaltyAccount.name }} + Income from Recovery Repayments: + ({{accountingMappings.incomeFromRecoveryAccount.glCode}}) {{ + accountingMappings.incomeFromRecoveryAccount.name }} + Income from ChargeOff + Interest: + + ({{accountingMappings.incomeFromChargeOffInterestAccount.glCode}}) {{ + accountingMappings.incomeFromChargeOffInterestAccount.name }} + Income from ChargeOff + Fees: + + ({{accountingMappings.incomeFromChargeOffFeesAccount.glCode}}) {{ + accountingMappings.incomeFromChargeOffFeesAccount.name }} + Income from ChargeOff + Penalty: + + ({{accountingMappings.incomeFromChargeOffPenaltyAccount.glCode}}) {{ + accountingMappings.incomeFromChargeOffPenaltyAccount.name }} +
+ +

Expenses

+ +
+ Losses written off: + ({{accountingMappings.writeOffAccount.glCode}}) {{ + accountingMappings.writeOffAccount.name }} + Expenses from Goodwill Credit: + ({{accountingMappings.goodwillCreditAccount.glCode}}) {{ + accountingMappings.goodwillCreditAccount.name }} + ChargeOff Expense: + + ({{accountingMappings.chargeOffExpenseAccount.glCode}}) {{ + accountingMappings.chargeOffExpenseAccount.name }} + ChargeOff Fraud + Expense: + + ({{accountingMappings.chargeOffFraudExpenseAccount.glCode}}) {{ + accountingMappings.chargeOffFraudExpenseAccount.name }} +
+ +

Liabilities

+ +
+ Over payment liability: + ({{accountingMappings.overpaymentLiabilityAccount.glCode}}) {{ + accountingMappings.overpaymentLiabilityAccount.name }} +
+ +
+ +

Advanced Accounting Rules

+ + + +
+ +

Fund Sources for Payment Channels

+ + + + + + + + + + + + + + + + +
Payment Type + {{ paymentFundSource.paymentType.name }} + Fund Source + {{ paymentFundSource.fundSourceAccount.name }} +
+ +
+ +
+ +

Fees to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Fees + {{ feesIncome.charge.name }} + Income Account + {{ feesIncome.incomeAccount.name }} +
+ +
+ +
+ +

Penalties to Specific Income Accounts

+ + + + + + + + + + + + + + + + +
Penalty + {{ penaltyIncome.charge.name }} + Income Account + {{ penaltyIncome.incomeAccount.name }} +
+ +
+ +
+ +
+ +
diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.scss b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.scss new file mode 100644 index 0000000000..7fdbefb6dc --- /dev/null +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.scss @@ -0,0 +1,47 @@ +@import "assets/styles/colours"; + +.tab-container { + padding: 1%; + margin: 1%; + + div: { + margin-top: 3px; + } +} + +table { + width: 100%; +} + +.mat-elevation-z1 { + margin: 1em 0 1.5em 0; +} + +h2, h3, h4 { + margin: 0; + font-weight: 500; +} + +span { + margin: 0.5em 0; +} + +mat-divider { + margin: 0 0 0.5em 0; +} + +.mat-h3 { + margin-top: 10px !important; + font-weight: 300; + color: $status-approved; +} + +.mat-h4 { + margin-top: 10px !important; + font-weight: 200; + color: $status-approved; +} + +.repayment-strategy { + color: $status-approved; +} diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.spec.ts b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.spec.ts new file mode 100644 index 0000000000..57dc927c8a --- /dev/null +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoanProductSummaryComponent } from './loan-product-summary.component'; + +describe('LoanProductSummaryComponent', () => { + let component: LoanProductSummaryComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ LoanProductSummaryComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(LoanProductSummaryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts new file mode 100644 index 0000000000..f3c26edc75 --- /dev/null +++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts @@ -0,0 +1,218 @@ +import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { LoanProduct } from '../../models/loan-product.model'; +import { AccountingMapping, Charge, ChargeToIncomeAccountMapping, GLAccount, PaymentChannelToFundSourceMapping, PaymentType, PaymentTypeOption } from '../../../../shared/models/general.model'; +import { AdvancePaymentAllocationData, PaymentAllocation } from '../../loan-product-stepper/loan-product-payment-strategy-step/payment-allocation-model'; +import { LoanProducts } from '../../loan-products'; +import { OptionData } from '../../../../shared/models/option-data.model'; + +@Component({ + selector: 'mifosx-loan-product-summary', + templateUrl: './loan-product-summary.component.html', + styleUrls: ['./loan-product-summary.component.scss'] +}) +export class LoanProductSummaryComponent implements OnInit, OnChanges { + + @Input() loanProduct: LoanProduct; + @Input() loanProductsTemplate: any | null; + @Input() useDueForRepaymentsConfigurations: boolean; + @Input() paymentAllocations: PaymentAllocation | null; + + variationsDisplayedColumns: string[] = ['valueConditionType', 'borrowerCycleNumber', 'minValue', 'defaultValue', 'maxValue']; + chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType']; + paymentFundSourceDisplayedColumns: string[] = ['paymentTypeId', 'fundSourceAccountId']; + feesPenaltyIncomeDisplayedColumns: string[] = ['chargeId', 'incomeAccountId']; + accountingRuleData = ['None', 'Cash', 'Accrual (periodic)', 'Accrual (upfront)']; + + isAdvancedPaymentAllocation = false; + + advancePaymentAllocationData: AdvancePaymentAllocationData; + + accountingMappings: any = {}; + paymentChannelToFundSourceMappings: PaymentChannelToFundSourceMapping[] = []; + feeToIncomeAccountMappings: ChargeToIncomeAccountMapping[] = []; + penaltyToIncomeAccountMappings: ChargeToIncomeAccountMapping[] = []; + + constructor() { } + + ngOnInit() { + this.setCurrentValues(); + } + + ngOnChanges(changes: SimpleChanges): void { + this.setCurrentValues(); + } + + setCurrentValues(): void { + if (this.loanProduct.accountingMappings) { + this.accountingMappings = this.loanProduct.accountingMappings; + this.paymentChannelToFundSourceMappings = this.loanProduct.paymentChannelToFundSourceMappings || []; + this.feeToIncomeAccountMappings = this.loanProduct.feeToIncomeAccountMappings || []; + this.penaltyToIncomeAccountMappings = this.loanProduct.penaltyToIncomeAccountMappings || []; + + } else { + const assetAccountData = this.loanProductsTemplate.accountingMappingOptions.assetAccountOptions || []; + const incomeAccountData = this.loanProductsTemplate.accountingMappingOptions.incomeAccountOptions || []; + const expenseAccountData = this.loanProductsTemplate.accountingMappingOptions.expenseAccountOptions || []; + const liabilityAccountData = this.loanProductsTemplate.accountingMappingOptions.liabilityAccountOptions || []; + const assetAndLiabilityAccountData = this.loanProductsTemplate.accountingMappingOptions.assetAndLiabilityAccountOptions || []; + + this.accountingMappings = { + 'fundSourceAccount': this.glAccountLookUp(this.loanProduct.fundSourceAccountId, assetAndLiabilityAccountData), + 'loanPortfolioAccount': this.glAccountLookUp(this.loanProduct.loanPortfolioAccountId, assetAccountData), + 'receivableInterestAccount': this.glAccountLookUp(this.loanProduct.receivableInterestAccountId, assetAccountData), + 'receivableFeeAccount': this.glAccountLookUp(this.loanProduct.receivableFeeAccountId, assetAccountData), + 'receivablePenaltyAccount': this.glAccountLookUp(this.loanProduct.receivablePenaltyAccountId, assetAccountData), + 'transfersInSuspenseAccount': this.glAccountLookUp(this.loanProduct.transfersInSuspenseAccountId, assetAccountData), + + 'interestOnLoanAccount': this.glAccountLookUp(this.loanProduct.interestOnLoanAccountId, incomeAccountData), + 'incomeFromFeeAccount': this.glAccountLookUp(this.loanProduct.incomeFromFeeAccountId, incomeAccountData), + 'incomeFromPenaltyAccount': this.glAccountLookUp(this.loanProduct.incomeFromPenaltyAccountId, incomeAccountData), + 'incomeFromRecoveryAccount': this.glAccountLookUp(this.loanProduct.incomeFromRecoveryAccountId, incomeAccountData), + 'incomeFromChargeOffInterestAccount': this.glAccountLookUp(this.loanProduct.incomeFromChargeOffInterestAccountId, incomeAccountData), + 'incomeFromChargeOffFeesAccount': this.glAccountLookUp(this.loanProduct.incomeFromChargeOffFeesAccountId, incomeAccountData), + 'incomeFromChargeOffPenaltyAccount': this.glAccountLookUp(this.loanProduct.incomeFromChargeOffPenaltyAccountId, incomeAccountData), + + 'writeOffAccount': this.glAccountLookUp(this.loanProduct.writeOffAccountId, expenseAccountData), + 'goodwillCreditAccount': this.glAccountLookUp(this.loanProduct.goodwillCreditAccountId, expenseAccountData), + 'chargeOffExpenseAccount': this.glAccountLookUp(this.loanProduct.writeOffAccountId, expenseAccountData), + 'chargeOffFraudExpenseAccount': this.glAccountLookUp(this.loanProduct.writeOffAccountId, expenseAccountData), + + 'overpaymentLiabilityAccount': this.glAccountLookUp(this.loanProduct.overpaymentLiabilityAccountId, liabilityAccountData), + }; + const paymentTypesData = this.loanProductsTemplate.paymentTypeOptions || []; + + this.loanProduct.paymentChannelToFundSourceMappings.forEach((m: any) => { + this.paymentChannelToFundSourceMappings.push({ + fundSourceAccount: this.glAccountLookUp(m.fundSourceAccountId, assetAndLiabilityAccountData), + paymentType: this.paymentTypeLookUp(m.paymentTypeId, paymentTypesData) + }); + }); + + this.feeToIncomeAccountMappings = []; + this.loanProduct.feeToIncomeAccountMappings.forEach((m: any) => { + this.feeToIncomeAccountMappings.push({ + incomeAccount: this.glAccountLookUp(m.incomeAccountId, incomeAccountData), + charge: this.chargeLookUp(m.chargeId, this.loanProductsTemplate.chargeOptions) + }); + }); + + this.penaltyToIncomeAccountMappings = []; + this.loanProduct.penaltyToIncomeAccountMappings.forEach((m: any) => { + this.penaltyToIncomeAccountMappings.push({ + incomeAccount: this.glAccountLookUp(m.incomeAccountId, incomeAccountData), + charge: this.chargeLookUp(m.chargeId, this.loanProductsTemplate.penaltyOptions) + }); + }); + + if (this.loanProduct.isInterestRecalculationEnabled) { + this.loanProduct.interestRecalculationData = { + interestRecalculationCompoundingType: this.optionDataLookUp(this.loanProduct.interestRecalculationCompoundingMethod, + this.loanProductsTemplate.interestRecalculationCompoundingTypeOptions), + rescheduleStrategyType: this.optionDataLookUp(this.loanProduct.rescheduleStrategyMethod, + this.loanProductsTemplate.rescheduleStrategyTypeOptions), + recalculationCompoundingFrequencyType: this.optionDataLookUp(this.loanProduct.recalculationCompoundingFrequencyType, + this.loanProductsTemplate.interestRecalculationFrequencyTypeOptions), + recalculationRestFrequencyType: this.optionDataLookUp(this.loanProduct.recalculationRestFrequencyType, + this.loanProductsTemplate.interestRecalculationFrequencyTypeOptions), + preClosureInterestCalculationStrategy: this.optionDataLookUp(this.loanProduct.preClosureInterestCalculationStrategy, + this.loanProductsTemplate.preClosureInterestCalculationStrategyOptions), + allowCompoundingOnEod: this.loanProduct.allowCompoundingOnEod, + isArrearsBasedOnOriginalSchedule: this.loanProduct.isArrearsBasedOnOriginalSchedule, + isCompoundingToBePostedAsTransaction: this.loanProduct.isCompoundingToBePostedAsTransaction, + recalculationRestFrequencyInterval: this.loanProduct.recalculationRestFrequencyInterval + }; + } + } + + this.isAdvancedPaymentAllocation = LoanProducts.isAdvancedPaymentAllocationStrategy(this.loanProduct.transactionProcessingStrategyCode); + + if (this.loanProduct.advancedPaymentAllocationTransactionTypes) { + this.advancePaymentAllocationData = { + transactionTypes: this.loanProduct.advancedPaymentAllocationTransactionTypes, + allocationTypes: this.loanProduct.advancedPaymentAllocationTypes, + futureInstallmentAllocationRules: this.loanProduct.advancedPaymentAllocationFutureInstallmentAllocationRules + }; + } else { + this.advancePaymentAllocationData = { + transactionTypes: this.loanProductsTemplate.advancedPaymentAllocationTransactionTypes, + allocationTypes: this.loanProductsTemplate.advancedPaymentAllocationTypes, + futureInstallmentAllocationRules: this.loanProductsTemplate.advancedPaymentAllocationFutureInstallmentAllocationRules + }; + } + + } + + optionDataLookUp(itemId: number, optionsData: any[]): OptionData { + let optionData: OptionData | null; + optionsData.some((o: any) => { + if (o.id === itemId) { + optionData = { + id: o.id, + code: o.code, + value: o.value + }; + } + }); + return optionData; + } + + glAccountLookUp(glAccountId: number, glAccounts: GLAccount[]): AccountingMapping { + let accountMapping: AccountingMapping | null = null; + if (glAccountId) { + glAccounts.some((glAccount: GLAccount) => { + if (glAccount.id === glAccountId) { + accountMapping = {id: glAccount.id, name: glAccount.name, glCode: glAccount.glCode}; + } + }); + } + return accountMapping; + } + + chargeLookUp(chargeId: number, charges: Charge[]): Charge { + let chargeData: Charge | null = null; + if (chargeId) { + charges.some((charge: Charge) => { + if (charge.id === chargeId) { + chargeData = {id: charge.id, name: charge.name, penalty: charge.penalty}; + } + }); + } + return chargeData; + } + + paymentTypeLookUp(paymentTypeId: number, paymentTypes: PaymentTypeOption[]): PaymentType { + let paymentType: PaymentType | null = null; + if (paymentTypeId) { + paymentTypes.some((payment: any) => { + if (payment.id === paymentTypeId) { + paymentType = { + id: payment.id, + name: payment.name, + isSystemDefined: false + }; + } + }); + } + return paymentType; + } + + accountingRule(): number { + return this.loanProduct.accountingRule.id ? + this.loanProduct.accountingRule.id : this.loanProduct.accountingRule; + } + + isAccountingEnabled(): boolean { + return (this.accountingRule() >= 2); + } + + isAdvancedAccountingEnabled(): boolean { + return (this.loanProduct.paymentChannelToFundSourceMappings?.length > 0 + || this.loanProduct.feeToIncomeAccountMappings?.length > 0 + || this.loanProduct.penaltyToIncomeAccountMappings?.length > 0); + } + + isAdvancedPaymentAllocationStrategy(): boolean { + return LoanProducts.isAdvancedPaymentAllocationStrategy(this.loanProduct.transactionProcessingStrategyCode); + } + +} diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts index 077178124c..b437881572 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts @@ -79,7 +79,7 @@ export class CreateLoanProductComponent implements OnInit { } advancePaymentStrategy(value: string) { - this.isAdvancedPaymentStrategy = (value === 'advanced-payment-allocation-strategy'); + this.isAdvancedPaymentStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(value); } buildAdvancedPaymentAllocation(): void { diff --git a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts index efe8890964..f8394f455a 100644 --- a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts +++ b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts @@ -65,6 +65,10 @@ export class EditLoanProductComponent implements OnInit { ngOnInit() { this.buildAdvancedPaymentAllocation(); + this.advancePaymentStrategy(this.loanProductAndTemplate.transactionProcessingStrategyCode); + if (this.isAdvancedPaymentStrategy) { + this.paymentAllocation = this.loanProductAndTemplate.paymentAllocation; + } } get loanProductDetailsForm() { @@ -84,7 +88,7 @@ export class EditLoanProductComponent implements OnInit { } advancePaymentStrategy(value: string): void { - this.isAdvancedPaymentStrategy = (value === 'advanced-payment-allocation-strategy'); + this.isAdvancedPaymentStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(value); } buildAdvancedPaymentAllocation(): void { diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html index 0856f1a1b2..e9f38bdca2 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html @@ -1,905 +1,11 @@ -
-

{{ loanProduct.name }}

- - - -

Details

- - - -
- Short Name: - {{ loanProduct.shortName }} -
- -
- Fund Name: - {{ loanProduct.fundId | find:loanProductsTemplate.fundOptions:'id':'name' }} -
- -
- Include in Customer Loan Counter: - {{ loanProduct.includeInBorrowerCycle | yesNo }} -
- -
- Start Date: - {{ loanProduct.startDate }} -
- -
- Close Date: - {{ loanProduct.closeDate }} -
- -
- Description: - {{ loanProduct.description }} -
- -

Currency

- - - -
- Currency: - {{ loanProduct.currencyCode | find:loanProductsTemplate.currencyOptions:'code':'name' }} -
- -
- Decimal Places: - {{ loanProduct.digitsAfterDecimal }} -
- -
- Currency in multiples of: - {{ loanProduct.inMultiplesOf }} -
- -
- Installment in multiples of: - {{ loanProduct.installmentAmountInMultiplesOf }} -
- -

Terms

- - - -
- Principal: - {{ loanProduct.principal + ' (Min: ' + (loanProduct.minPrincipal ? loanProduct.minPrincipal : - loanProduct.principal) + ', Max: ' + (loanProduct.maxPrincipal ? loanProduct.maxPrincipal : loanProduct.principal) - + ')' }} -
- -
- Allow Approved / Disbursed Amounts Over Applied: - {{ loanProduct.allowApprovedDisbursedAmountsOverApplied | yesNo }} -
- -
- Over Applied: - {{ loanProduct.overAppliedNumber - }} % - {{ loanProduct.overAppliedNumber }} {{ - loanProduct.currencyCode }} -
- -
- Installment day calculation from: - {{ loanProduct.repaymentStartDateType }} -
- -
- Number of Repayments: - {{ loanProduct.numberOfRepayments + ' (Min: ' + (loanProduct.minNumberOfRepayments ? - loanProduct.minNumberOfRepayments : loanProduct.numberOfRepayments) + ', Max: ' + - (loanProduct.maxNumberOfRepayments ? loanProduct.maxNumberOfRepayments : loanProduct.numberOfRepayments) + ')' - }} -
- -
- Linked to floating interest rates: - {{ loanProduct.isLinkedToFloatingInterestRates | yesNo }} -
- -
- Nominal interest rate: - {{ loanProduct.interestRatePerPeriod + ' (Min: ' + (loanProduct.minInterestRatePerPeriod ? - loanProduct.minInterestRatePerPeriod : loanProduct.interestRatePerPeriod) + ', Max: ' + - (loanProduct.maxInterestRatePerPeriod ? loanProduct.maxInterestRatePerPeriod : loanProduct.interestRatePerPeriod) - + ')' + ' ' + (loanProduct.interestRateFrequencyType | - find:loanProductsTemplate.interestRateFrequencyTypeOptions:'id':'value') }} -
- -
- Floating Lending Interest Rate: - {{ loanProduct.floatingRatesId | find:loanProductsTemplate.floatingRateOptions:'id':'name' - }} - Interest Rate Differential: - {{ loanProduct.interestRateDifferential }} - Floating Interest Rate Calculation Allowed: - {{ loanProduct.isFloatingInterestRateCalculationAllowed | yesNo }} - Floating Interest Rate: - {{ loanProduct.defaultDifferentialLendingRate + ' (Min: ' + - (loanProduct.minDifferentialLendingRate ? loanProduct.minDifferentialLendingRate : - loanProduct.defaultDifferentialLendingRate) + ', Max: ' + (loanProduct.maxDifferentialLendingRate ? - loanProduct.maxDifferentialLendingRate : loanProduct.defaultDifferentialLendingRate) + ')' }} -
- -
- Terms vary based on loan cycle: - {{ loanProduct.useBorrowerCycle | yesNo }} -
- -
- -

Principal by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType | find:loanProductsTemplate.valueConditionTypeOptions:'id':'value' }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- -

Number of Repayments by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType | find:loanProductsTemplate.valueConditionTypeOptions:'id':'value' }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- -

Nominal Interest Rate by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType | find:loanProductsTemplate.valueConditionTypeOptions:'id':'value' }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- Repay Every: - {{ loanProduct.repaymentEvery + ' ' + (loanProduct.repaymentFrequencyType | - find:loanProductsTemplate.repaymentFrequencyTypeOptions:'id':'value') }} -
- -
- Minimum days between disbursal and first repayment date: - {{ loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment }} -
- -

Settings

- - - -
- Amortization: - {{ loanProduct.amortizationType | find:loanProductsTemplate.amortizationTypeOptions:'id':'value' - }} -
- -
- Is Equal Amortization: - {{ loanProduct.isEqualAmortization | yesNo }} -
- -
- Interest Method: - {{ loanProduct.interestType | find:loanProductsTemplate.interestTypeOptions:'id':'value' - }} -
- -
- Interest Calculation Period: - {{ loanProduct.interestCalculationPeriodType | - find:loanProductsTemplate.interestCalculationPeriodTypeOptions:'id':'value' }} -
- -
- Allow Partial Interest Calculation with same as repayment: - {{ loanProduct.allowPartialPeriodInterestCalcualtion | yesNo }} -
- -
- Repayment Strategy: - {{ loanProduct.transactionProcessingStrategyCode | - find:loanProductsTemplate.transactionProcessingStrategyOptions:'code':'name' }} -
- -
- Advanced Payment Allocation Transactions: - - - - - - -
- -
- Grace on principal payment: - {{ loanProduct.graceOnPrincipalPayment }} -
- -
- Grace on interest payment: - {{ loanProduct.graceOnInterestPayment }} -
- -
- Interest free period: - {{ loanProduct.graceOnInterestCharged }} -
- -
- Arrears tolerance: - {{ loanProduct.inArrearsTolerance }} -
- -
- Days in year: - {{ loanProduct.daysInYearType | find:loanProductsTemplate.daysInYearTypeOptions:'id':'value' - }} -
- -
- Days in month: - {{ loanProduct.daysInMonthType | find:loanProductsTemplate.daysInMonthTypeOptions:'id':'value' - }} -
- -
- Allow fixing of the installment amount: - {{ loanProduct.canDefineInstallmentAmount | yesNo }} -
- -
- Number of days a loan may be overdue before moving into arrears: - {{ loanProduct.graceOnArrearsAgeing }} -
- -
- Maximum number of days a loan may be overdue before becoming a NPA (non performing asset): - {{ loanProduct.overdueDaysForNPA }} -
- -
- Delinquency Bucket: - {{ loanProduct.delinquencyBucketId }} -
- -
- Enable installment level Delinquency: - {{ loanProduct.enableInstallmentLevelDelinquency | yesNo }} -
- -
- Account moves out of NPA only after all arrears have been cleared: - {{ loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion | yesNo }} -
- -
- Principal Threshold (%) for Last Instalment: - {{ loanProduct.principalThresholdForLastInstallment }} -
- -
- Variable Installments allowed: - {{ loanProduct.allowVariableInstallments | yesNo }} -
- -
- Variable Installments: - {{ '(Min: ' + loanProduct.minimumGap + ', Max: ' + (loanProduct.maximumGap ? - loanProduct.maximumGap : loanProduct.minimumGap) + ')' }} -
- -
- Allowed to be used for providing Topup Loans: - {{ loanProduct.canUseForTopup | yesNo }} -
- -

Interest Recalculation

- - - -
- Recalculate Interest: - {{ loanProduct.isInterestRecalculationEnabled | yesNo }} -
- -
- Pre-closure interest calculation rule: - {{ loanProduct.preClosureInterestCalculationStrategy | - find:loanProductsTemplate.preClosureInterestCalculationStrategyOptions:'id':'value' }} - Advance payments adjustment type: - {{ loanProduct.rescheduleStrategyMethod | - find:loanProductsTemplate.rescheduleStrategyTypeOptions:'id':'value' }} - Interest recalculation compounding on: - {{ loanProduct.interestRecalculationCompoundingMethod | - find:loanProductsTemplate.interestRecalculationCompoundingTypeOptions:'id':'value' }} -
- Frequency for compounding: - - {{ loanProduct.recalculationCompoundingFrequencyType | - find:loanProductsTemplate.interestRecalculationFrequencyTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationCompoundingFrequencyNthDayType | - find:loanProductsTemplate.interestRecalculationNthDayTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationCompoundingFrequencyDayOfWeekType | - find:loanProductsTemplate.interestRecalculationDayOfWeekTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationCompoundingFrequencyOnDayType }} - -
- Frequency Interval for compounding: - {{ loanProduct.recalculationCompoundingFrequencyInterval }} -
-
-
- Frequency for recalculate Outstanding Principal: - - {{ loanProduct.recalculationRestFrequencyType | - find:loanProductsTemplate.interestRecalculationFrequencyTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationRestFrequencyNthDayType | - find:loanProductsTemplate.interestRecalculationNthDayTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationRestFrequencyDayOfWeekType | - find:loanProductsTemplate.interestRecalculationDayOfWeekTypeOptions:'id':'value' }} -   {{ - loanProduct.recalculationRestFrequencyOnDayType }} - -
-
- Frequency Interval for recalculation: - {{ loanProduct.recalculationRestFrequencyInterval }} -
- Rest Frequency Date: - {{ loanProduct.recalculationRestFrequencyDate }} -
-
-
- Is Arrears recognization based on original schedule: - {{ loanProduct.isArrearsBasedOnOriginalSchedule | yesNo }} -
-
- -

Guarantee Requirements

- - - -
- Place Guarantee Funds On-Hold: - {{ loanProduct.holdGuaranteeFunds | yesNo }} -
- -
- Mandatory Guarantee(%): - {{ loanProduct.mandatoryGuarantee }} -
- Minimum Guarantee from Own Funds(%): - {{ loanProduct.minimumGuaranteeFromOwnFunds }} -
-
- Minimum Guarantee from Guarantor Funds(%): - {{ loanProduct.minimumGuaranteeFromGuarantor }} -
-
- -

Loan Tranche Details

- - - -
- Enable Multiple Disbursals: - {{ loanProduct.multiDisburseLoan | yesNo }} -
- -
- Maximum Tranche count: - {{ loanProduct.maxTrancheCount }} -
- Maximum allowed outstanding balance: - {{ loanProduct.outstandingLoanBalance }} -
-
- -
- Disallow Expected Disbursements: - {{ loanProduct.disallowExpectedDisbursements | yesNo }} -
- -

Down Payments

- - - -
- Enable Down Payments: - {{ loanProduct.enableDownPayment | yesNo }} -
- -
- Disbursed Amount Percentage Down Payment (%): - {{ loanProduct.disbursedAmountPercentageForDownPayment }} % -
- -
- Enable Auto Repayment for Down Payment: - {{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }} -
- -
- Do not extend loan schedule for multi disbursal: - {{ loanProduct.disableScheduleExtensionForDownPayment | yesNo }} -
- -

Event Settings

- -
- Use the Global Configurations values to the Repayment Event (notifications): - {{ loanProduct.useDueForRepaymentsConfigurations | yesNo }} -
- -
- Due days for repayment event: - {{ loanProduct.dueDaysForRepaymentEvent | number }} -
- -
- OverDue days for repayment event: - {{ loanProduct.overDueDaysForRepaymentEvent | number }} -
- -

Configurable Terms and Settings

- - - -
- Allow overriding select terms and settings in loan accounts: - {{ loanProduct.allowAttributeConfiguration | yesNo }} -
- -
- Amortization: - {{ loanProduct.allowAttributeOverrides.amortizationType | yesNo }} - Interest method: - {{ loanProduct.allowAttributeOverrides.interestType | yesNo }} - Repayment strategy: - {{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode | yesNo }} - Interest calculation period: - {{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType | yesNo }} - Arrears tolerance: - {{ loanProduct.allowAttributeOverrides.inArrearsTolerance | yesNo }} - Repaid every: - {{ loanProduct.allowAttributeOverrides.repaymentEvery | yesNo }} - Moratorium: - {{ loanProduct.allowAttributeOverrides.graceOnPrincipalAndInterestPayment | yesNo - }} - Number of days a loan may be overdue before moving into arrears: - {{ loanProduct.allowAttributeOverrides.graceOnArrearsAgeing | yesNo }} -
- -
- -

Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ charge.name + ', ' + charge.currency.displaySymbol }} - Type - {{ charge.chargeCalculationType.value }} - Amount - {{ charge.amount }} - Collected On - {{ charge.chargeTimeType.value }} -
- -

Overdue Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ overdueCharge.name + ', ' + overdueCharge.currency.displaySymbol }} - Type - {{ overdueCharge.chargeCalculationType.value }} - Amount - {{ overdueCharge.amount }} - Collected On - {{ overdueCharge.chargeTimeType.value }} -
- -
- -

Accounting

- - - -
- Type: - {{ accountingRuleData[loanProduct.accountingRule-1] }} -
- -
- -

Assets / Liabilities

- -
- Fund source: - {{ loanProduct.fundSourceAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAndLiabilityAccountOptions:'id':'name' }} -
- -

Assets

- -
- Loan portfolio: - {{ loanProduct.loanPortfolioAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} -
- Interest Receivable: - {{ loanProduct.receivableInterestAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} - Fees Receivable: - {{ loanProduct.receivableFeeAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} - Penalties Receivable: - {{ loanProduct.receivablePenaltyAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} -
- Transfer in suspense: - {{ loanProduct.transfersInSuspenseAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} -
- -

Income

- -
- Income from Interest: - {{ loanProduct.interestOnLoanAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from fees: - {{ loanProduct.incomeFromFeeAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from penalties: - {{ loanProduct.incomeFromPenaltyAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from Recovery Repayments: - {{ loanProduct.incomeFromRecoveryAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from ChargeOff Interest: - {{ loanProduct.incomeFromChargeOffInterestAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from ChargeOff Fees: - {{ loanProduct.incomeFromChargeOffFeesAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from ChargeOff Penalty: - {{ loanProduct.incomeFromChargeOffPenaltyAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from Goodwill Credit Interest: - {{ loanProduct.incomeFromGoodwillCreditInterestAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from Goodwill Credit Fees: - {{ loanProduct.incomeFromGoodwillCreditFeesAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} - Income from Goodwill Credit Penalty: - {{ loanProduct.incomeFromGoodwillCreditPenaltyAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} -
- -

Expenses

- -
- Losses written off: - {{ loanProduct.writeOffAccountId | - find:loanProductsTemplate.accountingMappingOptions.expenseAccountOptions:'id':'name' }} - Expenses from Goodwill Credit: - {{ loanProduct.goodwillCreditAccountId | - find:loanProductsTemplate.accountingMappingOptions.expenseAccountOptions:'id':'name' }} - ChargeOff Expense: - {{ loanProduct.chargeOffExpenseAccountId | - find:loanProductsTemplate.accountingMappingOptions.expenseAccountOptions:'id':'name' }} - ChargeOff Fraud Expense: - {{ loanProduct.chargeOffFraudExpenseAccountId | - find:loanProductsTemplate.accountingMappingOptions.expenseAccountOptions:'id':'name' }} -
- -

Liabilities

- -
- Over payment liability: - {{ loanProduct.overpaymentLiabilityAccountId | - find:loanProductsTemplate.accountingMappingOptions.liabilityAccountOptions:'id':'name' }} -
- -
- -

Advanced Accounting Rules

- - - -
- -

Fund Sources for Payment Channels

- - - - - - - - - - - - - - - - -
Payment Type - {{ paymentFundSource.paymentTypeId | find:loanProductsTemplate.paymentTypeOptions:'id':'name' }} - Fund Source - {{ paymentFundSource.fundSourceAccountId | - find:loanProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }} -
- -
- -
- -

Fees to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Fees - {{ feesIncome.chargeId | find:loanProductsTemplate.chargeOptions:'id':'name' }} - Income Account - {{ feesIncome.incomeAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions.concat(loanProductsTemplate.accountingMappingOptions.liabilityAccountOptions):'id':'name' - }} -
- -
- -
- -

Penalties to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Penalty - {{ penaltyIncome.chargeId | find:loanProductsTemplate.penaltyOptions:'id':'name' }} - Income Account - {{ penaltyIncome.incomeAccountId | - find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }} -
- -
- -
- -
- -
+ +
-
- -

Details

- - - -
- Name: - {{ loanProduct.name }} -
- -
- Short Name: - {{ loanProduct.shortName }} -
- -
- Fund Name: - {{ loanProduct.fundName }} -
- -
- Include in Customer Loan Counter: - {{ loanProduct.includeInBorrowerCycle | yesNo }} -
- -
- Start Date: - {{ loanProduct.startDate | dateFormat }} -
- -
- Close Date: - {{ loanProduct.closeDate | dateFormat }} -
- -
- Description: - {{ loanProduct.description }} -
- -

Currency

- - - -
- Currency: - {{ loanProduct.currency.name }} -
- -
- Decimal Places: - {{ loanProduct.currency.decimalPlaces }} -
- -
- Currency in multiples of: - {{ loanProduct.currency.inMultiplesOf }} -
- -
- Installment in multiples of: - {{ loanProduct.installmentAmountInMultiplesOf }} -
- -

Terms

- - - -
- Principal: - {{ loanProduct.principal | formatNumber }} - (Min {{ (loanProduct.minPrincipal ? loanProduct.minPrincipal : loanProduct.principal) | formatNumber }} - : Max {{ (loanProduct.maxPrincipal ? loanProduct.maxPrincipal : loanProduct.principal) | formatNumber }}) - -
- -
- Allow Approved / Disbursed Amounts Over Applied: - {{ loanProduct.allowApprovedDisbursedAmountsOverApplied | yesNo }} -
- -
- Over Applied Amount: - {{ loanProduct.overAppliedNumber - | formatNumber - }} % - {{ loanProduct.overAppliedNumber | - formatNumber }} {{ - loanProduct.currencyCode }} -
- -
- Installment day calculation from: - {{ loanProduct.repaymentStartDateType.value }} -
- -
- Number of Repayments: - {{ loanProduct.numberOfRepayments + ' (Min: ' + (loanProduct.minNumberOfRepayments ? - loanProduct.minNumberOfRepayments : loanProduct.numberOfRepayments) + ', Max: ' + - (loanProduct.maxNumberOfRepayments ? loanProduct.maxNumberOfRepayments : loanProduct.numberOfRepayments) + ')' - }} -
- -
- Linked to floating interest rates: - {{ loanProduct.isLinkedToFloatingInterestRates | yesNo }} -
- -
- Nominal interest rate: - {{ loanProduct.interestRatePerPeriod + ' (Min: ' + (loanProduct.minInterestRatePerPeriod ? - loanProduct.minInterestRatePerPeriod : loanProduct.interestRatePerPeriod) + ', Max: ' + - (loanProduct.maxInterestRatePerPeriod ? loanProduct.maxInterestRatePerPeriod : loanProduct.interestRatePerPeriod) - + ')' + ' ' + loanProduct.interestRateFrequencyType.value }} -
- -
- Floating Lending Interest Rate: - {{ loanProduct.floatingRateName }} - Interest Rate Differential: - {{ loanProduct.interestRateDifferential }} - Floating Interest Rate Calculation Allowed: - {{ loanProduct.isFloatingInterestRateCalculationAllowed | yesNo }} - Floating Interest Rate: - {{ loanProduct.defaultDifferentialLendingRate + ' (Min: ' + - (loanProduct.minDifferentialLendingRate ? loanProduct.minDifferentialLendingRate : - loanProduct.defaultDifferentialLendingRate) + ', Max: ' + (loanProduct.maxDifferentialLendingRate ? - loanProduct.maxDifferentialLendingRate : loanProduct.defaultDifferentialLendingRate) + ')' }} -
- -
- Terms vary based on loan cycle: - {{ loanProduct.useBorrowerCycle | yesNo }} -
- -
- -

Principal by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType.value }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- -

Number of Repayments by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType.value }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- -

Nominal Interest Rate by loan cycle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Condition - {{ variation.valueConditionType.value }} - Loan Cycle - {{ variation.borrowerCycleNumber }} - Minimum - {{ variation.minValue }} - Default - {{ variation.defaultValue }} - Maximum - {{ variation.maxValue }} -
- -
- -
- Repay Every: - {{ loanProduct.repaymentEvery + ' ' + loanProduct.repaymentFrequencyType.value }} -
- -
- Minimum days between disbursal and first repayment date: - {{ loanProduct.minimumDaysBetweenDisbursalAndFirstRepayment }} -
- -

Settings

- - - -
- Amortization: - {{ loanProduct.amortizationType.value }} -
- -
- Is Equal Amortization: - {{ loanProduct.isEqualAmortization | yesNo }} -
- -
- Interest Method: - {{ loanProduct.interestType.value }} -
- -
- Interest Calculation Period: - {{ loanProduct.interestCalculationPeriodType.value }} -
- -
- Allow Partial Interest Calculation with same as repayment: - {{ loanProduct.allowPartialPeriodInterestCalculation | yesNo }} -
- -
- Repayment Strategy: - {{ loanProduct.transactionProcessingStrategyName }} -
- -
- Advanced Payment Allocation Transactions: - - - - - - -
- -
- Delinquency Bucket: - {{ loanProduct.delinquencyBucket.name }} -
- -
- Enable installment level Delinquency: - {{ loanProduct.enableInstallmentLevelDelinquency | yesNo }} -
- -
- Grace on principal payment: - {{ loanProduct.graceOnPrincipalPayment }} -
- -
- Grace on interest payment: - {{ loanProduct.graceOnInterestPayment }} -
- -
- Interest free period: - {{ loanProduct.graceOnInterestCharged }} -
- -
- Arrears tolerance: - {{ loanProduct.inArrearsTolerance }} -
- -
- Days in year: - {{ loanProduct.daysInYearType.value }} -
- -
- Days in month: - {{ loanProduct.daysInMonthType.value }} -
- -
- Allow fixing of the installment amount: - {{ loanProduct.canDefineInstallmentAmount | yesNo }} -
- -
- Number of days a loan may be overdue before moving into arrears: - {{ loanProduct.graceOnArrearsAgeing }} -
- -
- Maximum number of days a loan may be overdue before becoming a NPA (non performing asset): - {{ loanProduct.overdueDaysForNPA }} -
- -
- Account moves out of NPA only after all arrears have been cleared: - {{ loanProduct.accountMovesOutOfNPAOnlyOnArrearsCompletion | yesNo }} -
- -
- Principal Threshold (%) for Last Instalment: - {{ loanProduct.principalThresholdForLastInstallment }} -
- -
- Variable Installments allowed: - {{ loanProduct.allowVariableInstallments | yesNo }} -
- -
- Variable Installments: - {{ '(Min: ' + loanProduct.minimumGap + ', Max: ' + (loanProduct.maximumGap ? - loanProduct.maximumGap : loanProduct.minimumGap) + ')' }} -
- -
- Allowed to be used for providing Topup Loans: - {{ loanProduct.canUseForTopup | yesNo }} -
- -

Interest Recalculation

- - - -
- Recalculate Interest: - {{ loanProduct.isInterestRecalculationEnabled | yesNo }} -
- -
- Pre-closure interest calculation rule: - {{ loanProduct.interestRecalculationData.preClosureInterestCalculationStrategy.value }} - Advance payments adjustment type: - {{ loanProduct.interestRecalculationData.rescheduleStrategyType.value }} - Interest recalculation compounding on: - {{ loanProduct.interestRecalculationData.interestRecalculationCompoundingType.value }} -
- Frequency for compounding: - - {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.value }} -   {{ - 'on ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyNthDay?.value }} -   {{ - loanProduct.interestRecalculationData.recalculationCompoundingFrequencyWeekday?.value }} -   {{ - 'on day ' + loanProduct.interestRecalculationData.recalculationCompoundingFrequencyOnDay }} - -
- Frequency Interval for compounding: - {{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyInterval }} -
-
-
- Frequency for recalculate Outstanding Principal: - - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyType.value }} -   {{ - 'on ' + loanProduct.interestRecalculationData.recalculationRestFrequencyNthDay?.value }} -   {{ - loanProduct.interestRecalculationData.recalculationRestFrequencyWeekday?.value }} -   {{ - 'on day ' + loanProduct.interestRecalculationData.recalculationRestFrequencyOnDay }} - -
-
- Frequency Interval for recalculation: - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }} -
- Rest Frequency Date: - {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }} -
-
-
- Is Arrears recognization based on original schedule: - {{ loanProduct.isArrearsBasedOnOriginalSchedule | yesNo }} -
-
- -

Guarantee Requirements

- - - -
- Place Guarantee Funds On-Hold: - {{ loanProduct.holdGuaranteeFunds | yesNo }} -
- -
- Mandatory Guarantee(%): - {{ loanProduct.productGuaranteeData.mandatoryGuarantee }} -
- Minimum Guarantee from Own Funds(%): - {{ loanProduct.productGuaranteeData.minimumGuaranteeFromOwnFunds }} -
-
- Minimum Guarantee from Guarantor Funds(%): - {{ loanProduct.productGuaranteeData.minimumGuaranteeFromGuarantor }} -
-
- -

Loan Tranche Details

- - - -
- Enable Multiple Disbursals: - {{ loanProduct.multiDisburseLoan | yesNo }} -
- -
- Maximum Tranche count: - {{ loanProduct.maxTrancheCount }} -
- Maximum allowed outstanding balance: - {{ loanProduct.outstandingLoanBalance }} -
-
- Disallow Expected Disbursements: - {{ loanProduct.disallowExpectedDisbursements | yesNo }} -
-
- -

Down Payments

- - - -
- Enable Down Payments: - {{ loanProduct.enableDownPayment | yesNo }} -
- -
- Disbursed Amount Percentage Down Payment (%): - {{ loanProduct.disbursedAmountPercentageForDownPayment }} % -
- -
- Enable Auto Repayment for Down Payment: - {{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }} -
- -
- Do not extend loan schedule for multi disbursal: - {{ loanProduct.disableScheduleExtensionForDownPayment | yesNo }} -
- -

Event Settings

- -
- Use the Global Configurations values to the Repayment Event (notifications): - {{ useDueForRepaymentsConfigurations | yesNo }} -
- -
- Due days for repayment event: - {{ loanProduct.dueDaysForRepaymentEvent | number }} -
- -
- OverDue days for repayment event: - {{ loanProduct.overDueDaysForRepaymentEvent | number }} -
- -

Configurable Terms and Settings

- - - -
- Allow overriding select terms and settings in loan accounts: - {{ loanProduct.allowAttributeConfiguration | yesNo }} -
- -
- Amortization: - {{ loanProduct.allowAttributeOverrides.amortizationType | yesNo }} - Interest method: - {{ loanProduct.allowAttributeOverrides.interestType | yesNo }} - Repayment strategy: - {{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode | yesNo }} - Interest calculation period: - {{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType | yesNo }} - Arrears tolerance: - {{ loanProduct.allowAttributeOverrides.inArrearsTolerance | yesNo }} - Repaid every: - {{ loanProduct.allowAttributeOverrides.repaymentEvery | yesNo }} - Moratorium: - {{ loanProduct.allowAttributeOverrides.graceOnPrincipalAndInterestPayment | yesNo }} - Number of days a loan may be overdue before moving into arrears: - {{ loanProduct.allowAttributeOverrides.graceOnArrearsAgeing | yesNo }} -
- -
- -

Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ charge.name + ', ' + charge.currency.displaySymbol }} - Type - {{ charge.chargeCalculationType.value }} - Amount - {{ charge.amount }} - Collected On - {{ charge.chargeTimeType.value }} -
- -

Overdue Charges

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name - {{ overdueCharge.name + ', ' + overdueCharge.currency.displaySymbol }} - Type - {{ overdueCharge.chargeCalculationType.value }} - Amount - {{ overdueCharge.amount }} - Collected On - {{ overdueCharge.chargeTimeType.value }} -
- -
- -

Accounting

- - - -
- Type: - {{ loanProduct.accountingRule.value }} -
- -
- -

Assets / Liabilities

- -
- Fund source: - ({{loanProduct.accountingMappings.fundSourceAccount.glCode}}) {{ - loanProduct.accountingMappings.fundSourceAccount.name }} -
- -

Assets

- -
- Loan portfolio: - ({{loanProduct.accountingMappings.loanPortfolioAccount.glCode}}) {{ - loanProduct.accountingMappings.loanPortfolioAccount.name }} -
- Interest Receivable: - ({{loanProduct.accountingMappings.receivableInterestAccount.glCode}}) {{ - loanProduct.accountingMappings.receivableInterestAccount.name }} - Fees Receivable: - ({{loanProduct.accountingMappings.receivableFeeAccount.glCode}}) {{ - loanProduct.accountingMappings.receivableInterestAccount.name }} - Penalties Receivable: - ({{loanProduct.accountingMappings.receivablePenaltyAccount.glCode}}) {{ - loanProduct.accountingMappings.receivablePenaltyAccount.name }} -
- Transfer in suspense: - ({{loanProduct.accountingMappings.transfersInSuspenseAccount.glCode}}) {{ - loanProduct.accountingMappings.transfersInSuspenseAccount.name }} -
- -

Income

- -
- Income from Interest: - ({{loanProduct.accountingMappings.interestOnLoanAccount.glCode}}) {{ - loanProduct.accountingMappings.interestOnLoanAccount.name }} - Income from fees: - ({{loanProduct.accountingMappings.incomeFromFeeAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromFeeAccount.name }} - Income from penalties: - ({{loanProduct.accountingMappings.incomeFromPenaltyAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromPenaltyAccount.name }} - Income from Recovery Repayments: - ({{loanProduct.accountingMappings.incomeFromRecoveryAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromRecoveryAccount.name }} - Income from ChargeOff - Interest: - - ({{loanProduct.accountingMappings.incomeFromChargeOffInterestAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromChargeOffInterestAccount.name }} - Income from ChargeOff - Fees: - - ({{loanProduct.accountingMappings.incomeFromChargeOffFeesAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromChargeOffFeesAccount.name }} - Income from ChargeOff - Penalty: - - ({{loanProduct.accountingMappings.incomeFromChargeOffPenaltyAccount.glCode}}) {{ - loanProduct.accountingMappings.incomeFromChargeOffPenaltyAccount.name }} -
- -

Expenses

- -
- Losses written off: - ({{loanProduct.accountingMappings.writeOffAccount.glCode}}) {{ - loanProduct.accountingMappings.writeOffAccount.name }} - Expenses from Goodwill Credit: - ({{loanProduct.accountingMappings.goodwillCreditAccount.glCode}}) {{ - loanProduct.accountingMappings.goodwillCreditAccount.name }} - ChargeOff Expense: - - ({{loanProduct.accountingMappings.chargeOffExpenseAccount.glCode}}) {{ - loanProduct.accountingMappings.chargeOffExpenseAccount.name }} - ChargeOff Fraud - Expense: - - ({{loanProduct.accountingMappings.chargeOffFraudExpenseAccount.glCode}}) {{ - loanProduct.accountingMappings.chargeOffFraudExpenseAccount.name }} -
- -

Liabilities

- -
- Over payment liability: - ({{loanProduct.accountingMappings.overpaymentLiabilityAccount.glCode}}) {{ - loanProduct.accountingMappings.overpaymentLiabilityAccount.name }} -
- -
- -

Advanced Accounting Rules

- - - -
- -

Fund Sources for Payment Channels

- - - - - - - - - - - - - - - - -
Payment Type - {{ paymentFundSource.paymentType.name }} - Fund Source - {{ paymentFundSource.fundSourceAccount.name }} -
- -
- -
- -

Fees to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Fees - {{ feesIncome.charge.name }} - Income Account - {{ feesIncome.incomeAccount.name }} -
- -
- -
- -

Penalties to Specific Income Accounts

- - - - - - - - - - - - - - - - -
Penalty - {{ penaltyIncome.charge.name }} - Income Account - {{ penaltyIncome.incomeAccount.name }} -
- -
- -
- -
- -
+ + diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss index 9135adef80..e69de29bb2 100644 --- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss +++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss @@ -1,26 +0,0 @@ -@import "assets/styles/helper"; - -.tab-container { - padding: 1%; - margin: 1%; - - div: { - margin-top: 3px; - } -} - -.mat-h3 { - margin-top: 10px !important; - font-weight: 300; - color: $status-approved; -} - -.mat-h4 { - margin-top: 10px !important; - font-weight: 200; - color: $status-approved; -} - -.repayment-strategy { - color: $status-approved; -} diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts index 26aac9320e..1e05c8134f 100644 --- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts +++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { AdvancePaymentAllocationData } from '../../loan-product-stepper/loan-product-payment-strategy-step/payment-allocation-model'; +import { LoanProduct } from '../../models/loan-product.model'; @Component({ selector: 'mifosx-general-tab', @@ -9,26 +9,13 @@ import { AdvancePaymentAllocationData } from '../../loan-product-stepper/loan-pr }) export class GeneralTabComponent implements OnInit { - loanProduct: any; - - variationsDisplayedColumns: string[] = ['valueConditionType', 'borrowerCycleNumber', 'minValue', 'defaultValue', 'maxValue']; - chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType']; - paymentFundSourceDisplayedColumns: string[] = ['paymentTypeId', 'fundSourceAccountId']; - feesPenaltyIncomeDisplayedColumns: string[] = ['chargeId', 'incomeAccountId']; - - advancePaymentAllocationData: AdvancePaymentAllocationData; - + loanProduct: LoanProduct; useDueForRepaymentsConfigurations = false; constructor(private route: ActivatedRoute) { this.route.data.subscribe((data: { loanProduct: any }) => { this.loanProduct = data.loanProduct; this.useDueForRepaymentsConfigurations = (!this.loanProduct.dueDaysForRepaymentEvent && !this.loanProduct.overDueDaysForRepaymentEvent); - this.advancePaymentAllocationData = { - transactionTypes: this.loanProduct.advancedPaymentAllocationTransactionTypes, - allocationTypes: this.loanProduct.advancedPaymentAllocationTypes, - futureInstallmentAllocationRules: this.loanProduct.advancedPaymentAllocationFutureInstallmentAllocationRules - }; }); } diff --git a/src/app/products/products.module.ts b/src/app/products/products.module.ts index 57ba92d0e0..35307d9e92 100644 --- a/src/app/products/products.module.ts +++ b/src/app/products/products.module.ts @@ -119,6 +119,7 @@ import { ShareProductDatatableTabComponent } from './share-products/view-share-p import { LoanProductPaymentStrategyStepComponent } from './loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component'; import { ViewAdvancePaymenyAllocationComponent } from './loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component'; import { AdvancePaymentAllocationTabComponent } from './loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component'; +import { LoanProductSummaryComponent } from './loan-products/common/loan-product-summary/loan-product-summary.component'; /** * Products Module @@ -245,7 +246,8 @@ import { AdvancePaymentAllocationTabComponent } from './loan-products/loan-produ ShareProductGeneralTabComponent, ShareProductDatatableTabComponent, ViewAdvancePaymenyAllocationComponent, - AdvancePaymentAllocationTabComponent + AdvancePaymentAllocationTabComponent, + LoanProductSummaryComponent ] }) export class ProductsModule { } diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts index 0919f6fdce..f85ddc4095 100644 --- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts +++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts @@ -73,7 +73,7 @@ export class TransactionsTabComponent implements OnInit { */ showTransactions(transactionsData: any) { if (transactionsData.transfer) { - this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route }); + this.router.navigate([`../transfer-funds/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route }); } else { this.router.navigate([transactionsData.id, 'general'], { relativeTo: this.route }); } diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html index 445855108d..42c5502941 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html +++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html @@ -1,10 +1,12 @@ -
- - +
+ + + + - + + +
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts index 4c331ffc86..0f9926f19c 100644 --- a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts +++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts @@ -33,6 +33,13 @@ export class SavingsTransactionGeneralTabComponent implements OnInit { ngOnInit(): void { } + allowUndo(): boolean { + if (this.transactionData.reversed && this.transactionData.transactionType.amountHold) { + return false; + } + return !this.transactionData.reversed; + } + releaseAmount(): void { const releaseAmountDialogRef = this.dialog.open(ReleaseAmountDialogComponent); releaseAmountDialogRef.afterClosed().subscribe((response: any) => { diff --git a/src/app/shared/models/general.model.ts b/src/app/shared/models/general.model.ts new file mode 100644 index 0000000000..2814702408 --- /dev/null +++ b/src/app/shared/models/general.model.ts @@ -0,0 +1,71 @@ +import { OptionData } from './option-data.model'; + +export interface Currency { + code: string; + name: string; + decimalPlaces?: number; + inMultiplesOf?: number; + displaySymbol?: string; + nameCode?: string; + displayLabel?: string; +} + +export interface GLAccount { + id: number; + name: string; + glCode: string; + description: string; + disabled: boolean; + manualEntriesAllowed: boolean; + type: OptionData; + usage: OptionData; +} + +export interface AccountingMapping { + id: number; + name: string; + glCode: string; +} + +export interface ChargeToIncomeAccountMapping { + charge: Charge; + incomeAccount: AccountingMapping; +} + +export interface PaymentChannelToFundSourceMapping { + paymentType: PaymentType; + fundSourceAccount: AccountingMapping; +} + +export interface PaymentType { + id: number; + name: string; + isSystemDefined: boolean; +} + +export interface PaymentTypeOption { + id: number; + name: string; + description: string; + isCashPayment: boolean; + isSystemDefined: boolean; + position: number; +} + +export interface Charge { + id: number; + name: string; + active?: boolean; + penalty: boolean; + freeWithdrawal?: boolean; + freeWithdrawalChargeFrequency?: number; + restartFrequency?: number; + restartFrequencyEnum?: number; + isPaymentType?: boolean; + currency?: Currency; + amount?: number; + chargeTimeType?: Charge; + chargeAppliesTo?: Charge; + chargeCalculationType?: Charge; + chargePaymentMode?: Charge; +} diff --git a/src/app/shared/models/option-data.model.ts b/src/app/shared/models/option-data.model.ts new file mode 100644 index 0000000000..0159694270 --- /dev/null +++ b/src/app/shared/models/option-data.model.ts @@ -0,0 +1,10 @@ +export interface OptionData { + code: string; + id: number; + value: string; +} + +export interface CodeName { + code: string; + name: string; +}