The Asset Management (Patrimonio) system provides comprehensive tracking of physical assets owned by the organization, including equipment, devices, and infrastructure items.
Overview
The patrimonio system manages the complete lifecycle of physical assets:
Registration - Record new assets with SIAF codes and serial numbers
Location tracking - Monitor current location and responsible department
Movement history - Complete audit trail of transfers and changes
Status management - Track active, inactive, and retired assets
Asset types - Flexible categorization with optional database linking
Documentation - Attach images and supporting files
Assets can be linked to existing items in other tables (like equipment or cameras) or tracked independently.
Asset Types
Before registering assets, you must define asset types:
Create asset type
Navigate to Patrimonio → Tipos de Bien and define a new type
Configure type properties
Name - Type description (e.g., “Radios”, “Cameras”, “Servers”)
Has own table - Whether this type links to an existing database table
Table reference - The database table name if linked
Description - Additional details about this asset type
// PatrimonioTipoBienController.php:24-42
$validated = $request -> validate ([
'nombre' => 'required|string|max:100|unique:patrimonio_tipos_bien,nombre' ,
'tiene_tabla_propia' => 'boolean' ,
'tabla_referencia' => 'nullable|string|max:100' ,
'descripcion' => 'nullable|string' ,
]);
PatrimonioTipoBien :: create ( $validated );
Linked Asset Types
When an asset type has tiene_tabla_propia = true, the system can link assets to existing equipment records:
Equipment Table Link to radio equipment with TEI identifiers
Camera Table Link to camera records by name
Once an item from a linked table is registered as an asset, it cannot be registered again to prevent duplicate tracking.
Registering Assets
Navigate to asset creation
Go to Patrimonio → Bienes → Create New Asset
Select asset type
Choose the type of asset being registered
Link to existing item (if applicable)
If the asset type has a linked table, select the specific item to patrimoniare
Enter asset details
Complete the required information:
SIAF code - Financial system identifier (optional)
Description - Detailed description of the asset
Serial number - Manufacturer serial number
Registration date - When the asset was acquired
Destination - Current department location
Physical location - Specific location within department
Observations - Additional notes
Attach documentation
Upload up to 3 images and 1 additional file (invoices, specifications, etc.)
Submit registration
The system creates the asset record and logs the initial registration as an “alta” (activation) movement
Code Example: Asset Registration
// PatrimonioBienController.php:70-177
$validated = $request -> validate ([
'tipo_bien_id' => 'required|exists:patrimonio_tipos_bien,id' ,
'item_origen_id' => 'nullable|integer' ,
'destino_id' => 'nullable|exists:destino,id' ,
'ubicacion' => 'nullable|string|max:150' ,
'siaf' => 'nullable|string|max:100' ,
'descripcion' => 'required|string' ,
'numero_serie' => 'nullable|string|max:255' ,
'fecha_alta' => 'required|date'
]);
DB :: beginTransaction ();
$tipoBien = PatrimonioTipoBien :: findOrFail ( $validated [ 'tipo_bien_id' ]);
// Handle linked table items
if ( $tipoBien -> tiene_tabla_propia && $tipoBien -> tabla_referencia ) {
// Verify item not already registered
$yaPatrimoniado = PatrimonioBien :: where ( 'tabla_origen' , $tipoBien -> tabla_referencia )
-> where ( 'id_origen' , $request -> item_origen_id )
-> exists ();
if ( $yaPatrimoniado ) {
return back () -> with ( 'error' , 'Este item ya fue patrimoniado anteriormente' );
}
// Get source item data
$itemOrigen = DB :: table ( $tipoBien -> tabla_referencia )
-> where ( 'id' , $request -> item_origen_id )
-> first ();
$validated [ 'tabla_origen' ] = $tipoBien -> tabla_referencia ;
$validated [ 'id_origen' ] = $request -> item_origen_id ;
}
$validated [ 'estado' ] = 'activo' ;
$bien = PatrimonioBien :: create ( $validated );
// Record initial registration movement
$bien -> registrarMovimiento (
'alta' ,
null ,
null ,
$request -> destino_id ,
$request -> ubicacion ,
'Alta inicial del bien patrimonial'
);
DB :: commit ();
Viewing Asset Details
The asset detail page displays comprehensive information:
Basic Information Type, SIAF code, serial number, description
Current Status Status, destination, physical location
Source Link Linked table and original item ID (if applicable)
Movement History Complete timeline of transfers, activations, and deactivations
// PatrimonioBienController.php:179-185
$bien = PatrimonioBien :: with ([
'tipoBien' ,
'destino' ,
'movimientos.destinoDesde' ,
'movimientos.destinoHasta'
]) -> findOrFail ( $id );
Asset Transfers
Transfer assets between departments or locations while maintaining a complete audit trail.
Access transfer form
From the asset detail page, click “Transfer Asset”
Select destination
Choose:
Destination department (required)
Physical location within department (optional)
Add transfer details
Observations explaining the transfer reason
Supporting documentation (images, transfer forms)
Complete transfer
The system records the movement and updates the asset location
Transfer Implementation
// PatrimonioBienController.php:381-453
$validated = $request -> validate ([
'destino_hasta_id' => 'required|exists:destino,id' ,
'ubicacion_hasta' => 'nullable|string|max:150' ,
'observaciones' => 'nullable|string'
]);
$bien = PatrimonioBien :: findOrFail ( $id );
$destinoDesde = $bien -> destino_id ;
$ubicacionDesde = $bien -> ubicacion ;
$destinoHasta = $validated [ 'destino_hasta_id' ];
$ubicacionHasta = $validated [ 'ubicacion_hasta' ] ?? null ;
// Prevent no-change transfers
if ( $destinoDesde == $destinoHasta && $ubicacionDesde == $ubicacionHasta ) {
return back () -> with ( 'error' , 'El destino y la ubicación son iguales a los actuales' );
}
// Update asset location
$bien -> update ([
'destino_id' => $destinoHasta ,
'ubicacion' => $ubicacionHasta
]);
// Record transfer movement
$bien -> registrarMovimiento (
'traslado' ,
$destinoDesde ,
$ubicacionDesde ,
$destinoHasta ,
$ubicacionHasta ,
$validated [ 'observaciones' ]
);
The system automatically detects location changes during asset edits and creates transfer movements when the destination or location is modified.
Asset Deactivation (Baja)
Remove assets from active inventory through three types of deactivation:
Decommission baja_desuso - Asset no longer in use
Transfer Out baja_transferencia - Asset transferred to another entity
Damage baja_rotura - Asset damaged beyond repair
Deactivation Process
Initiate deactivation
From asset detail, select “Dar de Baja” (Deactivate)
Choose deactivation type
Select the appropriate reason for deactivation
Provide justification
Enter detailed observations explaining why the asset is being deactivated
Transfer destination (if applicable)
For transfer deactivations, specify the receiving entity
Attach documentation
Upload supporting documents (damage reports, transfer forms, disposal records)
Confirm deactivation
The system updates the asset status to “baja” and records the movement
// PatrimonioBienController.php:301-371
$validated = $request -> validate ([
'tipo_baja' => 'required|in:baja_desuso,baja_transferencia,baja_rotura' ,
'observaciones' => 'required|string' ,
'destino_transferencia' => 'required_if:tipo_baja,baja_transferencia|nullable|exists:destino,id'
]);
$tipoBaja = $validated [ 'tipo_baja' ];
$bien -> estado = 'baja' ;
$bien -> observaciones = $request -> observaciones ;
// Update destination for transfers
if ( $tipoBaja === 'baja_transferencia' ) {
$bien -> destino_id = $request -> destino_transferencia ;
}
$bien -> save ();
// Record deactivation movement
$bien -> registrarMovimiento (
$validated [ 'tipo_baja' ],
$bien -> destino_id ,
$bien -> ubicacion ,
$tipoBaja === 'baja_transferencia' ? $request -> destino_transferencia : null ,
null ,
$request -> observaciones
);
Searching and Filtering
Find assets using multiple search criteria:
Filter Description Tipo de Bien Filter by asset type Destino Filter by current department Ubicación Search physical location Estado Filter by status (active/inactive) SIAF Search by financial code Número de Serie Find by serial number Búsqueda general Search across all text fields
// PatrimonioBienController.php:16-59
$query = PatrimonioBien :: with ([ 'tipoBien' , 'destino' , 'ultimoMovimiento' ]);
if ( $request -> filled ( 'tipo_bien_id' )) {
$query -> where ( 'tipo_bien_id' , $request -> tipo_bien_id );
}
if ( $request -> filled ( 'destino_id' )) {
$query -> where ( 'destino_id' , $request -> destino_id );
}
if ( $request -> filled ( 'estado' )) {
$query -> where ( 'estado' , $request -> estado );
}
if ( $request -> filled ( 'busqueda' )) {
$busqueda = $request -> busqueda ;
$query -> where ( function ( $q ) use ( $busqueda ) {
$q -> where ( 'siaf' , 'like' , '%' . $busqueda . '%' )
-> orWhere ( 'numero_serie' , 'like' , '%' . $busqueda . '%' )
-> orWhere ( 'descripcion' , 'like' , '%' . $busqueda . '%' )
-> orWhere ( 'ubicacion' , 'like' , '%' . $busqueda . '%' );
});
}
$bienes = $query -> orderBy ( 'created_at' , 'desc' ) -> paginate ( 15 );
Getting Available Items for Registration
When registering assets linked to existing tables, the system dynamically loads available items:
// PatrimonioBienController.php:461-524
public function getItemsDisponibles ( Request $request )
{
$tipoId = $request -> tipo_bien_id ;
$tipoBien = PatrimonioTipoBien :: find ( $tipoId );
if ( ! $tipoBien || ! $tipoBien -> tiene_tabla_propia ) {
return response () -> json ([]);
}
$config = [
'equipos' => [
'prefix' => '- TEI: - ' ,
'column' => 'tei'
],
'camaras' => [
'prefix' => ' - ' ,
'column' => 'nombre'
]
];
$tabla = $tipoBien -> tabla_referencia ;
$prefix = $config [ $tabla ][ 'prefix' ] ?? '' ;
$col = $config [ $tabla ][ 'column' ] ?? 'id' ;
// Query items not already registered
$items = DB :: table ( $tabla )
-> selectRaw ( "id, CONCAT(?, COALESCE( $col , '')) AS text" , [ $prefix ])
-> whereNotIn ( 'id' , function ( $query ) use ( $tabla ) {
$query -> select ( 'id_origen' )
-> from ( 'patrimonio_bienes' )
-> where ( 'tabla_origen' , $tabla )
-> whereNull ( 'deleted_at' );
})
-> orderBy ( 'id' )
-> get ();
return response () -> json ( $items );
}
Movement History
Every asset maintains a complete audit trail of all changes:
alta - Initial registration
traslado - Transfer between locations
baja_desuso - Decommissioned
baja_transferencia - Transferred to external entity
baja_rotura - Damaged/broken
Each movement records:
Type of movement
Source destination and location
Target destination and location
Date and time
User who performed the action
Observations
Routes
The asset management system uses these routes:
Route Method Purpose /patrimonio/bienesGET List all assets /patrimonio/bienes/createGET Asset registration form /patrimonio/bienesPOST Store new asset /patrimonio/bienes/{id}GET View asset details /patrimonio/bienes/{id}/editGET Edit asset /patrimonio/bienes/{id}PUT/PATCH Update asset /patrimonio/bienes/{id}DELETE Delete asset /patrimonio/bienes/{id}/bajaGET Deactivation form /patrimonio/bienes/{id}/bajaPOST Process deactivation /patrimonio/bienes/{id}/trasladoGET Transfer form /patrimonio/bienes/{id}/trasladoPOST Process transfer /patrimonio/bienes/items-disponiblesGET Get available items for type /patrimonio/tipos-bien* Asset type management
Best Practices
Use SIAF codes - Always include financial system codes when available
Document everything - Upload photos and supporting documents for all actions
Accurate descriptions - Write clear, detailed descriptions for future identification
Record serial numbers - Always capture manufacturer serial numbers
Update locations promptly - Keep physical location information current
Justify deactivations - Provide thorough explanations for asset retirement
Regular audits - Periodically verify physical assets match system records
Link when possible - Use table linking for equipment already in other systems
Equipment Deliveries Track temporary equipment assignments
Fleet Management Manage mobile equipment and vehicles
Camera Management Track surveillance camera infrastructure