Skip to content

Commit

Permalink
check if a report is expense
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Feb 9, 2024
1 parent e70ec81 commit 12a28c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libs/NextStepUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ type BuildNextStepParameters = {
* @returns nextStep
*/
function buildNextStep(report: Report | EmptyObject, predictedNextStatus: ValueOf<typeof CONST.REPORT.STATUS_NUM>, {isPaidWithWallet}: BuildNextStepParameters = {}): ReportNextStep | null {
if (!ReportUtils.isExpenseReport(report)) {
return null;
}

const {policyID = '', ownerAccountID = -1, managerID = -1} = report;
const policy = ReportUtils.getPolicy(policyID);
const {submitsTo, harvesting, isPreventSelfApprovalEnabled, autoReportingFrequency, autoReportingOffset} = policy;
Expand Down

0 comments on commit 12a28c1

Please sign in to comment.