mega-plant/app/(dashboard)
Dave 72900878ba fix(running): charge TLB06 for the months it was live, and not for November
TLB06 was paid off in October 2026, but the running-cost rule dropped a SETTLED
agreement from EVERY month, so the ten instalments it was really paying
(January-October, R290 360,80) vanished from the year to date.

An agreement is now charged for the months it was live, and its paid-off date
decides when the money stopped:

- LIVE: from its start through its paid-off date, or through the current month
  when no paid-off date is on record.
- SETTLED: up to its paid-off date - those instalments really were paid - and
  nothing at all when there is no paid-off date, because there is then no month
  we can say it paid for. "Settled" means paid off, or will be paid off by
  that date, so a settled agreement whose date is still ahead is still charged.

TLB06 is charged January-October and NOT November. Nothing else moves: every
other agreement's window already ran to November or beyond.

- Overview YTD R6 241 894,70 -> R6 532 255,50. The November figure is
  unchanged at R441 493,12.
- Financing register YTD instalments R4 395 038,56 -> R4 685 399,36, and
  "Committed for November" stays R399 548,96.

The Overview and the register still read ONE rule, so their finance year to
date is the same figure - asserted in lib/running-month.test.ts, together with
the TLB06 case and the live-agreement cases.

committedMonthly() in lib/financing.ts was never called and stated the old
rule, so it is gone rather than left lying next to the real one.
2026-11-05 01:56:26 +02:00
..
attendance Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
charts feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
employees Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
expenses Suppliers: dark-mode contrast for monthly figures and coloured text; heading drawn in the view (React key warning) 2026-10-29 21:16:54 +02:00
income feat(income): posted income per site, and the LIVE month on the overview 2026-11-05 00:19:06 +02:00
overheads feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
plant feat(plant): vehicle site history from Fuel Logs 2026-11-05 00:18:24 +02:00
running fix(running): charge TLB06 for the months it was live, and not for November 2026-11-05 01:56:26 +02:00
settings Cash float card, Office role + Slips tab, job card PDF, manual close/delete 2026-10-22 15:09:57 +02:00
sites feat(income): posted income per site, and the LIVE month on the overview 2026-11-05 00:19:06 +02:00
layout.tsx Suppliers: replace the menu entry with the new page, flag over-invoiced POs, audited invoice amount corrections 2026-10-29 20:49:05 +02:00
page.tsx feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00