fix: separate full month fund from prorated fund
Monthly cards show full month fund (e.g., 168h for 21 days). Yearly summary table uses fund_to_date (prorated to today for current month) so the +/- column is accurate mid-month. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -275,7 +275,8 @@ export default function AttendanceBalances() {
|
||||
let totalWorked = 0
|
||||
let totalCovered = 0
|
||||
for (const monthData of Object.values(fundData.months)) {
|
||||
totalFund += monthData.fund
|
||||
// Use prorated fund (fund_to_date) for current month, full fund for past
|
||||
totalFund += (monthData as any).fund_to_date ?? monthData.fund
|
||||
const us = monthData.users?.[userId]
|
||||
if (us) {
|
||||
totalWorked += us.worked
|
||||
|
||||
Reference in New Issue
Block a user