# Round 2 Fixes Applied (2026-03-18)

## Reporting / Invoice Aggregation Fixes
- Added `app/Support/SaleInvoiceMetrics.php`
- Normalized invoice-level totals using first-row-per-invoice scope
- Fixed duplicate invoice grand total summation in:
  - `app/Http/Controllers/Admin/BranchController.php`
  - `app/Http/Controllers/Admin/AutomationController.php`
  - `app/Http/Controllers/Admin/AccountController.php`
  - `app/Http/Controllers/Admin/DashboardController.php`
  - `app/Http/Controllers/Admin/ReportController.php`
  - `app/Http/Controllers/Admin/CustomerController.php`

## Hold Lifecycle Fixes
- Added hidden `hold_id` carry-over in `resources/views/admin/sales/form.blade.php`
- Restricted create/release to active holds only
- Marked active hold as `Released` after successful invoice creation
- Added hold validation in `app/Http/Controllers/Admin/SaleController.php`

## Smoke Checks
- PHP lint passed for all edited files
- `php artisan route:list` passed successfully
