You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-07] [ECARD TRANSACTIONS] We're showing the total amount in the pay button, which includes non-reimbursable expenses, rather than the reimbursable total #34618
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff
For some context see this PR where I discussed how report.total does include the non-reimbursable amount.
Therefore, I think we can fix this by doing the equivalent of this:
diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts
index e653d79a74..b310fe79a3 100644
--- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -1705,28 +1705,6 @@ function hasNonReimbursableTransactions(iouReportID: string | undefined): boolea
diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts
index e653d79a74..b310fe79a3 100644
--- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -1705,28 +1705,6 @@ function hasNonReimbursableTransactions(iouReportID: string | undefined): boolea
return transactions.filter((transaction) => transaction.reimbursable === false).length > 0;
}
-function getMoneyRequestReimbursableTotal(report: OnyxEntry<Report>, allReportsDict: OnyxCollection<Report> = null): number {
- const allAvailableReports = allReportsDict ?? allReports;
- let moneyRequestReport: OnyxEntry<Report> | undefined;
- if (isMoneyRequestReport(report)) {
- moneyRequestReport = report;
- }
- if (allAvailableReports && report?.iouReportID) {
- moneyRequestReport = allAvailableReports[`${ONYXKEYS.COLLECTION.REPORT}${report.iouReportID}`];
- }
- if (moneyRequestReport) {
- const total = moneyRequestReport?.total ?? 0;
-
- if (total !== 0) {
- // There is a possibility that if the Expense report has a negative total.
- // This is because there are instances where you can get a credit back on your card,
- // or you enter a negative expense to “offset” future expenses
- return isExpenseReport(moneyRequestReport) ? total * -1 : Math.abs(total);
- }
- }
- return 0;
-}
-
function getMoneyRequestSpendBreakdown(report: OnyxEntry<Report>, allReportsDict: OnyxCollection<Report> = null): SpendBreakdown {
const allAvailableReports = allReportsDict ?? allReports;
let moneyRequestReport;
@@ -1764,6 +1742,11 @@ function getMoneyRequestSpendBreakdown(report: OnyxEntry<Report>, allReportsDict
};
}
+function getMoneyRequestReimbursableTotal(report: OnyxEntry<Report>, allReportsDict: OnyxCollection<Report> = null): number {
+ return getMoneyRequestSpendBreakdown(report, allReportsDict).reimbursableSpend;
+}
+
+
/**
* Get the title for a policy expense chat which depends on the role of the policy member seeing this report
*/
(END)
but I am labelling as internal as I want to be sure that the amount that the user is charged is correct as well
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff
Activity
melvin-bot commentedon Jan 16, 2024
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 18, 2024
Job added to Upwork: https://www.upwork.com/jobs/~010be8d278766b8dcd
melvin-bot commentedon Jan 18, 2024
Triggered auto assignment to Contributor Plus for review of internal employee PR - @ntdiary (
Internal)grgia commentedon Jan 19, 2024
Notes for internal employee
For some context see this PR where I discussed how report.total does include the non-reimbursable amount.
Therefore, I think we can fix this by doing the equivalent of this:
but I am labelling as internal as I want to be sure that the amount that the user is charged is correct as well
35 remaining items
CortneyOfstad commentedon Feb 7, 2024
Perfect and for the payment — $500 correct @luacmartins? I'm thinking so, but just wanted a gut check. Thanks!
luacmartins commentedon Feb 7, 2024
Yes!
CortneyOfstad commentedon Feb 7, 2024
Perfect! @rushatgabhane below is the payment summary request for you!
Payment Summary
@rushatgabhane (reviewer) — to be paid $500 via NewDot
CortneyOfstad commentedon Feb 7, 2024
(not going to close this until the payment is accepted in NewDot 👍 )
CortneyOfstad commentedon Feb 9, 2024
@rushatgabhane have you requested payment in NewDot?
CortneyOfstad commentedon Feb 12, 2024
Bump @rushatgabhane ^^^ thanks!
rushatgabhane commentedon Feb 12, 2024
@CortneyOfstad thanks so much! Requested here - https://staging.new.expensify.com/w/9132779747441AFB/r/2019214606958814
JmillsExpensify commentedon Feb 12, 2024
$500 approved for @rushatgabhane based on this comment.