From a8195d7d493bd20db19ea0524ef56af8ecc8ea66 Mon Sep 17 00:00:00 2001 From: BOHA Date: Tue, 24 Mar 2026 10:46:24 +0100 Subject: [PATCH] fix: move quotationNumber declaration before scope HTML usage --- src/routes/admin/offers-pdf.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/admin/offers-pdf.ts b/src/routes/admin/offers-pdf.ts index 75f88fe..4ca79b9 100644 --- a/src/routes/admin/offers-pdf.ts +++ b/src/routes/admin/offers-pdf.ts @@ -270,6 +270,8 @@ export default async function offersPdfRoutes(fastify: FastifyInstance): Promise totalsHtml += `
${escapeHtml(t('exchange_rate'))}: ${formatNum(exchangeRate, 4)}
`; } + const quotationNumber = escapeHtml(quotation.quotation_number); + // Scope HTML let scopeHtml = ''; if (hasScopeContent) { @@ -299,7 +301,6 @@ export default async function offersPdfRoutes(fastify: FastifyInstance): Promise scopeHtml += ''; } - const quotationNumber = escapeHtml(quotation.quotation_number); const pageLabel = escapeHtml(t('page')); const ofLabel = escapeHtml(t('of'));