From ffb125b124f66cb679b58d2033dc455c5e50e2c3 Mon Sep 17 00:00:00 2001 From: Andrea Bruno <21980406+Andrea-Bruno@users.noreply.github.com> Date: Mon, 12 Oct 2026 01:39:12 +0200 Subject: [PATCH] Keep the document type in the serials list when the localized title is empty The serials list read the document type from a LEFT JOIN on the localized order-type table, so when that language row was missing the label lost its document word and showed only the number and the date. Both the purchase and the sale side now fall back to the source module name when the localized type is empty, so the label always names the document. --- modules/articoli/plugins/articoli.lotti.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/articoli/plugins/articoli.lotti.php b/modules/articoli/plugins/articoli.lotti.php index 607dc66a2..5ee276c3d 100755 --- a/modules/articoli/plugins/articoli.lotti.php +++ b/modules/articoli/plugins/articoli.lotti.php @@ -246,6 +246,12 @@ $numero = !empty($data[0]['numero_esterno']) ? $data[0]['numero_esterno'] : $data[0]['numero']; + // The localized document type can come back empty when the language + // row is missing, which left the label without any document word. + if (empty($data[0]['tipo_documento'])) { + $data[0]['tipo_documento'] = tr($module); + } + $text = tr('_DOC_ num. _NUM_ del _DATE_', [ '_DOC_' => $data[0]['tipo_documento'], '_NUM_' => $numero, @@ -392,6 +398,12 @@ $numero = !empty($data[0]['numero_esterno']) ? $data[0]['numero_esterno'] : $data[0]['numero']; + // The localized document type can come back empty when the language + // row is missing, which left the label without any document word. + if (empty($data[0]['tipo_documento'])) { + $data[0]['tipo_documento'] = tr($module); + } + $text = tr('_DOC_ num. _NUM_ del _DATE_', [ '_DOC_' => $data[0]['tipo_documento'], '_NUM_' => $numero,