Exportar los gastos generales de la cotización
GET/api/report/excel/quotation/{quotationId}/overheads
GET/api/report/pdf/quotation/{quotationId}/overheads
Descarga el árbol de gastos generales de la cotización con el subtotal de cada título. Hay dos rutas: /api/report/excel/quotation/{quotationId}/overheads genera el libro gastos-generales-<código>.xlsx y /api/report/pdf/quotation/{quotationId}/overheads genera un PDF A4 que se muestra en línea.
Parámetros de la ruta
Sección titulada «Parámetros de la ruta»quotationIdintegerobligatorioIdentificador de la cotización.
Permiso
Sección titulada «Permiso»No exige un permiso del módulo: basta con un token válido (auth:sanctum). El controlador no llama a ninguna política.
curl \ "https://servererp.allendostmen.app/api/report/excel/quotation/1520/overheads" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"
curl \ "https://servererp.allendostmen.app/api/report/pdf/quotation/1520/overheads" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json"const response = await fetch( "https://servererp.allendostmen.app/api/report/excel/quotation/1520/overheads", { method: "GET", headers: { Authorization: `Bearer ${token}`, Accept: "application/json", }, },);const blob = await response.blob();
const response2 = await fetch( "https://servererp.allendostmen.app/api/report/pdf/quotation/1520/overheads", { method: "GET", headers: { Authorization: `Bearer ${token}`, Accept: "application/json", }, },);const blob2 = await response.blob();use Illuminate\Support\Facades\Http;
$response = Http::withToken($token) ->acceptJson() ->get('https://servererp.allendostmen.app/api/report/excel/quotation/1520/overheads');
$response2 = Http::withToken($token) ->acceptJson() ->get('https://servererp.allendostmen.app/api/report/pdf/quotation/1520/overheads');Archivo Excel200
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheetContent-Disposition: attachment; filename="gastos-generales-<código de la cotización>.xlsx"PDF200
Content-Type: application/pdfSe muestra en línea.