Overview
The quotation management system is the core of ICL Cotizaciones, enabling commercial teams to create, track, and manage freight quotes for FCL and LCL shipments. Each quotation captures operational details, cargo specifications, cost structures, and status tracking.Quotation Lifecycle
Quotations flow through five status states:- En cotizacion (In quotation) - Initial draft state
- Pendiente (Pending) - Awaiting response
- Pend A/C (Pending approval/confirmation)
- Ganada (Won) - Quote accepted by client
- Perdida (Lost) - Quote rejected
When changing status to Won, Lost, or Pend A/C, the system automatically sets the close date to today if not already specified.
Creating a New Quotation
Navigate to new quotation
Click Nueva Cotizacion from the quotations list page. The system generates a unique quote number in format
COT-YYMM-NNNN.Enter commercial data
- Fecha de carga: Date of quotation creation
- Comercial: Sales representative (auto-assigned for non-admin users)
- Cliente FFWW: Freight forwarder client (required)
- Cliente Final: End customer (optional)
- Referencia: Internal reference code
Configure operational details
- Impo / Expo: Import or Export operation
- Tipo: Maritime or Air freight
- FCL / LCL: Full Container Load or Less than Container Load
- Cond. Venta: Sales condition (FOB, EXW, FCA, Other)
- Moneda: Currency (USD, EUR, ARS)
- Origen: Origin location
- Via: Destination port (required)
Specify cargo details
- CBM Reales: Actual cubic meters (required)
- KGS: Weight in kilograms (required)
- Apilable: Stackable (Yes/No)
- IMO: Hazardous materials (Yes/No)
- Detalles de carga: Cargo description
Set pricing structure
- Flete Neto: Net freight cost (auto-suggested for LCL from base rate table)
- Tipo Flete Neto: W/M (weight/measurement) or Flat rate
- Flete Venta: Sales freight price
- Tipo Flete Venta: W/M or Flat
- Costos Netos: Net origin costs (required)
- Costos Venta: Sales origin costs
Auto-Suggested Freight Rates (LCL)
For LCL quotations, the system automatically suggests net freight rates based on the Port Rates master table:Rate Selection Logic
- ≤ 3 CBM: Uses
rate_0_3_cbm - 3-5 CBM: Uses
rate_3_5_cbm - 5-10 CBM: Uses
rate_5_10_cbm - > 10 CBM: Uses
rate_10_15_cbm
Matching Criteria
The system matches the selected Via (destination) with
port_of_loading in the Port Rates table by name.Suggested rate appears as a hint below the Flete Neto field.In edit mode, if Flete Neto already has a value, the suggestion appears as a hint only and does not overwrite the existing value.
Commercial Agreements Integration
When you select a FFWW client that has a commercial agreement configured, the quotation form displays fiscal deposit costs in a read-only section:- Deconsolidation rates (W/M, Min, Max)
- AGP per ton
- Document handling fees
- Log fee, Doc fee
- Freight certificate
- Insurance percentage and minimum
- BL emission fee
commercial_agreements table linked to the client.
Editing Quotations
Access Control
Admin Users
Directors, Managers, and Administration roles can edit any quotation in the system.
Commercial Users
Can only edit quotations where
vendedor_id matches their user ID. Attempting to access another user’s quotation returns 403 Forbidden.Edit Actions
- Guardar: Update quotation with validation
- Eliminar: Delete quotation (requires confirmation)
- Duplicar: Create new quotation with same details but reset status to “En cotizacion” and today’s date
- Ver cotizacion: Preview quotation email/PDF (only visible for Won quotations)
Quotation Validation
Required fields enforced on save:| Field | Condition |
|---|---|
| Fecha | Always |
| Comercial | Admin must select; auto-set for non-admin |
| Cliente FFWW | Always |
| Impo/Expo, Tipo, FCL/LCL, Cond. Venta, Moneda | Always |
| Via | Always |
| CBM Reales, KGS | Always |
| Apilable, IMO | Always |
| Flete Neto, Tipo Flete Neto | Always |
| Costos Netos | Only if Cond. Venta is FCA or EXW |
Filtering and Search
Server-side Filters
Apply filters to narrow quotation list:- Desde / Hasta: Date range filter
- Comercial: Sales representative (admin only)
- Estado: Status (multiple selection)
- Cliente: Client name (multiple selection)
- Via: Destination port
Client-side Search
The search box filters loaded results in real-time across:- Quote number
- Client names (FFWW and Final)
- Origin and destination
- Sales representative
- Cargo details
- Reference and observations
Quotation Display
Quotations are grouped by week and year (format:2026-S09) in descending order. Each row displays:
Datos Comerciales
- Fecha de carga (Date + Time)
- ID de Cotizacion
- Status badge (color-coded)
- Cliente FFWW
- Cliente Final
- Comercial (admin view only)
- Referencia
Datos Operativos
- Impo/Expo
- Tipo
- FCL/LCL
- Cond. Venta
- Origen
- Via
- Moneda
- Pick Up address
Datos de la Carga
- CBM Reales
- KGS
- Apilable
- IMO
- Detalle Carga
Estructura de Costos
- Flete Neto / Tipo
- Flete Venta / Tipo
- Costos Netos / Venta
- Profit (calculated)
- Validez de Tarifa
Estado y Control
- Fecha de Cierre
- Observaciones
Row background color matches quotation status for quick visual scanning:
- Green: Ganada
- Red: Perdida
- Amber: Pendiente
- Blue: Pend A/C
- Pink: En cotizacion
Email Preview & PDF Export
For quotations with status Ganada (Won), click Ver cotizacion to:- Preview formatted quotation email in modal dialog
- Seleccionar todo: Select entire email content
- Copiar: Copy HTML-formatted content to clipboard (preserves formatting)
- Descargar PDF: Open print dialog to save as PDF
- Quote number and date
- Client information
- Freight type and route
- Pricing breakdown
- Validity period
- Terms and conditions
Data Model Reference
Key fields fromquotations table (src/db/schema.ts:68-126):
API Endpoints
GET /api/cotizaciones- List quotations with filtersGET /api/cotizaciones/next-nro- Get next quote numberPOST /api/cotizaciones- Create new quotationGET /api/cotizaciones/[id]- Get quotation detailsPUT /api/cotizaciones/[id]- Update quotationDELETE /api/cotizaciones/[id]- Delete quotation