Documentation Index
Fetch the complete documentation index at: https://mintlify.com/obando1998/Proyecto_UCP/llms.txt
Use this file to discover all available pages before exploring further.
Overview
As an Administrator (Grado 1), you have full access to review, approve, or reject product returns submitted by auxiliary users. This guide walks you through the complete workflow for managing returns in the DevolutionSync system.Access Requirements: You must have Grado 1 (Administrator) privileges to access the admin panel. Contact your system administrator if you need elevated permissions.
Accessing the Admin Panel
Log in to DevolutionSync
Navigate to the system login page and enter your credentials. Only users with
grado = 1 can access the administrator panel.Access the admin panel
After successful login, navigate to
index.php?url=admin/index or click on the Admin Panel link in the navigation menu.Understanding the Admin Dashboard
The administrator panel provides a comprehensive overview of the return management queue:Dashboard Statistics
At the top of the panel, you’ll see key metrics:- Pendientes: Total number of returns awaiting review
- Recientes: Number of recently processed returns (last 50)
Pending Returns Table
The pending returns table displays the following information:| Column | Description |
|---|---|
| ID | Unique identifier for the return record |
| Cliente | Client name and NIT (tax identification) |
| Producto | Product item code and description |
| Motivo | Return reason (🔄 Devolución, ❌ Faltante, ➕ Sobrante) |
| Cantidad | Quantity in units (UND) and kilograms (KG) |
| Fecha | Creation date and time |
| Creado por | Username of the auxiliary user who created the return |
| Acciones | Review button to process the return |
Reviewing Returns
Follow this workflow to review and process pending returns:Open the return details
In the pending returns table, click the “Revisar” button for the return you want to process. This opens a modal window with detailed information.
Review the return information
The modal displays complete details including:
- Client information (NIT, name, address)
- Product details (item code, description, unit, weight)
- Return type and quantities
- Observations from the auxiliary user
- Evidence photos (if uploaded)
index.php?url=consulta/detalles&id={id}.Make your decision
In the revision form within the modal, complete the following required fields:Decision: Select one of the following actions:
- ✅ APROBAR Devolución: Approve the return
- ❌ RECHAZAR Devolución: Reject the return
Enter authorization code
Provide the Código de Autorización (authorization code) - this is a mandatory field that tracks approval authority.
Add administrator observations
Enter your observations in the Observaciones del Administrador field. This should explain:
- The reason for your decision
- Any additional notes about the product condition
- Instructions for follow-up actions
- Reference to policies or guidelines applied
Form Validation and Requirements
The review form enforces the following validation rules (seeAdminController.php:42-94):
Required Fields
- ID Devolución: Automatically populated (must be valid integer > 0)
- Acción: Must be either “aprobado” or “rechazado”
- Código de Autorización: Cannot be empty
- Observaciones: Cannot be empty
Validation Process
Understanding Return Status Updates
When you process a return, the system updates the database with the following information:Database Fields Updated
- estado: Changed from “Pendiente” to “aprobado” or “rechazado”
- codigo_admin: Your authorization code
- observacion_admin: Your observations
- usuario_revisor: Your username (from
$_SESSION['user']) - fecha_revision: Current timestamp (NOW())
Notification System
The system attempts to create notifications for auxiliary users (seeAdminController.php:100-129):
- Approved: “Tu devolución # ha sido APROBADA ✅. Observación: ”
- Rejected: “Tu devolución # ha sido RECHAZADA ❌. Observación: ”
Viewing Return History
The Historial Reciente section shows the last 50 processed returns:Review historical data
The history table displays:
- Return ID and status badge (✅ Aprobado, ❌ Rechazado)
- Client name
- Product information
- Review date and time
- Reviewer username
View details (read-only)
Click the “Ver” button to view complete details of any historical return. This opens a read-only modal with all information.
Best Practices for Return Review
Documentation Standards
Documentation Standards
- Write clear, detailed observations explaining your decision
- Reference specific product conditions or policy violations
- Include authorization code that matches your organization’s tracking system
- Be specific about quantities and discrepancies
Review Priorities
Review Priorities
- Process returns in chronological order (oldest first)
- Prioritize high-value returns or urgent situations
- Review evidence photos carefully before making decisions
- Verify client information matches company records
Quality Assurance
Quality Assurance
- Double-check product codes and descriptions
- Validate quantities against auxiliary user observations
- Ensure evidence photos support the return claim
- Cross-reference with inventory or delivery records when possible
Communication
Communication
- Use clear, professional language in observations
- Provide actionable feedback for rejected returns
- Include next steps or instructions for auxiliary users
- Document any follow-up actions required
Success and Error Messages
After processing a return, you’ll see one of the following alerts:Success Message
Error Message
- Missing required fields
- Invalid return ID
- Database connection issues
- Invalid action value
Error details are logged to the server error log via
error_log() for troubleshooting by technical staff.Security and Access Control
The administrator panel includes security measures:Session Validation
- Users must be logged in (
$_SESSION['logged_in']) - User grade must be exactly 1 (Administrator)
- Unauthorized access redirects to login page
Audit Trail
Every review action is tracked with:- Administrator username
- Authorization code
- Timestamp of review
- Decision (approved/rejected)
- Detailed observations
Troubleshooting
Can’t See Pending Returns
- Cause: All returns have been processed
- Solution: Check the “Historial Reciente” section for processed returns
Modal Won’t Load Details
- Cause: Network error or invalid return ID
- Solution: Refresh the page and try again. Check browser console for errors.
Submission Fails with Error
- Cause: Missing required fields or validation failure
- Solution: Ensure all required fields (action, authorization code, observations) are completed
Can’t Access Admin Panel
- Cause: Insufficient privileges (grado ≠ 1)
- Solution: Contact system administrator to verify your user account has Administrator (Grado 1) access
Related Resources
- Auxiliary User Guide - Learn how returns are created
- Consultation Guide - View return history and reporting
- API Reference - Technical controller documentation
- Database Schema - Return data structure