# Vehicle clearance and business assessments

Run `php yii migrate --interactive=0` before serving this update (migration 020). Access vehicle cases under **Assets → Car clearance** and assessments under **Clients → Business assessments**. Both are also available from a client profile with the client preselected.

## Workbook basis and financing boundary

The original management workbook has `Management_Clearance_Log`, which records loan closure adjustments, verified cash, balances, reasons and evidence. It does not define vehicle-import clearance costs, product rates or how supplier payments become loan principal. Vehicle-clearance payments therefore remain separate operational cash movements, not operating-expense records, new loans or changes to linked loan principal. Purchase price is an estimate for reference. Linking an existing application provides context only. Do not assume existing short-term rate bands apply to a new business or clearance product.

## Business assessment

Prepare the client business/trading name, registration when available, activity, address, ownership notes, assessment date and evidence. Monthly cash available equals business receipts less operating costs and existing debt repayments. Negative results remain visible. Submit for CEO approval, rejection or return for correction. Approved assessments are immutable; a fresh assessment provides a new reference and preserves the version used by existing cases. Assessment approval is distinct from loan approval.

## Clearance case and supplier costs

Prepare the vehicle, VIN/chassis, registration if available, vehicle supplier, purchase estimate, expected date, import/ownership evidence and notes. An optional business assessment must be approved and belong to the same client; an optional application must belong to that client. Branch comes from the client and does not change when staff transfer. One vehicle cannot have two open cases.

Add each supplier cost with payee, recipient account/wallet details or payment instructions, invoice date, amount and evidence. The preparer may edit draft/returned cases and replace draft cost items before submission. Case and cost changes are blocked after submission. The CEO reviews the case, documents, total and exact recipients, then approves, rejects or returns it. Approval snapshots the case and cost sheet; tampered recipient or invoice details invalidate payment authorisation. The CEO and preparer remain separate for assessment and case approval.

## Supplier payments and completion

An approved cost supports partial payments. Select an active source account in the case's branch matching the payment method, actual date, amount, optional cash reference (required for bank/mobile payments) and proof. Pending payments reserve the unpaid cost; they do not move cash. CEO verification, including a CEO-prepared payment, deducts from the saved account exactly once. Rejected evidence stays in history and releases the reserved amount. External outgoing references are shared with other payment workflows to prevent duplicate transaction claims.

Once all approved costs are fully verified, attach clearance/handover evidence and the actual date. Completion goes to CEO review and may be confirmed or returned for correction. Case approval and completion decisions retain separate identities and dates. Completion does not release pledged collateral or close a linked loan. There is no automatic customs submission, client billing, financed-cost capitalisation or vehicle-product interest calculation in this phase.

## Reporting and access

Registers filter by registration date, branch and stage. Clearance CSV reports reconcile approved costs to verified supplier payments. CEO branch comparison and branch overview exports show supplier payments separately from operating expenses, payroll and loan disbursements. Proof routes and direct case, assessment, cost and payment URLs enforce branch scope. Approval tasks notify the CEO; decision notices notify the preparer without requiring acknowledgement.

Validation covers business net cash, return/resubmission, documents, branch guards, duplicate vehicles/references, immutable recipient snapshots, partial-payment reservations, account debits, idempotent posting, completion prerequisites, unchanged application/loan principal, HTTP CSRF and protected downloads.
