Prerequisites
- Active operator account with authentication token
- Valid operation code from the system
- Company selection available
Submission Workflow
Fill Required Fields
The cashout form requires three mandatory fields:
- Operation Code (
operationCode): The unique identifier for the transaction - Operator Name (
operatorName): Auto-filled from your logged-in user profile - Company (
company): Select from the dropdown list of available companies
Add Observations (Optional)
After clicking submit, a modal appears asking if you have any observations:
- Click SÍ to add an observation in the text area
- Click NO to submit without observations
observacion field of the cashout record.Submit to API
The system sends a POST request to create the cashout:API Endpoint:
POST https://general-cashouts.onrender.com/api/cashoutsObservation Modal Flow
The observation modal (#observacionModal) provides two paths:
Path 1: With Observation
Path 2: Without Observation
Form Validation
- All three fields are required (
requiredattribute) - Operator name is read-only and auto-populated from
currentUser.fullName - Company dropdown is populated from the
/rulesAPI endpoint - Empty observations are allowed (treated as
"")
Authentication
All requests include the JWT token in headers:Success/Error Messages
Success Scenarios
Success Scenarios
#operatorSuccessdiv displays: “¡Cash out registrado correctamente! Esperando verificación.”- Notification toast shows: “¡Cash out enviado correctamente!”
- Form resets, ready for next submission
Error Scenarios
Error Scenarios
#operatorErrordiv displays: “Ha ocurrido un error al registrar el cash out. Por favor, inténtalo de nuevo.”- Notification toast shows: “Error al subir cash out.”
- Form data is preserved for retry
Code Reference
The complete submission logic is inindex.html:709-775: