Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Billable parameter for Per Diem transactions #56066

Merged
merged 5 commits into from
Feb 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass billable back correctly
  • Loading branch information
Gonals committed Jan 30, 2025

Verified

This commit was signed with the committer’s verified signature.
kosmydel Jakub Kosmydel
commit 515ef9a669faf0adc989849697f8e3ec6ea01bc1
6 changes: 5 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
@@ -200,6 +200,7 @@ type MoneyRequestInformation = {
transactionThreadReportID: string;
createdReportActionIDForThread: string | undefined;
onyxData: OnyxData;
billable?: boolean;
};

type TrackExpenseInformation = {
@@ -2787,7 +2788,7 @@ function getPerDiemExpenseInformation(perDiemExpenseInformation: PerDiemExpenseI
const {parentChatReport, transactionParams, participantParams, policyParams = {}, moneyRequestReportID = ''} = perDiemExpenseInformation;
const {payeeAccountID = userAccountID, payeeEmail = currentUserEmail, participant} = participantParams;
const {policy, policyCategories, policyTagList} = policyParams;
const {comment = '', currency, created, category, tag, customUnit} = transactionParams;
const {comment = '', currency, created, category, tag, customUnit, billable} = transactionParams;

const amount = computePerDiemExpenseAmount(customUnit);
const merchant = computePerDiemExpenseMerchant(customUnit, policy);
@@ -2862,6 +2863,7 @@ function getPerDiemExpenseInformation(perDiemExpenseInformation: PerDiemExpenseI
merchant,
tag,
customUnit,
billable,
pendingFields: {subRates: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD},
},
});
@@ -2981,6 +2983,7 @@ function getPerDiemExpenseInformation(perDiemExpenseInformation: PerDiemExpenseI
successData,
failureData,
},
billable,
};
}

@@ -4460,6 +4463,7 @@ function submitPerDiemExpense(submitPerDiemExpenseInformation: PerDiemExpenseInf
transactionThreadReportID,
createdReportActionIDForThread,
onyxData,
billable,
} = getPerDiemExpenseInformation({
parentChatReport: currentChatReport,
participantParams,