Advance payment strategy with Adjust last, unpaid period reschedule method
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
521fc015df
commit
bf93f6c80f
@@ -180,7 +180,7 @@ export class AccountingComponent implements OnInit, AfterViewInit {
|
||||
this.router.navigate(['/accounting/closing-entries']);
|
||||
}
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ export class ClientAddressStepComponent {
|
||||
let formfields: FormfieldBase[] = [];
|
||||
|
||||
for (let index = 0; index < this.clientTemplate.address[0].addressTypeIdOptions.length; index++) {
|
||||
this.clientTemplate.address[0].addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientTemplate.address[0].addressTypeIdOptions[index].name}`)
|
||||
this.clientTemplate.address[0].addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientTemplate.address[0].addressTypeIdOptions[index].name}`);
|
||||
}
|
||||
|
||||
formfields.push(this.isFieldEnabled('addressType') ? new SelectBase({
|
||||
|
||||
@@ -143,7 +143,7 @@ export class AddressTabComponent {
|
||||
let formfields: FormfieldBase[] = [];
|
||||
|
||||
for (let index = 0; index < this.clientAddressTemplate.addressTypeIdOptions.length; index++) {
|
||||
this.clientAddressTemplate.addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientAddressTemplate.addressTypeIdOptions[index].name}`)
|
||||
this.clientAddressTemplate.addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientAddressTemplate.addressTypeIdOptions[index].name}`);
|
||||
}
|
||||
|
||||
if (formType === 'add') {
|
||||
|
||||
@@ -73,7 +73,7 @@ export class IdentitiesTabComponent {
|
||||
*/
|
||||
addIdentifier() {
|
||||
for (let index = 0; index < this.clientIdentifierTemplate.allowedDocumentTypes.length; index++) {
|
||||
this.clientIdentifierTemplate.allowedDocumentTypes[index].name = this.translateService.instant(`labels.catalogs.${this.clientIdentifierTemplate.allowedDocumentTypes[index].name}`)
|
||||
this.clientIdentifierTemplate.allowedDocumentTypes[index].name = this.translateService.instant(`labels.catalogs.${this.clientIdentifierTemplate.allowedDocumentTypes[index].name}`);
|
||||
}
|
||||
const formfields: FormfieldBase[] = [
|
||||
new SelectBase({
|
||||
|
||||
@@ -22,7 +22,7 @@ export class BulkImportComponent implements OnInit {
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
*/
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ export class OrganizationComponent implements OnInit, AfterViewInit {
|
||||
this.router.navigate(['/products/recurring-deposit-products']);
|
||||
}
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
+1
-1
@@ -372,7 +372,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="isAdvancedPaymentAllocation && supportedInterestRefundTypes.length > 0">
|
||||
<div fxFlexFill *ngIf="isAdvancedPaymentAllocation && supportedInterestRefundTypes?.length > 0">
|
||||
<span fxFlex="47%">{{ 'labels.inputs.Supported Interest Refund Types' | translate}}:</span>
|
||||
<span fxFlex="53%">
|
||||
{{mapHumanReadableValueStringEnumOptionDataList(supportedInterestRefundTypes)}}
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{'labels.inputs.Advance payments adjustment type' | translate}}</mat-label>
|
||||
<mat-select formControlName="rescheduleStrategyMethod" required>
|
||||
<mat-select formControlName="rescheduleStrategyMethod" required [disabled]="rescheduleStrategyTypeDisabled">
|
||||
<mat-option *ngFor="let rescheduleStrategyType of rescheduleStrategyTypeData" [value]="rescheduleStrategyType.id">
|
||||
{{ rescheduleStrategyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
|
||||
+30
-5
@@ -32,7 +32,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
daysInYearTypeData: any;
|
||||
daysInMonthTypeData: any;
|
||||
preClosureInterestCalculationStrategyData: any;
|
||||
rescheduleStrategyTypeData: any;
|
||||
rescheduleStrategyTypeData: OptionData[];
|
||||
rescheduleStrategyTypeDataBase: OptionData[];
|
||||
interestRecalculationCompoundingTypeData: any;
|
||||
interestRecalculationFrequencyTypeData: any;
|
||||
interestRecalculationNthDayTypeData: any;
|
||||
@@ -44,6 +45,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
isAdvancedTransactionProcessingStrategy = false;
|
||||
advancedTransactionProcessingStrategyDisabled = true;
|
||||
useDueForRepaymentsConfigurations = false;
|
||||
rescheduleStrategyTypeDisabled = false;
|
||||
|
||||
/** Values to Days for Repayments */
|
||||
defaultConfigValues: GlobalConfiguration[] = [];
|
||||
@@ -73,6 +75,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.daysInMonthTypeData = this.loanProductsTemplate.daysInMonthTypeOptions;
|
||||
this.preClosureInterestCalculationStrategyData = this.loanProductsTemplate.preClosureInterestCalculationStrategyOptions;
|
||||
this.rescheduleStrategyTypeData = this.loanProductsTemplate.rescheduleStrategyTypeOptions;
|
||||
this.rescheduleStrategyTypeDataBase = this.loanProductsTemplate.rescheduleStrategyTypeOptions;
|
||||
this.interestRecalculationCompoundingTypeData = this.loanProductsTemplate.interestRecalculationCompoundingTypeOptions;
|
||||
this.interestRecalculationFrequencyTypeData = this.loanProductsTemplate.interestRecalculationFrequencyTypeOptions;
|
||||
this.interestRecalculationNthDayTypeData = this.loanProductsTemplate.interestRecalculationNthDayTypeOptions;
|
||||
@@ -125,9 +128,6 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.processingStrategyService.initialize(this.isAdvancedTransactionProcessingStrategy);
|
||||
this.validateAdvancedPaymentStrategyControls();
|
||||
|
||||
console.log(this.loanProductsTemplate.dueDaysForRepaymentEvent);
|
||||
console.log(this.loanProductsTemplate.overDueDaysForRepaymentEvent);
|
||||
|
||||
if (this.loanProductsTemplate.dueDaysForRepaymentEvent != null &&
|
||||
this.loanProductsTemplate.overDueDaysForRepaymentEvent != null) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
@@ -283,7 +283,9 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanProductSettingsForm.addControl('interestRecalculationCompoundingMethod', new UntypedFormControl(this.interestRecalculationCompoundingTypeData[0].id, Validators.required));
|
||||
this.loanProductSettingsForm.addControl('recalculationRestFrequencyType', new UntypedFormControl(this.interestRecalculationFrequencyTypeData[0].id, Validators.required));
|
||||
this.loanProductSettingsForm.addControl('isArrearsBasedOnOriginalSchedule', new UntypedFormControl(''));
|
||||
|
||||
if (this.loanProductSettingsForm.value.isInterestRecalculationEnabled) {
|
||||
this.setRescheduleStrategies();
|
||||
}
|
||||
this.loanProductSettingsForm.get('interestRecalculationCompoundingMethod').valueChanges
|
||||
.subscribe((interestRecalculationCompoundingMethod: any) => {
|
||||
if (interestRecalculationCompoundingMethod !== 0) {
|
||||
@@ -485,10 +487,33 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
});
|
||||
this.isAdvancedTransactionProcessingStrategy = true;
|
||||
}
|
||||
if (this.loanProductSettingsForm.value.isInterestRecalculationEnabled) {
|
||||
this.setRescheduleStrategies();
|
||||
}
|
||||
this.processingStrategyService.initialize(this.isAdvancedTransactionProcessingStrategy);
|
||||
});
|
||||
}
|
||||
|
||||
private setRescheduleStrategies() {
|
||||
if (this.advancedTransactionProcessingStrategyDisabled) {
|
||||
this.rescheduleStrategyTypeData = this.rescheduleStrategyTypeDataBase.filter(
|
||||
(o: OptionData) => o.id > 3
|
||||
);
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'rescheduleStrategyMethod': this.rescheduleStrategyTypeData[0].id
|
||||
});
|
||||
this.rescheduleStrategyTypeDisabled = true;
|
||||
} else {
|
||||
this.rescheduleStrategyTypeData = this.rescheduleStrategyTypeDataBase.filter(
|
||||
(o: OptionData) => o.id < 4
|
||||
);
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'rescheduleStrategyMethod': this.rescheduleStrategyTypeData[0].id
|
||||
});
|
||||
this.rescheduleStrategyTypeDisabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private getGlobalConfigValue(configName: string): number {
|
||||
let value: number | null = null;
|
||||
this.defaultConfigValues.forEach((config: GlobalConfiguration) => {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ManageDelinquencyBucketsComponent implements OnInit {
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
*/
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ManageTaxConfigurationsComponent implements OnInit {
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
*/
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ export class ProductsComponent implements OnInit, AfterViewInit {
|
||||
this.router.navigate(['/products/fixed-deposit-products']);
|
||||
}
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ExternalServicesComponent implements OnInit {
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
*/
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export class SystemComponent implements OnInit, AfterViewInit {
|
||||
this.router.navigate(['/organization/manage-funds']);
|
||||
}
|
||||
|
||||
arrowBooleansToggle(arrowNumber:number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user