The Exequial Services module manages the full lifecycle of funeral plan membership for cooperative members. It covers enrollment of titulars (plan holders) and their beneficiaries, real-time service delivery records when a death occurs, statistical dashboards, and PDF/Excel exports. All routes are prefixed underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/corpentunida-org/corpen/llms.txt
Use this file to discover all available pages before exploring further.
/exequiales and guarded by the auth middleware.
Route Reference
| Method | Path | Route Name | Controller | Description |
|---|---|---|---|---|
GET | /exequiales/asociados | exequial.asociados.index | ComaeExCliController@index | List of exequial members |
GET | /exequiales/asociados/create | exequial.asociados.create | ComaeExCliController@create | New member form |
POST | /exequiales/asociados | exequial.asociados.store | ComaeExCliController@store | Enrol a new member |
GET | /exequiales/asociados/{id} | exequial.asociados.show | ComaeExCliController@show | Member profile with beneficiaries |
GET | /exequiales/asociados/{id}/edit | exequial.asociados.edit | ComaeExCliController@edit | Edit member form |
PUT/PATCH | /exequiales/asociados/{id} | exequial.asociados.update | ComaeExCliController@update | Update member record |
GET | /exequiales/asociados/{id}/generarpdf/{active} | asociados.generarpdf | ComaeExCliController@generarpdf | Download member PDF report |
GET | /exequiales/prestarServicio | exequial.prestarServicio.index | MaeC_ExSerController@index | List of service delivery records |
GET | /exequiales/prestarServicio/dashboard | exequial.prestarServicio.dashboard | MaeC_ExSerController@dashboard | Service statistics dashboard |
GET | /exequiales/prestarServicio/excel | prestarServicio.generate.excel | MaeC_ExSerController@generarExcelPrestarServicio | Export services to Excel |
GET | /exequiales/prestarServicio/generarpdf | prestarServicio.generarpdf | MaeC_ExSerController@generarpdf | Download all services PDF |
POST | /exequiales/prestarServicio | exequial.prestarServicio.store | MaeC_ExSerController@store | Register a new service delivery |
GET | /exequiales/prestarServicio/{id} | exequial.prestarServicio.show | MaeC_ExSerController@edit | View service record |
PUT/PATCH | /exequiales/prestarServicio/{id} | exequial.prestarServicio.update | MaeC_ExSerController@update | Update service record |
GET | /exequiales/prestarServicio/{id}/generarpdf | prestarServicio.repIndividual | MaeC_ExSerController@reporteIndividual | Individual service PDF |
POST | /exequiales/prestarServicio/{id}/comentario | prestarServicio.comentario.store | MaeC_ExSerController@addComment | Add a comment to a service record |
GET | /exequiales/beneficiarios/create | exequial.beneficiarios.create | ComaeExRelParController@create | New beneficiary form |
POST | /exequiales/beneficiarios | exequial.beneficiarios.store | ComaeExRelParController@store | Add a beneficiary |
GET | /exequiales/beneficiarios/{id}/edit | exequial.beneficiarios.edit | ComaeExRelParController@edit | Edit beneficiary form |
PUT/PATCH | /exequiales/beneficiarios/{id} | exequial.beneficiarios.update | ComaeExRelParController@update | Update beneficiary |
DELETE | /exequiales/beneficiarios/{id} | exequial.beneficiarios.destroy | ComaeExRelParController@destroy | Remove beneficiary |
GET/POST | /exequiales/terceros | exequial.terceros.* | ComaeTerController | Third-party person records (CRUD) |
GET | /exequiales/parentescosall | exequial.parentescosall | ParentescosController@index | List all relationship types |
GET | /exequiales/plansall | exequial.plansall | PlanController@index | List all funeral plans |
Data Models
- EXE_CoMae_ExCli (Titulars)
- EXE_CoMae_ExRelPar (Beneficiaries)
- EXE_MAEC_EXSER (Services)
Stored in table
EXE_CoMae_ExCli. Each row represents one active plan holder.| Column | Type | Notes |
|---|---|---|
cod_cli | bigint (PK) | Member’s national ID (cédula) |
cod_plan | string(5) | Funeral plan code |
fec_ing | date | Enrolment date |
fec_ini | date | Plan start date |
cod_cco | string(10) | Cost centre code (e.g., C1010) |
por_descto | string(5) | Discount percentage |
estado | boolean | true = active plan holder |
benef | text | Observations / beneficiary notes |
contrato | string(5) | Contract reference |
Enrolling a New Exequial Member
Open the enrolment form
Navigate to
GET /exequiales/asociados/create. The form loads the list of available funeral plans from PlanController@index. You need the member’s cédula (national ID) ready before proceeding.Validate the member exists in the directory
Before submitting, the form calls
GET /exequiales/asociados which triggers an AJAX call to the standalone validarRegistro endpoint. It checks:ComaeExCli(local table) — returns1if the cédula already has a record in the local exequial table.ComaeTer(third-parties table) — returns2if the person is in the directory but not yet enrolled locally.- Returns
0if the cédula is not found anywhere.
0 or 2), proceed to store.Submit the enrolment
POST /exequiales/asociados sends the following payload to the production API at POST /api/Exequiales/Tercero:EXE_CoMae_ExCli:add titular {documentId}.Delivering a Funeral Service
Open the service registration form
From the member’s show page, click Prestar Servicio to reach
POST /exequiales/prestarServicio. The form requires identifying whether the deceased is the titular (plan holder) or a beneficiary.Identify the deceased
- If the titular died (
pastor === 'true'): the controller sends aPATCHto/api/Exequiales/Tercerosettingstade: falseand the observation'PASTOR FALLECIDO', then updatesEXE_CoMae_ExClito setestado = false. - If a beneficiary died: the controller sends a
PUTto/api/Exequiales/Beneficiarywithtype: 'I'(inactive), and updatesEXE_CoMae_ExRelParto setestado = false, tipo = 'I'.
Complete and save the service record
On API success,
ExMonitoria::create() persists the full record to EXE_MAEC_EXSER with all death details, contact information, municipality, and the initial estado = 1 (pending). The action is logged in Auditoría as prestar servicio a {cedulaFallecido}.Track and update the service
Navigate to
GET /exequiales/prestarServicio/{id} to edit the service record. You can update:horaFallecimiento,fechaFallecimiento,lugarFallecimiento- Contact information (
contacto,telefonoContacto,Contacto2,telefonoContacto2) municipio(linked toMaeMunicipios)
POST /exequiales/prestarServicio/{id}/comentario, which saves to ExServicioComentarios with a tipo and observacion.Adding a Beneficiary
To add a dependent to an existing plan holder’s record:- From the member’s show page, click Agregar Beneficiario.
- The
createform loads availableparentescosfromParentescosController@index. POST /exequiales/beneficiariossends aPOSTrequest to/api/Exequiales/Beneficiaryand simultaneously creates aComaeExRelParrecord withtipo = 'A'(active).- On success, the action is logged as
add beneficiario {documentid}.
PDF Generation
Corpen uses Barryvdh DomPDF for all PDF output in this module:| Endpoint | Description | Paper |
|---|---|---|
GET /exequiales/asociados/{id}/generarpdf/true | Member certificate with plan and beneficiaries (active format) | Letter, landscape |
GET /exequiales/asociados/{id}/generarpdf/false | Alternate member report template | Letter, landscape |
GET /exequiales/prestarServicio/generarpdf | Full services report (all records) | Letter, landscape |
GET /exequiales/prestarServicio/{id}/generarpdf | Individual service delivery report | Letter, landscape |
active path parameter in generarpdf/{active} is evaluated with filter_var($active, FILTER_VALIDATE_BOOLEAN). Passing true uses the view exequial.asociados.showpdf; passing false uses exequial.asociados.showpdf2.
Each PDF request fetches data from the production API using a Bearer token from env('TOKEN_ADMIN') and env('API_PRODUCCION'), combining titular details, beneficiary list, and pastor personal data into a single printable document.
Excel Export (Service Deliveries)
GET /exequiales/prestarServicio/excel exports all ExMonitoria records via Maatwebsite Excel using the ExcelExport class. The generated file is named {timestamp}Prestar_Servicio.xlsx and contains the following columns:
| # | Column | Source |
|---|---|---|
| 1 | Nº | Row index |
| 2 | Fecha Fallecimiento | fechaFallecimiento |
| 3 | Día | Carbon::translatedFormat('l') (Spanish weekday) |
| 4 | Hora | horaFallecimiento |
| 5 | Cédula Titular | cedulaTitular |
| 6 | Nombre Titular | nombreTitular |
| 7 | Cédula Fallecido | cedulaFallecido |
| 8 | Nombre Fallecido | nombreFallecido |
| 9 | Lugar Fallecimiento | lugarFallecimiento |
| 10 | Parentesco | Resolved name via ParentescosController@showName |
| 11 | Contacto | contacto |
| 12 | Teléfono | telefonoContacto |
| 13 | Estado | PENDIENTE / EN PROCESO / CERRADO |