Skip to content

Commit

Permalink
Installment level delinquency setting at loan account level
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Alberto Hernandez authored and alberto-art3ch committed May 9, 2024
1 parent 8fdf8fb commit 7e607d6
Show file tree
Hide file tree
Showing 33 changed files with 120 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class FixedDepositAccountViewComponent implements OnInit {
case 'Undo Approval':
case 'Undo Activation':
case 'Add Charge':
case 'Withdraw By Client':
case 'Withdrawn by Client':
case 'Premature Close':
this.router.navigate([`actions/${name}`], { relativeTo: this.route });
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class FixedDepositsButtonsConfiguration {
name: 'Reject'
},
{
name: 'Withdraw By Client'
name: 'Withdrawn by Client'
},
{
name: 'Add Charge'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<mifosx-reject-fixed-deposits-account *ngIf="actions['Reject']"></mifosx-reject-fixed-deposits-account>
<mifosx-activate-fixed-deposits-account *ngIf="actions['Activate']"></mifosx-activate-fixed-deposits-account>
<mifosx-undo-approval-fixed-deposits-account *ngIf="actions['Undo Approval'] || actions['Undo Activation']"></mifosx-undo-approval-fixed-deposits-account>
<mifosx-withdraw-by-client-fixed-deposits-account *ngIf="actions['Withdraw By Client']"></mifosx-withdraw-by-client-fixed-deposits-account>
<mifosx-withdraw-by-client-fixed-deposits-account *ngIf="actions['Withdrawn by Client']"></mifosx-withdraw-by-client-fixed-deposits-account>
<mifosx-add-charge-fixed-deposits-account *ngIf="actions['Add Charge']"></mifosx-add-charge-fixed-deposits-account>
<mifosx-premature-close-fixed-deposits-account *ngIf="actions['Premature Close']"></mifosx-premature-close-fixed-deposits-account>
<mifosx-close-fixed-deposits-account *ngIf="actions['Close']"></mifosx-close-fixed-deposits-account>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class FixedDepositsAccountActionsComponent {
'Undo Activation': boolean
'Add Charge': boolean
'Premature Close': boolean
'Withdraw By Client': boolean
'Withdrawn by Client': boolean
} = {
'Approve': false,
'Reject': false,
Expand All @@ -32,7 +32,7 @@ export class FixedDepositsAccountActionsComponent {
'Undo Activation': false,
'Add Charge': false,
'Premature Close': false,
'Withdraw By Client': false
'Withdrawn by Client': false
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FixedDepositsService } from 'app/deposits/fixed-deposits/fixed-deposits
import { SettingsService } from 'app/settings/settings.service';

/**
* Withdraw By Client Fixed Deposits Account Component
* Withdrawn by Client Fixed Deposits Account Component
*/
@Component({
selector: 'mifosx-withdraw-by-client-fixed-deposits-account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<mifosx-undo-approval-recurring-deposits-account *ngIf="actions['Undo Approval'] || actions['Undo Activation']"></mifosx-undo-approval-recurring-deposits-account>
<mifosx-approve-recurring-deposits-account *ngIf="actions['Approve']"></mifosx-approve-recurring-deposits-account>
<mifosx-reject-recurring-deposits-account *ngIf="actions['Reject']"></mifosx-reject-recurring-deposits-account>
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdrawn by client']"></mifosx-withdraw-by-client-recurring-deposits-account>
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdrawn by Client']"></mifosx-withdraw-by-client-recurring-deposits-account>
<mifosx-add-charge-recurring-deposits-account *ngIf="actions['Add Charge']"></mifosx-add-charge-recurring-deposits-account>
<mifosx-premature-close-recurring-deposit-account *ngIf="actions['Premature Close']"></mifosx-premature-close-recurring-deposit-account>
<mifosx-close-recurring-deposits-account *ngIf="actions['Close']"></mifosx-close-recurring-deposits-account>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class RecurringDepositsAccountActionsComponent {
'Undo Approval': boolean
'Approve': boolean
'Reject': boolean
'Withdrawn by client': boolean
'Withdrawn by Client': boolean
'Add Charge': boolean
'Premature Close': boolean
'Close': boolean
Expand All @@ -28,7 +28,7 @@ export class RecurringDepositsAccountActionsComponent {
'Undo Approval': false,
'Approve': false,
'Reject': false,
'Withdrawn by client': false,
'Withdrawn by Client': false,
'Add Charge': false,
'Premature Close': false,
'Close': false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Dates } from 'app/core/utils/dates';
import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service';
import { SettingsService } from 'app/settings/settings.service';
/**
* Withdraw By Client Recurring Deposits Account Component
* Withdrawn by Client Recurring Deposits Account Component
*/
@Component({
selector: 'mifosx-withdraw-by-client-recurring-deposits-account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
case 'Reject':
case 'Undo Approval':
case 'Add Charge':
case 'Withdrawn by client':
case 'Withdrawn by Client':
case 'Premature Close':
case 'Close':
case 'Deposit':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class RecurringDepositsButtonsConfiguration {
taskPermissionName: 'REJECT_RECURRINGDEPOSITACCOUNT'
},
{
name: 'Withdrawn by client',
name: 'Withdrawn by Client',
icon: 'arrow-down',
taskPermissionName: 'WITHDRAW_RECURRINGDEPOSITACCOUNT'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ <h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Moratorium" | translate}} <i c
<input type="number" matInput formControlName="fixedEmiAmount">
</mat-form-field>

<ng-container *ngIf="isDelinquencyEnabled()">
<mat-checkbox fxFlex="48%" formControlName="enableInstallmentLevelDelinquency">
<p>{{'labels.inputs.Enable installment level Delinquency' | translate}}</p>
</mat-checkbox>
</ng-container>

<ng-container *ngIf="loansAccountTermsData?.isTopup">

<mat-checkbox fxFlex="20%" formControlName="isTopup">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute } from '@angular/router';
import { LoansAccountAddCollateralDialogComponent } from 'app/loans/custom-dialog/loans-account-add-collateral-dialog/loans-account-add-collateral-dialog.component';
import { LoanProducts } from 'app/products/loan-products/loan-products';
import { LoanProduct } from 'app/products/loan-products/models/loan-product.model';
import { SettingsService } from 'app/settings/settings.service';
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
Expand Down Expand Up @@ -86,6 +87,7 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
loanId: any = null;

loanScheduleType: OptionData | null = null;
loanProduct: LoanProduct | null = null;

/**
* Create Loans Account Terms Form
Expand All @@ -110,6 +112,10 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
this.loansAccountTermsData = this.loansAccountTemplate;
}

if (this.loansAccountTermsData.product) {
this.loanProduct = this.loansAccountTermsData.product;
}

this.loansAccountTermsForm.patchValue({
'principalAmount': this.loansAccountTermsData.principal,
'loanTermFrequency': this.loansAccountTermsData.termFrequency,
Expand Down Expand Up @@ -149,7 +155,9 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
this.totalMultiDisbursed += item.principal;
});
}

if (this.isDelinquencyEnabled()) {
this.loansAccountTermsForm.addControl('enableInstallmentLevelDelinquency', new UntypedFormControl(this.loanProduct.enableInstallmentLevelDelinquency));
}
this.collateralDataSource = this.loansAccountTermsData.collateral || [];

const allowAttributeOverrides = this.loansAccountTermsData.product.allowAttributeOverrides;
Expand Down Expand Up @@ -502,6 +510,13 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
}
}

isDelinquencyEnabled(): boolean {
if (!this.loanProduct || !this.loanProduct.delinquencyBucket) {
return false;
}
return true;
}

/**
* Returns loans account terms form value.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app/loans/loans-view/loan-accounts-button-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class LoansAccountButtonConfiguration {
case 'Submitted and pending approval':
this.optionArray = [
{
name: 'Withdrawn by client',
name: 'Withdrawn by Client',
taskPermissionName: 'WITHDRAW_LOAN',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ <h3 class="mat-h3" fxFlexFill>{{ 'labels.inputs.Loan Schedule' | translate}}</h3

<div fxFlexFill>
<span fxFlex="47%">{{ 'labels.inputs.Repayment Strategy' | translate}}:</span>
<span fxFlex="53%" class="repayment-strategy">{{ loanProduct.transactionProcessingStrategyName }}</span>
<span fxFlex="53%" class="repayment-strategy">{{ loanProduct.transactionProcessingStrategyName | translateCatalog }}</span>
</div>

<div fxFlexFill *ngIf="isAdvancedPaymentAllocation">
Expand Down Expand Up @@ -404,7 +404,7 @@ <h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Moratorium' | translate}}</h3>
<span fxFlex="53%">{{ 'labels.inputs.Unassigned' | translate }}</span>
</div>

<div fxFlexFill>
<div fxFlexFill *ngIf="loanProduct.delinquencyBucket">
<span fxFlex="47%">{{ 'labels.inputs.Enable installment level Delinquency' | translate}}:</span>
<span fxFlex="53%">{{ loanProduct.enableInstallmentLevelDelinquency | yesNo }}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h4 fxFlex="98%" class="mat-h4 m-r-10">{{'labels.inputs.Moratorium' | translate}
</button>
</mat-form-field>

<mat-checkbox fxFlex="48%" labelPosition="before" formControlName="enableInstallmentLevelDelinquency" class="margin-v">
<mat-checkbox fxFlex="48%" labelPosition="before" formControlName="enableInstallmentLevelDelinquency" class="margin-v" *ngIf="loanProductSettingsForm.value.delinquencyBucketId">
{{'labels.inputs.Enable installment level Delinquency' | translate}}
</mat-checkbox>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h4 fxFlex="98%" class="mat-h4">{{'labels.inputs.Principal' | translate}}<i clas
<mat-label>{{'labels.inputs.Installment day calculation from' | translate}} <i class="fas fa-question" matTooltip="Repayment schedule will start the installment dates from the submitted date or the disbursement date"></i></mat-label>
<mat-select formControlName="repaymentStartDateType" required>
<mat-option *ngFor="let repaymentStartDateType of repaymentStartDateTypeOptions" [value]="repaymentStartDateType.id">
{{ repaymentStartDateType.value | translate}}
{{ repaymentStartDateType.value | translateCatalog}}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<mifosx-post-interest-as-on-savings-account *ngIf="actions['Post Interest As On']"></mifosx-post-interest-as-on-savings-account>
<mifosx-savings-account-assign-staff *ngIf="actions['Assign Staff']"></mifosx-savings-account-assign-staff>
<mifosx-savings-account-unassign-staff *ngIf="actions['Unassign Staff']"></mifosx-savings-account-unassign-staff>
<mifosx-withdraw-by-client-savings-account *ngIf="actions['Withdraw By Client']"></mifosx-withdraw-by-client-savings-account>
<mifosx-withdraw-by-client-savings-account *ngIf="actions['Withdrawn by Client']"></mifosx-withdraw-by-client-savings-account>
<mifosx-add-charge-savings-account *ngIf="actions['Add Charge']"></mifosx-add-charge-savings-account>
<mifosx-savings-transactions [currencyCode]="currencyCode" *ngIf="actions['Withdrawal'] || actions['Deposit']"></mifosx-savings-transactions>
<mifosx-close-savings-account *ngIf="actions['Close']"></mifosx-close-savings-account>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SavingAccountActionsComponent {
'Assign Staff': boolean
'Add Charge': boolean
'Unassign Staff': boolean
'Withdraw By Client': boolean
'Withdrawn by Client': boolean
'Apply Annual Fees': boolean
'Hold Amount': boolean
'Block Account': boolean
Expand All @@ -46,7 +46,7 @@ export class SavingAccountActionsComponent {
'Assign Staff': false,
'Add Charge': false,
'Unassign Staff': false,
'Withdraw By Client': false,
'Withdrawn by Client': false,
'Apply Annual Fees': false,
'Hold Amount': false,
'Block Account': false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SavingsService } from 'app/savings/savings.service';
import { SettingsService } from 'app/settings/settings.service';

/**
* Withdraw By Client Savings Account Component
* Withdrawn by Client Savings Account Component
*/
@Component({
selector: 'mifosx-withdraw-by-client-savings-account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class SavingsAccountViewComponent implements OnInit {
case 'Block Deposit':
case 'Block Withdrawal':
case 'Unassign Staff':
case 'Withdraw By Client':
case 'Withdrawn by Client':
case 'Apply Annual Fees':
this.router.navigate([`actions/${name}`], { relativeTo: this.route });
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class SavingsButtonsConfiguration {
taskPermissionName: 'REJECT_SAVINGSACCOUNT'
},
{
name: 'Withdraw By Client',
name: 'Withdrawn by Client',
taskPermissionName: 'WITHDRAW_SAVINGSACCOUNT'
},
{
Expand Down
10 changes: 6 additions & 4 deletions src/assets/translations/cs-CS.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@
"Due fee": "Dlužný poplatek",
"Due principal": "Splatná jistina",
"Due interest": "Přiměřený zájem",
"In advanced penalty": "Pokuta předem",
"In advanced fee": "Poplatek předem",
"In advanced principal": "Předem ředitel",
"In advance penalty": "Pokuta předem",
"In advance fee": "Poplatek předem",
"In advance principal": "Předem ředitel",
"In advanced interest": "Zájem předem",
"Next installment": "Další splátka",
"Last installment": "Poslední splátka",
Expand Down Expand Up @@ -646,6 +646,8 @@
"SATURDAY": "SOBOTA",
"Interest posting": "Zveřejnění zájmu",
"Amount on hold": "Částka na počkání",
"Percentage": "Procento",
"Fixed Amount": "Pevná částka",
"Invalid": "Neplatný"
},
"commons": {
Expand Down Expand Up @@ -2408,7 +2410,7 @@
"View Guarantors": "Zobrazit garanty",
"Waive Interest": "Vzdát se úroků",
"Withdrawal": "Vybrání",
"Withdrawn by client": "Staženo klientem",
"Withdrawn by Client": "Staženo klientem",
"Write Off": "Odepsat",
"XBRL": "XBRL"
},
Expand Down
10 changes: 6 additions & 4 deletions src/assets/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@
"Due fee": "Fällige Gebühr",
"Due principal": "Fälliger Auftraggeber",
"Due interest": "Geschuldete Zinsen",
"In advanced penalty": "Vorabstrafe",
"In advanced fee": "Gebühr im Voraus",
"In advanced principal": "Im Voraus Auftraggeber",
"In advance penalty": "Vorabstrafe",
"In advance fee": "Gebühr im Voraus",
"In advance principal": "Im Voraus Auftraggeber",
"In advanced interest": "Im Voraus Zinsen",
"Next installment": "Nächste Folge",
"Last installment": "Letzte Rate",
Expand Down Expand Up @@ -646,6 +646,8 @@
"SATURDAY": "SAMSTAG",
"Interest posting": "Zinsbuchung",
"Amount on hold": "Zurückgestellter Betrag",
"Percentage": "Prozentsatz",
"Fixed Amount": "Fester Betrag",
"Invalid": "Ungültig"
},
"commons": {
Expand Down Expand Up @@ -2408,7 +2410,7 @@
"View Guarantors": "Garanten anzeigen",
"Waive Interest": "Verzichten Sie auf Zinsen",
"Withdrawal": "Rückzug",
"Withdrawn by client": "Vom Kunden zurückgezogen",
"Withdrawn by Client": "Vom Kunden zurückgezogen",
"Write Off": "Abschreiben",
"XBRL": "XBRL"
},
Expand Down
10 changes: 6 additions & 4 deletions src/assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@
"Due fee": "Due fee",
"Due principal": "Due principal",
"Due interest": "Due interest",
"In advanced penalty": "In advanced penalty",
"In advanced fee": "In advanced fee",
"In advanced principal": "In advanced principal",
"In advance penalty": "In advance penalty",
"In advance fee": "In advance fee",
"In advance principal": "In advance principal",
"In advanced interest": "In advanced interest",
"Next installment": "Next installment",
"Last installment": "Last installment",
Expand Down Expand Up @@ -646,6 +646,8 @@
"SATURDAY": "SATURDAY",
"Interest posting": "Interest posting",
"Amount on hold": "Amount on hold",
"Percentage": "Percentage",
"Fixed Amount": "Fixed Amount",
"Invalid": "Invalid"
},
"commons": {
Expand Down Expand Up @@ -2407,7 +2409,7 @@
"View Guarantors": "View Guarantors",
"Waive Interest": "Waive Interest",
"Withdrawal": "Withdrawal",
"Withdrawn by client": "Withdrawn by client",
"Withdrawn by Client": "Withdrawn by Client",
"Write Off": "Write Off",
"XBRL": "XBRL"
},
Expand Down

0 comments on commit 7e607d6

Please sign in to comment.