mega-plant/data/source/overheads.json
David d055c344de feat(running): drive the charts and the profit from the running-cost register
The machine charts plotted the workbook's monthly_income.fixed_expenses, which
is NOT the app's running cost. So the charts and the /running Overview
disagreed about the same machine in the same month — CT01 by R 40 640, DT01 by
R 121 115. The workbook's figure also carries depreciation/ownership and an
operator allocation, which are capital recovery and overhead rather than
running cost.

Every cost value now comes from the running-cost register: fixed = insurance
+ financing, running = purchases. Profit is income - fixed - running, and it
is ONE formula on every surface, so /charts, /income and the dashboard quote
the same figure for the same machine.

  R 8 456 243  fleet income, Jan-Oct
- R 4 705 292  fixed   (insurance + financing, from the register)
- R   306 387  running (purchases, from the register)
= R 3 444 564  profit   (was R 2 510 908 on the workbook's fixed)

The legacy repairs sheet comes out completely. It was the old workbook's
"Plant Monthly Running Cost" — read by no page, maintained by nobody — and a
repair is bought on a purchase order, so its money is already in Purchases.
The collection is still seeded, so the history is not lost, but it is no
longer in any total, any chart or any profit.

Also:
  - the profit badge wears the CHART's own green, and profit is green and
    loss red on every surface. It was hard-coded to the teal brand colour,
    so the label and the line it labelled were two different colours.
  - September and October now state a profit instead of a dash: the dash
    existed because the workbook had not posted those months' fixed costs,
    and the register has the premium and the instalment for every month.
  - the containers and the water trailers show profit equal to their income,
    because the running-cost model carries no cost for them.

Overheads roll-up — an audit found three things out of order, and the roll-up
total itself reconciles exactly (R 580 485,37, unexplained R 0,00):

  - the dashboard's Overhead mix legend named only five of the six sections,
    so the figures it listed added up to R 565 489 against a headline of
    R 580 485, and the donut drew a slice nobody could name.
  - the /overheads note claimed machine instalments were excluded, while the
    Bastion Finance block on the same page carried R 115 575,94 of them and
    R 11 204,76 of insurance for the same machines. The note now says so,
    with the figures read off the rows at render time.
  - two Subscriptions rows had VAT that did not balance — the sheet had the
    TOTAL in the VAT cell (115%), and annual excl/VAT against a monthly
    total. Both are corrected on the client's instruction; the roll-up total
    does not move, only the VAT breakdown does, and the seed's VAT gate now
    passes instead of exiting non-zero.

Verified: 161 tests pass (4 new ones pin the register join), the production
build is clean, the reconciliation script passes, and the charts, the profit
label and the overhead legend were checked on screen.
2026-11-05 21:24:30 +02:00

277 lines
No EOL
6.3 KiB
JSON

[
{
"section": "Vehicle Costs",
"description": "Santam versekering",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 4524.0740000000005,
"vat": 798.366,
"amount_incl": 5322.4400000000005
},
{
"section": "Vehicle Costs",
"description": "Tracking",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 4524.0740000000005,
"vat": 798.366,
"amount_incl": 5322.4400000000005
},
{
"section": "Vehicle Costs",
"description": "Diesel Truck",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 1033.2916666666667,
"vat": 0.0,
"amount_incl": 1033.2916666666667
},
{
"section": "Vehicle Costs",
"description": "Water truck",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 3318.1416666666664,
"vat": 0.0,
"amount_incl": 3318.1416666666664
},
{
"section": "Bastion Finance",
"description": "TLB 4 LL20TW GP - Monthly Finance Costs",
"gl_account": "Finance Costs",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 29036.08,
"vat": 0.0,
"amount_incl": 29036.08
},
{
"section": "Bastion Finance",
"description": "TLB 5 LN58CS GP - Monthly Finance Costs",
"gl_account": "Finance Costs",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 29819.0,
"vat": 0.0,
"amount_incl": 29819.0
},
{
"section": "Bastion Finance",
"description": "Desi Grader - Monthly Finance Costs",
"gl_account": "Finance Costs",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 19088.95,
"vat": 0.0,
"amount_incl": 19088.95
},
{
"section": "Bastion Finance",
"description": "Roller - Monthly Finance Cost",
"gl_account": "Finance Costs",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 28641.0,
"vat": 0,
"amount_incl": 28641.0
},
{
"section": "Bastion Finance",
"description": "TLB 4 LL20TW GP - Insurance",
"gl_account": "Insurance",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 2088.53,
"vat": 313.27950000000004,
"amount_incl": 2401.8095000000003
},
{
"section": "Bastion Finance",
"description": "TLB 5 LN58CS GP - Insurance",
"gl_account": "Insurance",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 2432.72,
"vat": 364.90799999999996,
"amount_incl": 2797.6279999999997
},
{
"section": "Bastion Finance",
"description": "Desi Grader - Insurance",
"gl_account": "Insurance",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 2099.21,
"vat": 314.8815,
"amount_incl": 2414.0915
},
{
"section": "Bastion Finance",
"description": "Roller - Insurance",
"gl_account": "Insurance",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 1268.91,
"vat": 190.3365,
"amount_incl": 1459.2465000000002
},
{
"section": "Bastion Finance",
"description": "TLB 4 LL20TW GP - Tracker",
"gl_account": "Tracking",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 603.92,
"vat": 90.588,
"amount_incl": 694.5079999999999
},
{
"section": "Bastion Finance",
"description": "TLB 5 LN58CS GP - Tracker",
"gl_account": "Tracking",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 526.43,
"vat": 78.96449999999999,
"amount_incl": 605.3944999999999
},
{
"section": "Bastion Finance",
"description": "Toyota Bakkie - LD13HZ GP ",
"gl_account": "Finance Costs",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 7818.18,
"vat": 1172.727,
"amount_incl": 8990.907000000001
},
{
"section": "Bastion Finance",
"description": "Toyota Bakkie - LD13HZ GP ",
"gl_account": "Insurance",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 1853.9,
"vat": 278.085,
"amount_incl": 2131.985
},
{
"section": "Bastion Finance",
"description": "Toyota Bakkie - LD13HZ GP ",
"gl_account": "Tracking",
"supplier": "Bastion",
"qty": 0,
"unit_price": 0,
"amount_excl": 216.91,
"vat": 32.536500000000004,
"amount_incl": 249.44650000000001
},
{
"section": "Personnel",
"description": "Attie / Sandrea / Jantjie",
"gl_account": "Personnel",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 0,
"vat": 0,
"amount_incl": 157200.0
},
{
"section": "Personnel",
"description": "Opp + Drywers",
"gl_account": "Personnel",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 0,
"vat": 0,
"amount_incl": 235000.0
},
{
"section": "Subscriptions",
"description": "Abrie - CCS",
"gl_account": "CCS",
"supplier": "AEB",
"qty": 1.0,
"unit_price": 2150.0,
"amount_excl": 2150.0,
"vat": 322.5,
"amount_incl": 2472.5
},
{
"section": "Subscriptions",
"description": "Charl - CCS",
"gl_account": "CCS",
"supplier": "RIB",
"qty": 1.0,
"unit_price": 1970.0,
"amount_excl": 1970.0,
"vat": 295.5,
"amount_incl": 2265.5
},
{
"section": "Subscriptions",
"description": "Buildsmart Yearly update (R 14 827,91 p.a.)",
"gl_account": "Buildsmart",
"supplier": "Mega infra",
"qty": 1.0,
"unit_price": 1235.6591666666667,
"amount_excl": 1235.6591666666667,
"vat": 185.348875,
"amount_incl": 1421.0080416666667
},
{
"section": "Rent & Utilities",
"description": "Huur",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 21250.0,
"vat": 3750.0,
"amount_incl": 25000.0
},
{
"section": "Rent & Utilities",
"description": "Water & Ligte",
"gl_account": "",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 3230.0,
"vat": 570.0,
"amount_incl": 3800.0
},
{
"section": "Cash Floats",
"description": "Petty Cash",
"gl_account": "Cash Floats",
"supplier": "",
"qty": 0,
"unit_price": 0,
"amount_excl": 0,
"vat": 0,
"amount_incl": 10000.0
}
]