<%- include('../partials/header', { activeMenu: 'dashboard' }) %>
💰
<%= formatINR(stats.totalFreight) %> Total Freight
<%= formatINR(stats.totalCommission) %> Commission Earned
<%= formatINR(stats.totalPendingShipper) %> Pending Collection
🚚
<%= stats.totalLoads %> Total Loads (<%= stats.settledCount %> settled)

Recent Loads

View All
<% if (recentLoads.length === 0) { %>

No loads yet. Add your first load

<% } else { %>
<% for (const load of recentLoads) { %> <% } %>
Date Route Freight Status
<%= load.date || '—' %> <%= load.from_city || '?' %> → <%= load.to_city || '?' %> <%= formatINR(load.freight_charged) %> <%= load.status %>
<% } %>

⏰ Pending Collections

<% if (pendingCollection.length === 0) { %>

No pending collections. Great job!

<% } else { %>
<% for (const load of pendingCollection) { %> <% } %>
Shipper Route Pending
<%= load.shipper_id || '—' %> <%= load.from_city || '?' %> → <%= load.to_city || '?' %> <%= formatINR(load.pending_from_shipper) %>
<% } %>

Status Breakdown

<% for (const [status, count] of Object.entries(statusCounts)) { %>
<%= count %> <%= status %>
<% } %>
<%- include('../partials/footer') %>