Skip to content

fix: exclude cancelled orders from totalRevenue on Dashboard#5

Open
vinamra1102 wants to merge 1 commit into
Dhanika-Bhat:mainfrom
vinamra1102:main
Open

fix: exclude cancelled orders from totalRevenue on Dashboard#5
vinamra1102 wants to merge 1 commit into
Dhanika-Bhat:mainfrom
vinamra1102:main

Conversation

@vinamra1102
Copy link
Copy Markdown

What this fixes

Closes #4

Cancelled orders were being included in the totalRevenue calculation
on the entrepreneur Dashboard, showing incorrect inflated earnings.

Change made

client/src/pages/Dashboard.jsx line 82 — added .filter() to
exclude orders with status cancelled before summing revenue.

Before / After

  • Before: All orders counted regardless of status
  • After: Only active orders (pending/confirmed/shipped/delivered)
    counted in revenue

Type

  • Bug fix
  • Feature
  • Documentation

The totalRevenue calculation on the entrepreneur Dashboard was
including cancelled orders, showing inflated earnings that don't
reflect actual income.

Changed the calculation to filter out cancelled orders before
summing the totalAmount.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@vinamra1102 is attempting to deploy a commit to the dhanika2006-7071's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vinamra1102
Copy link
Copy Markdown
Author

Hi @Dhanika-Bhat, just following up on this PR when you get a chance!

The fix is ready only 1 file changed in Dashboard.jsx line 82,
no conflicts. The Vercel check needs your authorization to deploy
but that shouldn't block the merge.

Happy to make any changes if needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Dashboard totalRevenue incorrectly includes cancelled orders

1 participant