Merge pull request #3125 from alberto-art3ch/WEB-674/write-off-reason-on-product-level-same-write-off-reason_02

WEB-674: Write-Off reason on product level input field label issue
This commit is contained in:
Gopi Kishan
2026-02-10 22:15:53 +05:30
committed by GitHub
@@ -111,7 +111,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
'WriteOffReasonToExpense' 'WriteOffReasonToExpense'
].includes(this.formType)) { ].includes(this.formType)) {
const addData: AccountingMappingDTO = { const addData: AccountingMappingDTO = {
value: this.getValueData(response.data.value.chargeOffReasonCodeValueId), value: this.getValueData(response.data.value.reasonCodeValueId),
glAccount: this.getGlAccountData(response.data.value.expenseAccountId) glAccount: this.getGlAccountData(response.data.value.expenseAccountId)
}; };
this.addTableData(addData); this.addTableData(addData);
@@ -177,7 +177,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
'WriteOffReasonToExpense' 'WriteOffReasonToExpense'
].includes(this.formType)) { ].includes(this.formType)) {
updateData = { updateData = {
value: this.getValueData(response.data.value.chargeOffReasonCodeValueId), value: this.getValueData(response.data.value.reasonCodeValueId),
glAccount: this.getGlAccountData(response.data.value.expenseAccountId) glAccount: this.getGlAccountData(response.data.value.expenseAccountId)
}; };
} else if ([ } else if ([
@@ -235,7 +235,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
case 'ChargeOffReasonExpense': case 'ChargeOffReasonExpense':
return { return {
title: 'Map Charge-off reasons to Expense accounts', title: 'Map Charge-off reasons to Expense accounts',
formfields: this.getChargeOffReasonExpenseFormfields(values) formfields: this.getReasonsExpenseFormfields(values)
}; };
case 'BuydownFeeClassificationToIncome': case 'BuydownFeeClassificationToIncome':
return { return {
@@ -250,7 +250,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
case 'WriteOffReasonToExpense': case 'WriteOffReasonToExpense':
return { return {
title: 'Map Write-off reasons to Expense accounts', title: 'Map Write-off reasons to Expense accounts',
formfields: this.getChargeOffReasonExpenseFormfields(values) formfields: this.getReasonsExpenseFormfields(values)
}; };
} }
} }
@@ -321,14 +321,14 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
return formfields; return formfields;
} }
getChargeOffReasonExpenseFormfields(values?: any) { getReasonsExpenseFormfields(values?: any) {
const reasonOptions = this.accountingMappingOptions.filter( const reasonOptions = this.accountingMappingOptions.filter(
(item: any) => !this.currentFormValues.includes(item.id) (item: any) => !this.currentFormValues.includes(item.id)
); );
const formfields: FormfieldBase[] = [ const formfields: FormfieldBase[] = [
new SelectBase({ new SelectBase({
controlName: 'chargeOffReasonCodeValueId', controlName: 'reasonCodeValueId',
label: 'Charge-off reason', label: this.formType === 'ChargeOffReasonExpense' ? 'Charge-off reason' : 'Write-off reason',
value: values ? values.value.id : reasonOptions[0].id, value: values ? values.value.id : reasonOptions[0].id,
options: { label: 'name', value: 'id', data: reasonOptions }, options: { label: 'name', value: 'id', data: reasonOptions },
required: true, required: true,