Skip to content

Commit

Permalink
fix: get manager ID from approval chain
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Dec 2, 2024
1 parent feffdee commit 021d784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7191,7 +7191,7 @@ function submitReport(expenseReport: OnyxTypes.Report) {
const optimisticSubmittedReportAction = ReportUtils.buildOptimisticSubmittedReportAction(expenseReport?.total ?? 0, expenseReport.currency ?? '', expenseReport.reportID, adminAccountID);
const optimisticNextStep = NextStepUtils.buildNextStep(expenseReport, isSubmitAndClosePolicy ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.SUBMITTED);
const approvalChain = ReportUtils.getApprovalChain(PolicyUtils.getPolicy(expenseReport?.policyID), expenseReport);
const managerID = approvalChain.length ? Number(approvalChain.at(0)) : undefined;
const managerID = PersonalDetailsUtils.getAccountIDsByLogins(approvalChain).at(0);

const optimisticData: OnyxUpdate[] = !isSubmitAndClosePolicy
? [
Expand Down

0 comments on commit 021d784

Please sign in to comment.