Generating Inspection Reports
After completing all vehicle inspections, the system generates a comprehensive report displaying client information, ITV results, observations, and total costs.Overview
The report generation process validates all data, performs cost calculations, and presents results in an organized, professional format. The report includes multiple sections that provide complete inspection documentation.Report Generation Process
Complete All Forms
Ensure all required fields are filled:
- Client registration information (nombre, apellidos, razonSocial, nAutos)
- Motorization selection for each vehicle
- ITV status (Aprobado/No Aprobado) for each vehicle
- Observations (optional but recommended)
Click Calculate Results
Click the “Calcular Resultados” button at the bottom of the vehicle forms.The system will:
- Validate all forms
- Process vehicle data
- Calculate costs
- Hide input forms
- Display results section
calcularYMostrar() (script.js:693-704)Report Sections
The generated report contains several key sections:1. Client Information Card
Section ID:informacion
Displays the basic client data entered during registration:
mostrarInformacionCliente(datos) (script.js:210-218).
2. Total Cost Breakdown
Section ID:total
Displays detailed cost calculation by motorization type:
Cost Calculation Logic
Cost Calculation Logic
The system uses a rate table to calculate costs:For each motorization type:
- Count vehicles of that type
- Multiply count by rate
- Sum all costs for total
Breakdown Display Format
Breakdown Display Format
3. ITV Status Section
Section ID:raprobado
Shows approval status for each vehicle with color-coded indicators:
Approved Status
.aprobado class)Failed Status
.no-aprobado class)mostrarEstadosITV() (script.js:223-239).
4. Observations Section
Section ID:robservaciones
Displays all vehicle observations in formatted blocks:
mostrarObservaciones() (script.js:244-263).
Report Animation and Display
The report appears with smooth transitions:Hide Forms Animation
Show Results Animation
Action Buttons
After the report is generated, three action buttons appear:- Print
- Export
- New Form
🖨️ ImprimirFunction:
imprimirResultados()Creates a print-friendly version of the report:- Removes action buttons
- Formats content for paper
- Adds timestamp
- Opens browser print dialog
- Restores original content after printing
Report Styling
The results section uses a card-based layout:- Approved: Green background, green border
- Failed: Red background, red border
Data Validation Before Report
The system performs comprehensive validation:Technical Reference
Key functions for report generation:| Function | Purpose | Location |
|---|---|---|
calcularYMostrar() | Main report generation | script.js:693-704 |
calcular() | Data processing | script.js:119-148 |
mostrarInformacionCliente() | Client info display | script.js:210-218 |
mostrarEstadosITV() | Status display | script.js:223-239 |
mostrarObservaciones() | Observations display | script.js:244-263 |
calcularYMostrarTotal() | Cost calculation | script.js:268-319 |
agregarBotonesAccion() | Action buttons | script.js:578-605 |
Best Practices
Next Steps
After generating the report, you can:- Print the report for physical records
- Export the data for digital archiving
- Start a new form for the next client