Skip to main content
The Equipment Deliveries system allows you to manage the complete lifecycle of equipment loans to police departments and units, including delivery documentation, returns, and lost equipment tracking.

Overview

The equipment delivery system tracks portable radio equipment assignments to different police departments (dependencias). It generates official delivery documents, monitors active loans, and manages partial returns.
The system automatically updates equipment status in the fleet database when items are delivered or returned.

Creating a New Delivery

1

Access the delivery form

Navigate to the equipment deliveries section and click “Create New Delivery”
2

Enter delivery information

Fill in the required fields:
  • Delivery date and time - When the equipment is being handed over
  • Department (dependencia) - The receiving police unit
  • Operational reason - Purpose for the equipment assignment
  • Receiving personnel - Name and badge number (legajo)
  • Delivering personnel - Name and badge number
3

Select equipment

Choose equipment from the available portable units. The system shows:
  • TEI (equipment identifier)
  • ISSI (radio identifier)
  • Battery serial numbers
  • Current availability status
4

Add accessories (optional)

Include additional items:
  • Charging cradles (cunas cargadoras) with brand and serial numbers
  • Transformers (quantity only)
  • Second batteries (if applicable)
5

Attach documentation

Upload up to 3 images and 1 additional file (PDF, DOC, ZIP, etc.)

Code Example: Creating a Delivery

The system validates and creates delivery records with database transactions:
// EntregasEquiposController.php:76-142
$entrega = EntregaEquipo::create([
    'fecha_entrega' => $request->fecha_entrega,
    'hora_entrega' => $request->hora_entrega,
    'dependencia' => $request->dependencia,
    'personal_receptor' => $request->personal_receptor,
    'legajo_receptor' => $request->legajo_receptor,
    'motivo_operativo' => $request->motivo_operativo,
    'con_2_baterias' => $request->has('con_segunda_bateria'),
    'usuario_creador' => auth()->user()->name
]);

// Link equipment to delivery
foreach ($request->equipos_seleccionados as $equipoId) {
    DetalleEntregaEquipo::create([
        'entrega_id' => $entrega->id,
        'equipo_id' => $equipoId
    ]);
    
    // Update equipment status
    FlotaGeneral::find($equipoId)->update(['estado' => 'entregado']);
}

Generating Delivery Documents

The system automatically generates Word documents using templates based on the delivery configuration:

Standard Template

Basic equipment delivery with one battery per unit

Two Battery Template

For equipment with primary and secondary batteries

Accessories Template

Includes charging cradles and transformers

Combined Template

Two batteries plus accessories

Document Generation Process

// EntregasEquiposController.php:389-418
$templateName = $tieneAccesorios
    ? 'template_entrega_equipos_cuna_trafo.docx'
    : 'template_entrega_equipos.docx';

$templateProcessor = new TemplateProcessor($templatePath);

// Replace template variables
$templateProcessor->setValue('DIA', $entrega->fecha_entrega->format('d'));
$templateProcessor->setValue('MES', $mesEspanol);
$templateProcessor->setValue('DEPENDENCIA', $entrega->dependencia);
$templateProcessor->setValue('CANTIDAD_EQUIPOS', $cantidadEquipos);
Documents are automatically saved to the network share at \\193.169.1.247\Comp_Tecnica$\01-Técnica 911 Doc\ and downloaded locally.

Managing Returns

The system supports partial returns, allowing equipment to be returned in batches while maintaining a complete audit trail.

Processing a Return

1

View active delivery

Open the delivery record showing equipment currently on loan
2

Select items to return

Choose which equipment is being returned from the pending list
3

Enter return details

Record:
  • Return date and time
  • Person returning the equipment
  • Observations
  • Supporting images or documents
4

Confirm return

The system automatically:
  • Updates equipment status to “available”
  • Links the return to the original delivery
  • Updates the delivery status (active/partially returned/fully returned)
// EntregasEquiposController.php:874-962
$devolucion = DevolucionEquipo::create([
    'entrega_id' => $entrega->id,
    'fecha_devolucion' => $request->fecha_devolucion,
    'hora_devolucion' => $request->hora_devolucion,
    'personal_devuelve' => $request->personal_devuelve
]);

// Update equipment status
foreach ($request->equipos_devolver as $equipoId) {
    DetalleDevolucionEquipo::create([
        'devolucion_id' => $devolucion->id,
        'equipo_id' => $equipoId
    ]);
}

// Automatically update delivery state
$entrega->actualizarEstado();

Tracking Lost Equipment

Report equipment as lost when items are not returned or cannot be located.
Marking equipment as lost changes its status permanently. This action should only be performed after proper verification.

Reporting Lost Equipment

Use the “Report Lost” function from the delivery detail page:
// EntregasEquiposController.php:1068-1102
foreach ($equiposPerdidos as $equipoId) {
    FlotaGeneral::find($equipoId)->update(['estado' => 'perdido']);
}

$entrega->update([
    'estado' => 'perdido',
    'observaciones' => $entrega->observaciones . 
        "\n\nReportado como perdido el: " . now()->format('d/m/Y H:i') .
        "\nMotivo: " . $request->motivo_perdida
]);

Searching and Filtering

Search deliveries using multiple criteria:
  • TEI - Equipment identifier
  • ISSI - Radio identifier
  • Date - Delivery date
  • Department - Receiving unit
// EntregasEquiposController.php:29-53
if ($request->filled('tei')) {
    $query->buscarPorTei($request->tei);
}

if ($request->filled('issi')) {
    $query->buscarPorIssi($request->issi);
}

if ($request->filled('dependencia')) {
    $query->buscarPorDependencia($request->dependencia);
}

$entregas = $query->orderBy('created_at', 'desc')->paginate(15);

Routes

The equipment delivery system uses the following routes:
RouteMethodPurpose
/entrega-equiposGETList all deliveries
/entrega-equipos/createGETShow delivery creation form
/entrega-equiposPOSTStore new delivery
/entrega-equipos/{id}GETView delivery details
/entrega-equipos/{id}/editGETEdit delivery
/entrega-equipos/{id}/documentoGETGenerate delivery document
/entrega-equipos/{id}/devolverGETShow return form
/entrega-equipos/{id}/procesar-devolucionPOSTProcess equipment return
/entrega-equipos/{id}/reportar-perdidoPATCHReport equipment as lost
All routes require authentication and appropriate permissions (crear-entrega-equipos, ver-menu-entregas)

Best Practices

  1. Always verify equipment - Confirm TEI and ISSI numbers match physical devices
  2. Document everything - Upload photos of equipment condition at delivery and return
  3. Use operational reasons - Provide clear justification for equipment assignments
  4. Track accessories - Record all charging cradles and transformers
  5. Process returns promptly - Update the system as soon as equipment is returned
  6. Regular audits - Review active deliveries to identify overdue equipment

Bodycam Deliveries

Similar system for managing bodycam checkouts

Fleet Management

Main equipment inventory and tracking system

Build docs developers (and LLMs) love