Pending:

1. Common hydration logic is not disqualifying 1st reading

### 07.10.2025
1. Added survey_date nullable parameter to surveyor upload POST

### 10.03.2026
1. Comited Viloggi Integration (Not Tested)

### 14.03.26
1. Implemented bowser allocation. Actual consumption % is used when there is enough "non-poluted" common area onsumption ratio otherwise we fall back to quote-part

2. Lot upload now required quote-part data

3. Standardized controller exception handling around a single safe pattern. Behaviorally, clients now get a consistent safe message like Something went wrong, while the actual exception is logged server-side. One exception remains intentional: the SMTP test endpoint still returns its custom user-facing failure message, but no longer appends the raw exception text.

4. Implemented Superadmin API for dashboard

### 13.04.26
1. Fixed filename on lot_upload.csv
2. Implemented My sites for Admin

### 20.04.26
1. Changed bowser allocation method to synthetic total consumption. This requires bowser volume & amount on each close submission to be submitted
2. Track synthetic condumption. bowser supply & commonn ratio for water
3. Improved excel report format
4. Fixed an issue that prevented incomplete lots from showing up in admin

### 23.04.26
1. Progressed on vilogi implementation. check docs/vilogi-nextsteps.md fir next steps
2. Cleaned up mail sending commands: 

Use case	Command

Re-run all pending/failed emails	php artisan mail:process-failed

Re-run a single session	php artisan mail:process-failed --session=66762

See what would run without sending	

php artisan mail:process-failed --dry-run

Scheduled nightly at 22:00	automatic via Kernel.php

3. Fixed CompletedSession where a site name or lot number has a / in it (e.g. "Block A/B"), 

### 05.05.2026
1. Improved onboarding email process
2. Progressed with Vilogi integration
3. Implemented API integration to post readings from 3rd party sites [Partially]
4. Improved dashboard for Admin


### 29/05/26
1. Fixed lot import (lotsImportExcel): barcode creation moved inside create branch only — was incorrectly creating orphaned barcodes on every update; fixed Rule::unique to use ->ignore() so existing lots pass validation; renamed inner $data variable to avoid shadowing the outer Excel rows array
2. New endpoint POST lots-batch-update: update lots by barcode lookup, only supplied columns are written, empty cells are skipped. Accepts: barcode (lookup key), name, email, alternate emails, address, account_code, previous_unit, last_reading_date (DD/MM/YYYY), quote_part
3. New endpoint GET lots-batch-update-template: downloads a pre-populated CSV for the above, scoped by site_id + service_type_id
4. New endpoint PATCH lots/rename: renames a lot_no across lots, lot_owners and meter_resets in one transaction; validates for duplicates; all service types sharing the lot_no on the site are renamed together
5. Site CSV export now includes non-billable lots with a Billable (Yes/No) column

### 06.06.26
1. Tax on bill totals: `tax_label`, `tax_percentage` (per site + utility type via `site_services`); `tax_label`, `tax_percentage`, `tax_value` snapshotted on `archived_sessions`. Exposed in `editSite`, returned in `SiteServiceTrans`, `ArchivedSessionLotsTrans`, `AdhocListTrans`
2. Tenant preferences: JSON `preferences` column on `service_providers`. Keys: `water_label`, `electricity_label`, `water_unit`, `electricity_unit`, `gas_unit`, `currency`, `currency_position`, `date_format`, `wma_volume_ratio`. Defaults baked into `ServiceProvider::defaultPreferences()`. Managed via `editServiceProvider`; returned in login API response
3. Configurable litre-to-kg factor: `litre_to_kg_factor` on `gas_services` (default 2.48). Managed via `editSite` gas block
4. WMA volume ratio: `wma_volume_ratio` preference (default 1.0) applied to CWA consumption before WMA rate calculation — supports jurisdictions that charge wastewater on a fraction of water consumed
5. PDF templates (`siteServiceTemplate`, `siteNotifiyTemplate`): all hardcoded units, currency and dates replaced with tenant-preference helpers (`tenantUnitLabel`, `tenantFormatMoney`, `tenantFormatDate`). "Lot Owner" label changed to "Billed to" on invoice template

## 17.06.2026
1. Implemrnted UTC
2. Implemented queuing to photos upload (job)

# 09.07.2026
1. Fixed validation on session upload (prevemts non numeric) + added float cast on OpenSession Model.

2. Fixed an issue that prevented superadmin from adding a sibbling meter to an existing lot.

# 14/07/26
1. Create a command to fix a data consistency issue (lots:repair-previous-unit)