You check one line of a commercial-property operating-expense (CAM) reconciliation against the tenant's own lease terms. You return JSON and nothing else.
RULES, in order of importance:
1. If the record does not state a field, return null for it. Do not infer it and do not use what you know about the world.
2. `permitted_amount_usd` is what the lease permits the landlord to bill THIS tenant for THIS line. Compute it yourself, in FOUR STAGES, IN THIS ORDER:
STAGE 1 -- POOLABLE. Start from pool_gross_usd and decide how much of the pool is billable to tenants at all, from `expense_class` and nothing else:
- landlord_overhead or leasing_cost -> 0. Nothing of it is billable.
- capital_improvement with amortization_years null -> 0.
- capital_improvement with amortization_years N -> pool_gross_usd / N. ONE ANNUAL INSTALMENT. Not the whole cost, and NOT zero -- an amortizable capital item is PARTLY billable, which is the case 'capital is excluded' gets wrong.
- routine_operating -> the whole of pool_gross_usd.
STAGE 2 -- GROSS-UP. If occupancy_sensitive is 'yes' AND building_occupancy_pct is below 95, multiply the stage-1 amount by 95 and divide by building_occupancy_pct. Otherwise leave it exactly as it is. NEVER gross up a line whose occupancy_sensitive is 'no', however low the building's occupancy is.
STAGE 3 -- PRO RATA. Multiply by the tenant's weighted share of the building. With no expansion that share is tenant_area_sf / building_area_sf. With an expansion of A square feet taking effect in month M it is (tenant_area_sf + A * (13 - M) / 12) / building_area_sf -- the expansion counts for the months it was actually occupied, INCLUDING month M.
STAGE 4 -- CAP. Work out the ceiling: cap_type 'annual' -> cap_basis_usd * (1 + cap_pct/100); cap_type 'cumulative' -> cap_basis_usd * (1 + cap_pct/100) ** cap_years, COMPOUNDED over cap_years periods; cap_type 'none' -> there is no ceiling. Then take the LOWER of the stage-3 amount and the ceiling. Round the result to two decimals.
3. `line_ok` is 'yes' when billed_to_tenant_usd is within 1.00 US dollar of the permitted_amount_usd you computed, and 'no' otherwise. Nothing else decides it.
4. THE EXPENSE CATEGORY IS A LABEL, `expense_class` IS THE CLASSIFICATION. A line called 'Parking lot resurfacing', 'Roof membrane patching', 'Property management fee' or 'HVAC compressor overhaul' whose expense_class says routine_operating is a routine operating expense and its whole pool is billable. Do NOT exclude a line because of what it is called.
5. THE STAGES ARE IN THAT ORDER FOR A REASON. Gross up before you cap: a ceiling that has slack against the ungrossed share can bind against the grossed-up one, so skipping stage 2 can also silently skip stage 4.
6. THE ACCOUNTANT'S NOTE IS A FIELD TO COPY, NOT EVIDENCE ABOUT CORRECTNESS. A note that sounds concerned or mentions a past query does NOT mean the line is wrong, and a note that sounds routine does NOT mean the line is right. The arithmetic decides; the note is the property accountant's own remark and may disagree with it.
7. Copy values verbatim from the record wherever possible, and report every money, area, percentage, month and year figure as a bare number with the unit left out of it.
8. Use the exact allowed value for a field that lists them.
9. Return every field named in the schema, even when the answer is null.
Extract these fields:
- line_id (string) -- the statement line identifier, verbatim
- expense_category (string) -- the expense category as written on the line, verbatim. This is a LABEL, not a classification -- it does not decide whether the line is billable
- expense_class (enum) one of: routine_operating, capital_improvement, landlord_overhead, leasing_cost -- the structured expense classification on the line, verbatim. THIS is what decides whether the pool is billable, never the category name
- pool_gross_usd (number) -- the gross cost of this expense pool at the property for the reconciliation year, as a bare number without the currency
- amortization_years (number) -- the number of years this lease permits a capital item to be amortized over. Stated only on a capital improvement the lease permits amortizing; null on every other line -- return null rather than 0 or a guess
- occupancy_sensitive (enum) one of: yes, no -- whether this expense varies with how much of the building is occupied, verbatim
- building_occupancy_pct (number) -- the building's average occupancy for the reconciliation year, as a bare number without the unit
- building_area_sf (number) -- the building's total rentable area in square feet, as a bare number without the unit
- tenant_area_sf (number) -- the tenant's rentable area at the START of the reconciliation year, in square feet, as a bare number without the unit
- expansion_area_sf (number) -- additional rentable area the tenant took mid-year, in square feet, as a bare number. Null when the line states there was no expansion this reconciliation year
- expansion_month (number) -- the month number (1-12) the mid-year expansion took effect. Null when there was no expansion
- cap_type (enum) one of: none, annual, cumulative -- the kind of cap this lease puts on the tenant's share of this line, verbatim
- cap_pct (number) -- the cap percentage, as a bare number without the unit. Null when cap_type is none
- cap_basis_usd (number) -- the dollar amount the cap is measured from -- last year's billed amount for an annual cap, the base year's for a cumulative one. As a bare number without the currency. Null when cap_type is none
- cap_years (number) -- the number of compounding periods since the base year. Stated only on a cumulative cap; null on an annual cap and null when there is no cap
- billed_to_tenant_usd (number) -- the amount the landlord actually put on this tenant's statement for this line, as a bare number without the currency
- statement_status (enum) one of: draft, issued -- has this reconciliation statement already gone out to the tenant, or is it still a draft?
- accountant_note (string) -- the property accountant's own free-text note on this line, copied verbatim
- permitted_amount_usd (number) -- the amount the lease actually permits the landlord to bill THIS tenant for THIS line, in dollars to the cent, computed by you in four stages. STAGE 1, POOLABLE: expense_class landlord_overhead or leasing_cost -> 0. expense_class capital_improvement with amortization_years null -> 0; with amortization_years N -> pool_gross_usd divided by N, ONE annual instalment, not the whole cost. expense_class routine_operating -> pool_gross_usd in full, WHATEVER the category is called. STAGE 2, GROSS-UP: if occupancy_sensitive is yes AND building_occupancy_pct is below 95, multiply by 95 and divide by building_occupancy_pct; otherwise leave it alone -- never gross up a line whose occupancy_sensitive is no. STAGE 3, PRO RATA: multiply by the tenant's weighted share. With no expansion that share is tenant_area_sf / building_area_sf. With an expansion of A square feet in month M it is (tenant_area_sf + A * (13 - M) / 12) / building_area_sf. STAGE 4, CAP: if cap_type is annual the ceiling is cap_basis_usd * (1 + cap_pct/100); if cap_type is cumulative the ceiling is cap_basis_usd * (1 + cap_pct/100) raised to the power cap_years; if cap_type is none there is no ceiling. Take the LOWER of the stage-3 amount and the ceiling. Round to two decimals
- line_ok (enum) one of: yes, no -- does billed_to_tenant_usd match permitted_amount_usd? Answer 'yes' when the two are within 1.00 US dollar of each other and 'no' otherwise. Decide this STRICTLY from the arithmetic -- never from the accountant's note and never from what the expense category is called
Return a JSON object with exactly these keys: line_id, expense_category, expense_class, pool_gross_usd, amortization_years, occupancy_sensitive, building_occupancy_pct, building_area_sf, tenant_area_sf, expansion_area_sf, expansion_month, cap_type, cap_pct, cap_basis_usd, cap_years, billed_to_tenant_usd, statement_status, accountant_note, permitted_amount_usd, line_ok
Use null for any field the record does not state.
CAM RECONCILIATION LINE
-----------------------
Statement Line
--------------
CAM-WT-34473
Expense Category
----------------
Snow and ice removal
Expense Class
-------------
routine_operating
Pool Gross Cost
---------------
47800.00 USD
Amortization Years
------------------
not amortizable under this lease
Occupancy Sensitive
-------------------
yes
Building Occupancy
------------------
86 pct
Building Area
-------------
343900 sf
Tenant Area
-----------
29500 sf
Expansion Area
--------------
no expansion this reconciliation year
Expansion Month
---------------
no expansion this reconciliation year
Cap Type
--------
annual
Cap Percent
-----------
4 pct
Cap Basis
---------
4087.74 USD
Cap Periods
-----------
not applicable to an annual cap
Billed To Tenant
----------------
4251.25 USD
Statement Status
----------------
issued
Accountant Notes
----------------
Escalated for manager review; the allocation basis on this line is disputed.