Admin Portal — User Help Guide
Getting Started
- URL:
/admin
- Login with your admin credentials. If incorrect, an error appears.
- After login, the dashboard shows counts for Vehicles, Pumps, Issuances, and Runs.
Navigation
Top navigation links to modules: Vehicles, Pumps, Fuel Prices, Mobil Prices, Issuances, Tentative Bills, Run Details.
Vehicles
- View: Vehicles list shows all vehicles.
- Add: Click “Add Vehicle” and fill required fields (Car Number, Fuel Type, Run per Liter).
- Edit: Use “Edit” on a vehicle to update details.
- Note:
Run per Liter is used for consumption calculations.
Petrol Pumps
- View: Pumps list shows pump name and address.
- Add/Edit: Use the form to add or update pumps.
- Toggle Active: Ensure active pumps appear in issuances and price lists.
Fuel Prices
- View: Shows fuel price per pump with effective date.
- Add: Set Petrol and Diesel rates and the Effect Date.
- Toggle: Quickly enable/disable a price entry.
- Rates in Issuances: The system picks the latest price whose effect_date is on/before the issuance date.
Mobil Prices
- View: Shows mobil price and KM per Liter with effective date.
- Add: Set Mobil Price and KM per Liter.
- Rates in Issuances/Reports: The system picks latest mobil price on/before relevant date.
Fuel Issuances
- Add Issuance: Choose vehicle, pump, fuel volume; optionally mobil issuance.
- Auto Rates: Based on vehicle fuel type and latest effective price; mobil rate applied if given.
- Re-Generate: Updates rates and stamps Re-Generate Date.
- Generate Slip: Click “Generate Slip” to open printable credit slip.
- Slip Printing: Print dialog will hide buttons automatically.
Tentative Bills
- Generate: Use the form at Issuances page to select vehicle scope (single or all), pump, start/end dates.
- View: See aggregated totals for fuel/mobil volumes and amounts.
Run Details
- Add Run: Select vehicle, start/end dates, starting/ending meter readings.
- Month View: Filter by vehicle (optional), month, year.
- The list groups cumulatively by vehicle within the selected month and shows Starting KM (min), Ending KM (max), and Total KM Run (sum).
- Statement: For a single run, view the printable statement.
- Monthly Report: Click “Download Report” to open a vehicle-wise report. If “All Vehicles” is selected, the report contains separate sections per vehicle with per-vehicle page breaks.
Printing
- Buttons and controls are hidden in print view.
- Use your browser’s “Save as PDF” to store documents.
- Monthly report has page-breaks per vehicle for a clean PDF.
Calculations
- Fuel amount =
fuel_volume × fuel_rate.
- Mobil amount =
mobil_volume × mobil_rate.
- Total KM run =
reading_end − reading_start.
- Actual fuel consumed =
total_km ÷ vehicle.run_per_liter.
- Actual mobil consumed =
total_km ÷ mobil.km_per_liter.
- Difference: If received > consumed ⇒ Zilla Parishad gets the difference; else Vehicle Owner gets the difference.
Troubleshooting
- “Invalid credentials” on login: Check username/password or contact admin.
- “Relation not found” errors: Ensure Eloquent relations exist for Vehicle (FuelIssuances/RunDetails).
- “Table already exists” during migration: Skip duplicate migrations or clean previous tables.
- Undefined totals in views: Ensure month filters are set and data exists; the app precomputes totals.
Where Things Happen (For Admins)
- Login:
backend-laravel/app/Http/Controllers/AdminWebController.php:18-30
- Dashboard:
backend-laravel/app/Http/Controllers/AdminWebController.php:32-40
- Issuances:
backend-laravel/app/Http/Controllers/AdminWebController.php:116-151,264-291
- Run Details Month:
backend-laravel/app/Http/Controllers/AdminWebController.php:153-166
- Month Report:
backend-laravel/app/Http/Controllers/AdminWebController.php:201-279
- Monthly Report View:
backend-laravel/resources/views/admin/run_details/month_report.blade.php:1-217
- Slip View:
backend-laravel/resources/views/admin/issuances/slip.blade.php:1-64
Support
For access issues or data inconsistencies, contact the system administrator.