diff --git a/src/app/core/models/generated-form-properties.model.ts b/src/app/core/models/generated-form-properties.model.ts index e766b954fc..cc408ed040 100644 --- a/src/app/core/models/generated-form-properties.model.ts +++ b/src/app/core/models/generated-form-properties.model.ts @@ -17,7 +17,7 @@ export interface GeneratedFormProperties { txn_dt: Date; receipt_ids: string[]; custom_properties: Partial[]; - ccce_group_id?: string; + ccce_group_id: string; from_dt: Date; to_dt: Date; flight_journey_travel_class: string; diff --git a/src/app/fyle/merge-expense/merge-expense.page.ts b/src/app/fyle/merge-expense/merge-expense.page.ts index bcec1fa0bd..bc727ac14f 100644 --- a/src/app/fyle/merge-expense/merge-expense.page.ts +++ b/src/app/fyle/merge-expense/merge-expense.page.ts @@ -581,6 +581,7 @@ export class MergeExpensePage implements OnInit, AfterViewChecked { (expense) => expense.source_account_type === this.genericFieldsFormValues.paymentMode ); const amountExpense = this.expenses.find((expense) => expense.tx_id === this.genericFieldsFormValues.amount); + const CCCMatchedExpense = this.expenses.find((expense) => !!expense.tx_corporate_credit_card_expense_group_id); let locations: Destination[]; if (this.categoryDependentFieldsFormValues.location_1 && this.categoryDependentFieldsFormValues.location_2) { locations = [ @@ -613,6 +614,7 @@ export class MergeExpensePage implements OnInit, AfterViewChecked { ...projectDependantFieldValues, ...costCenterDependentFieldValues, ], + ccce_group_id: CCCMatchedExpense?.tx_corporate_credit_card_expense_group_id, from_dt: this.categoryDependentFieldsFormValues.from_dt, to_dt: this.categoryDependentFieldsFormValues.to_dt, flight_journey_travel_class: this.categoryDependentFieldsFormValues.flight_journey_travel_class,