@extends('layouts.admin') @section('title', 'Transport pricing rules') @section('actions') New rule@endsection @section('content')
@forelse ($rules as $r) @empty @endforelse
RuleVehicleAreaModelFareService feeTaxEffective
{{ $r->name }}
{{ $r->code }} · priority {{ $r->priority }}
{{ $r->vehicleType?->name ?? 'Any' }} {{ $r->district?->name ?? $r->state?->name ?? 'Everywhere' }} {{ humanize($r->pricing_model) }} {{ inr($r->base_fare) }} base @if ($r->per_km_rate)
+ {{ inr($r->per_km_rate, true) }}/km @endif @if ($r->per_tonne_km_rate)
+ {{ inr($r->per_tonne_km_rate, true) }}/t·km @endif @if ($r->minimum_fare)
min {{ inr($r->minimum_fare) }} @endif
{{ $r->service_fee_type === 'percent' ? (float) $r->service_fee_value.'%' : inr($r->service_fee_value) }} {{ (float) $r->tax_percent }}% {{ ist($r->effective_from, 'd M Y') }} →
{{ $r->effective_to ? ist($r->effective_to, 'd M Y') : 'open' }}
@if ($r->is_active)
@csrf @method('DELETE')
@endif
No pricing rules yet. Bookings cannot show a fare until you add at least one.

The most specific active rule wins: district, then state, then vehicle type, then highest priority. The prototype's service fee is ₹200 — confirm it with the business owner (BRD section 13).

@csrf
Test a fare
@if ($q = session('quote'))
@if ($q['too_heavy'])
Load is over this vehicle's {{ indian_number($q['capacity']) }} kg capacity; it would not be offered (BR-TR-03).
@endif @if ($q['amounts'])
Rule used: {{ $q['rule'] }}
Transport fare
{{ inr($q['amounts']['fare'], true) }}
Service fee
{{ inr($q['amounts']['service_fee'], true) }}
Tax
{{ inr($q['amounts']['tax'], true) }}
Estimated total
{{ inr($q['amounts']['total'], true) }}
@else
No active rule covers this vehicle and area.
@endif
@endif
@endsection