Description
The revenue calculation on the Dashboard sums all orders regardless
of their status. This means cancelled orders are counted towards
totalRevenue, showing inflated/incorrect earnings to the entrepreneur.
Location
client/src/pages/Dashboard.jsx line 82
Current Behavior
Total revenue includes cancelled orders in the sum.
Expected Behavior
Only non-cancelled orders (pending, confirmed, shipped, delivered)
should be counted in totalRevenue.
Proposed Fix
// Before
orders.reduce((sum, o) => sum + o.total, 0)
// After
orders
.filter(o => o.status !== 'cancelled')
.reduce((sum, o) => sum + o.total, 0)
Labels
level:beginner type:bug
I am a GSSoC 2026 contributor and would like to work on this issue.
Can I get this assigned to me?
Description
The revenue calculation on the Dashboard sums all orders regardless
of their status. This means cancelled orders are counted towards
totalRevenue, showing inflated/incorrect earnings to the entrepreneur.
Location
client/src/pages/Dashboard.jsxline 82Current Behavior
Total revenue includes cancelled orders in the sum.
Expected Behavior
Only non-cancelled orders (pending, confirmed, shipped, delivered)
should be counted in totalRevenue.
Proposed Fix
Labels
level:beginnertype:bugI am a GSSoC 2026 contributor and would like to work on this issue.
Can I get this assigned to me?