diff --git a/src/app/admin/rentals/page.tsx b/src/app/admin/rentals/page.tsx index 7d2bf5a..d419759 100644 --- a/src/app/admin/rentals/page.tsx +++ b/src/app/admin/rentals/page.tsx @@ -36,6 +36,7 @@ interface Rental { batteryId?: string; batteryName?: string; batteryRent?: number; + batteryRentPending?: number; type: RentalType; status: RentalStatus; startDate: string; @@ -702,7 +703,7 @@ export default function RentalsPage() { ? Math.round(batteryRent / 4) : batteryRent; const totalRent = bikeRent + batteryRentAdjusted; - const due = rental.pendingRent + rental.batteryRentPending || 0; + const due = (rental.pendingRent || 0) + (rental.batteryRentPending || 0); const penalty = rental.penaltyAmount || 0; const totalDue = due + penalty; const periodLabel = rental.subscriptionType === 'daily' ? 'day' : rental.subscriptionType === 'weekly' ? 'wk' : 'mo';