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'
].includes(this.formType)) {
const addData: AccountingMappingDTO = {
value: this.getValueData(response.data.value.chargeOffReasonCodeValueId),
value: this.getValueData(response.data.value.reasonCodeValueId),
glAccount: this.getGlAccountData(response.data.value.expenseAccountId)
};
this.addTableData(addData);
@@ -177,7 +177,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
'WriteOffReasonToExpense'
].includes(this.formType)) {
updateData = {
value: this.getValueData(response.data.value.chargeOffReasonCodeValueId),
value: this.getValueData(response.data.value.reasonCodeValueId),
glAccount: this.getGlAccountData(response.data.value.expenseAccountId)
};
} else if ([
@@ -235,7 +235,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
case 'ChargeOffReasonExpense':
return {
title: 'Map Charge-off reasons to Expense accounts',
formfields: this.getChargeOffReasonExpenseFormfields(values)
formfields: this.getReasonsExpenseFormfields(values)
};
case 'BuydownFeeClassificationToIncome':
return {
@@ -250,7 +250,7 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
case 'WriteOffReasonToExpense':
return {
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;
}
getChargeOffReasonExpenseFormfields(values?: any) {
getReasonsExpenseFormfields(values?: any) {
const reasonOptions = this.accountingMappingOptions.filter(
(item: any) => !this.currentFormValues.includes(item.id)
);
const formfields: FormfieldBase[] = [
new SelectBase({
controlName: 'chargeOffReasonCodeValueId',
label: 'Charge-off reason',
controlName: 'reasonCodeValueId',
label: this.formType === 'ChargeOffReasonExpense' ? 'Charge-off reason' : 'Write-off reason',
value: values ? values.value.id : reasonOptions[0].id,
options: { label: 'name', value: 'id', data: reasonOptions },
required: true,