diff --git a/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts b/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts index f97df02f4e..145da47d5c 100644 --- a/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts +++ b/src/app/fyle/add-edit-mileage/add-edit-mileage.page.ts @@ -2380,7 +2380,8 @@ export class AddEditMileagePage implements OnInit { cost_center_name: formValue.costCenter && formValue.costCenter.name, cost_center_code: formValue.costCenter && formValue.costCenter.code, commute_deduction: this.showCommuteDeductionField ? formValue.commuteDeduction : null, - commute_details_id: this.showCommuteDeductionField ? this.commuteDetails?.id : null, + commute_details_id: + this.showCommuteDeductionField && formValue.commuteDeduction ? this.commuteDetails?.id : null, }, dataUrls: [], ou: etxn.ou,