Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JuanDiego3030/Planta_Milenio/llms.txt

Use this file to discover all available pages before exploring further.

The Auditoría module gives supervisors a read-write view of transport records stored in Ceres Romana. It fetches the most recent 100 entries from the orden_profit_transporte table, presents them in a searchable, paginated table, and allows authorised users to correct transport details via inline editing. All edits are applied directly to Ceres Romana through a stored procedure — no local copy of these records is maintained.

Required Permission

Access requires the permiso_auditoria permission. Users flagged as solo_consulta can browse and search records but cannot submit edits.

Reading Transport Records

On load, the module retrieves the top 100 records from orden_profit_transporte ordered by most recent first. Each row in the table shows:
ColumnDescription
Order numberThe Numero_Orden linking back to orden_profit
ProductProduct code and enriched product name resolved from orden_profit
CompanyEmpresa_Rif of the transporting company
Vehicle plateVehiculo_Placa
Trailer plateVehiculo_Remolque_Placa
DriverConductor name and cedula
DestinationDestino_Nombre
Pesada statusPesada_Id — indicates whether the transport has been weighed

Product Enrichment

For each transport record, the module cross-references Numero_Orden against orden_profit to retrieve the associated product lines. This means the product column reflects the ERP product data rather than a raw code, giving auditors human-readable context without needing to leave the module.
All edits made through this module are applied directly to Ceres Romana via the Orden_Profit_Transporte_Update stored procedure. There is no local shadow copy of transport records — what you see is the live data in the ERP database, and what you save goes straight back to it.

Searching Records

Use the buscar query parameter to filter the displayed records. The search matches against:
  • Order number (Numero_Orden)
  • Vehicle plate (Vehiculo_Placa)
  • Conductor first name (Conductor_Nombre)
  • Conductor surname (Conductor_Apellido)
  • Conductor cedula (Conductor_Cedula)
GET /auditoria/?buscar=ABC123
GET /auditoria/?buscar=12345678
GET /auditoria/?buscar=0000045678
Filtering is applied before pagination, so page numbers always refer to pages within the filtered result set.

Pagination

Records are displayed 10 per page. Use the page parameter to navigate:
GET /auditoria/?page=2
GET /auditoria/?buscar=garcia&page=3

Editing a Record

Authorised users can edit any transport record that has not yet been weighed. Click the edit button on a row to open the inline edit form, modify the relevant fields, and submit. The POST request must include editar_registro alongside the record identifier and the updated field values. The server then calls the Orden_Profit_Transporte_Update stored procedure on Ceres Romana with the new values.

Editable Fields

FieldDescription
Producto_CodigoProduct code — the system automatically resolves the corresponding Producto_Id and Producto_Nombre
Empresa_RifRIF (tax ID) of the transport company
Conductor_CedulaDriver’s national ID number
Vehiculo_PlacaPrimary vehicle plate
Vehiculo_Remolque_PlacaTrailer plate (leave blank if no trailer)
Destino_NombreDestination name
When Producto_Codigo is updated, the stored procedure call includes the resolved Producto_Id and Producto_Nombre automatically — you only need to supply the code.

Edit Restrictions

Records where Pesada_Id != 0 are locked and cannot be edited. A non-zero Pesada_Id means the transport has already been processed through the weighbridge. Editing the transport details at that point would create a mismatch with the weigh ticket. The edit button is hidden for these rows in the UI, and any direct POST attempt for a locked record is rejected by the server.
solo_consulta users also cannot edit records regardless of Pesada_Id status. The edit controls are not rendered for read-only sessions.

URL Reference

# List the latest 100 transport records
GET  /auditoria/

# Search within records
GET  /auditoria/?buscar=<term>

# Navigate to a specific page
GET  /auditoria/?page=<n>

# Search and paginate
GET  /auditoria/?buscar=<term>&page=<n>

# Edit a record (form POST)
POST /auditoria/
     Body: editar_registro=1, record_id=..., Producto_Codigo=..., Empresa_Rif=...,
           Conductor_Cedula=..., Vehiculo_Placa=..., Vehiculo_Remolque_Placa=...,
           Destino_Nombre=...

Build docs developers (and LLMs) love