From 050c0dcd9d23bc4b291a242034d1280d192b341c Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 19 Aug 2026 13:56:39 -0400 Subject: [PATCH] =?UTF-8?q?MSIN-4577=20=E2=80=94=20Enhanced=20bib=20and=20?= =?UTF-8?q?chip=20order=20functionality=20by=20adding=20conditional=20logi?= =?UTF-8?q?c=20for=20handling=20different=20order=20types=20in=20the=20XML?= =?UTF-8?q?=20generation=20process.=20Updated=20version=20to=204.73.025=20?= =?UTF-8?q?to=20reflect=20these=20changes.=20Improved=20user=20interface?= =?UTF-8?q?=20text=20for=20clarity=20and=20added=20new=20SQL=20entries=20f?= =?UTF-8?q?or=20better=20localization=20support.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/inc_fx_bib_production.php | 335 ++++++++++++++++------ php/inc_fx_promoteur.php | 10 +- php/inc_settings.php | 2 +- sql/MSIN-4577-commande-dossards-puces.sql | 29 +- 4 files changed, 287 insertions(+), 89 deletions(-) diff --git a/php/inc_fx_bib_production.php b/php/inc_fx_bib_production.php index c416a12e..49607473 100644 --- a/php/inc_fx_bib_production.php +++ b/php/inc_fx_bib_production.php @@ -1586,6 +1586,7 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab $objDom = fxBibProductionXmlLoad($strXml); $objXpath = new DOMXPath($objDom); $objXpath->registerNamespace('m', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $strKind = fxBibProductionNormalizeKind($tabSnapshot['kind'] ?? 'dossards'); $objSheetData = $objXpath->query('//m:sheetData')->item(0); $objBaseEvent = fxBibProductionXmlFindRow($objXpath, 4); @@ -1683,14 +1684,10 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab fxBibProductionXmlSetNumber($objDom, $objEventRow, 'H', $intRow, $tabRow['finish']); fxBibProductionXmlSetFormula($objDom, $objEventRow, 'I', $intRow, 'H' . $intRow . '-G' . $intRow . '+1'); fxBibProductionXmlSetFormula($objDom, $objEventRow, 'J', $intRow, 'I' . $intRow . '=F' . $intRow); - // MSIN-4469 — À côté de la quantité : lignes Imprimeur pour cette séquence. - fxBibProductionXmlSetNumber($objDom, $objEventRow, 'K', $intRow, $tabRow['quantity'], $strStyleK); - // MSIN-4469 — V1 : une puce par dossard, avec le même numéro. - fxBibProductionXmlSetNumber($objDom, $objEventRow, 'L', $intRow, $tabRow['quantity']); - fxBibProductionXmlSetNumber($objDom, $objEventRow, 'M', $intRow, $tabRow['start']); - fxBibProductionXmlSetNumber($objDom, $objEventRow, 'N', $intRow, $tabRow['finish']); - fxBibProductionXmlSetFormula($objDom, $objEventRow, 'O', $intRow, 'G' . $intRow . '=M' . $intRow); - fxBibProductionXmlSetFormula($objDom, $objEventRow, 'P', $intRow, 'H' . $intRow . '=N' . $intRow); + // MSIN-4577 — Colonne K (lignes Imprimeur) : fichier dossards seulement. + if ($strKind === 'dossards') { + fxBibProductionXmlSetNumber($objDom, $objEventRow, 'K', $intRow, $tabRow['quantity'], $strStyleK); + } $objSheetData->insertBefore($objEventRow, $objTotal); $objSheetData->insertBefore($objSecondRow, $objTotal); @@ -1710,7 +1707,7 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab // MSIN-4469 — Colonne K : validation quantité vs lignes onglet Imprimeur (hors vides). $objHeaderRow = fxBibProductionXmlFindRow($objXpath, 3); - if ($objHeaderRow) { + if ($objHeaderRow && $strKind === 'dossards') { $objHeaderCellF = fxBibProductionXmlFindCell($objHeaderRow, 'F'); $strHeaderStyleK = $objHeaderCellF ? (string)$objHeaderCellF->getAttribute('s') @@ -1725,6 +1722,81 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab ); } + $objHeaderRow2 = fxBibProductionXmlFindRow($objXpath, 2); + if ($strKind === 'puces') { + if ($objHeaderRow2) { + fxBibProductionXmlSetInlineString( + $objDom, + $objHeaderRow2, + 'F', + 2, + isset($tabLabels['header_puce']) ? $tabLabels['header_puce'] : 'PUCE' + ); + } + if ($objHeaderRow) { + fxBibProductionXmlSetInlineString( + $objDom, + $objHeaderRow, + 'F', + 3, + isset($tabLabels['qty_puce']) ? $tabLabels['qty_puce'] : 'QUANTITÉ Puce' + ); + } + foreach ([32, 33, 35, 36, 37, 41, 42] as $intNoteRow) { + $objNoteRow = fxBibProductionXmlFindRow($objXpath, $intNoteRow + $intRowDelta); + if (!$objNoteRow) { + continue; + } + foreach (['A', 'D', 'F', 'G', 'H'] as $strCol) { + $objCell = fxBibProductionXmlFindCell($objNoteRow, $strCol); + if ($objCell) { + fxBibProductionXmlClearCell($objCell); + } + } + } + } + + // Plus de bloc PUCE à droite (colonnes L–P) : un fichier = un destinataire. + foreach ([2, 3] as $intHdrRow) { + $objHdr = fxBibProductionXmlFindRow($objXpath, $intHdrRow); + if (!$objHdr) { + continue; + } + foreach (['L', 'M', 'N', 'O', 'P'] as $strCol) { + $objCell = fxBibProductionXmlFindCell($objHdr, $strCol); + if ($objCell) { + fxBibProductionXmlClearCell($objCell); + } + } + } + $objPuceAnkle = fxBibProductionXmlFindRow($objXpath, 38 + $intRowDelta); + if ($objPuceAnkle) { + foreach (['A', 'D', 'F'] as $strCol) { + $objCell = fxBibProductionXmlFindCell($objPuceAnkle, $strCol); + if ($objCell) { + fxBibProductionXmlClearCell($objCell); + } + } + } + fxBibProductionXmlHideColumns($objXpath, 12, 16); + if ($strKind === 'puces') { + fxBibProductionXmlHideColumns($objXpath, 11, 11); + } + $objFoot = fxBibProductionXmlFindRow($objXpath, 47 + $intRowDelta); + if ($objFoot) { + $strNote = ($strKind === 'puces') + ? trim((string)($tabLabels['note_puces'] ?? '')) + : trim((string)($tabLabels['note_dossards'] ?? '')); + if ($strNote !== '') { + fxBibProductionXmlSetInlineString($objDom, $objFoot, 'A', 47 + $intRowDelta, $strNote); + } else { + $objCellA47 = fxBibProductionXmlFindCell($objFoot, 'A'); + if ($objCellA47) { + fxBibProductionXmlClearCell($objCellA47); + } + } + } + $intBibTotal = 0; foreach ($tabOrderRows as $tabRow) { $intBibTotal += (int)$tabRow['quantity']; @@ -1735,6 +1807,12 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab if (!$objTotal) { throw new Exception('MSIN-4469 total row missing'); } + foreach (['L', 'M', 'N', 'O', 'P'] as $strCol) { + $objCell = fxBibProductionXmlFindCell($objTotal, $strCol); + if ($objCell) { + fxBibProductionXmlClearCell($objCell); + } + } fxBibProductionXmlSetInlineString($objDom, $objTotal, 'A', $intTotalRow, $tabLabels['total']); fxBibProductionXmlSetFormula( @@ -1755,34 +1833,27 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab '', $intBibTotal ); - fxBibProductionXmlSetFormula( - $objDom, - $objTotal, - 'L', - $intTotalRow, - 'SUM(L4:L' . ($intTotalRow - 1) . ')', - '', - $intBibTotal - ); - // COUNT ignore l'en-tête texte et les lignes blanches entre épreuves. - fxBibProductionXmlSetFormula( - $objDom, - $objTotal, - 'K', - $intTotalRow, - 'COUNT(Imprimeur!A:A)', - '', - $intBibTotal - ); - fxBibProductionXmlSetFormula( - $objDom, - $objTotal, - 'J', - $intTotalRow, - 'F' . $intTotalRow . '=K' . $intTotalRow, - '', - '1' - ); + if ($strKind === 'dossards') { + // COUNT ignore l'en-tête texte et les lignes blanches entre épreuves. + fxBibProductionXmlSetFormula( + $objDom, + $objTotal, + 'K', + $intTotalRow, + 'COUNT(Imprimeur!A:A)', + '', + $intBibTotal + ); + fxBibProductionXmlSetFormula( + $objDom, + $objTotal, + 'J', + $intTotalRow, + 'F' . $intTotalRow . '=K' . $intTotalRow, + '', + '1' + ); + } $objDimension = $objXpath->query('//m:dimension')->item(0); if ($objDimension instanceof DOMElement) { @@ -1791,6 +1862,112 @@ function fxBibProductionBuildOrderXml($strXml, array $tabSnapshot, array $tabLab return $objDom->saveXML(); } +function fxBibProductionXmlHideColumns(DOMXPath $objXpath, $intFrom, $intTo) { + $intFrom = (int)$intFrom; + $intTo = (int)$intTo; + if ($intFrom < 1 || $intTo < $intFrom) { + return; + } + foreach ($objXpath->query('//m:cols/m:col') as $objCol) { + if (!($objCol instanceof DOMElement)) { + continue; + } + $intMin = (int)$objCol->getAttribute('min'); + $intMax = (int)$objCol->getAttribute('max'); + if ($intMax < $intFrom || $intMin > $intTo) { + continue; + } + $objCol->setAttribute('hidden', '1'); + } +} + +/** + * MSIN-4577 — Fichier puces : un seul onglet, sans Imprimeur. + */ +function fxBibProductionWorkbookStripPrinterSheet(ZipArchive $objZip, $strPucesSheetName) { + $strWorkbookXml = $objZip->getFromName('xl/workbook.xml'); + if ($strWorkbookXml === false) { + return; + } + $objDom = fxBibProductionXmlLoad($strWorkbookXml); + $objXpath = new DOMXPath($objDom); + $objXpath->registerNamespace('m', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objXpath->registerNamespace('r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $tabRemove = []; + foreach ($objXpath->query('//m:sheets/m:sheet') as $objSheet) { + if (!($objSheet instanceof DOMElement)) { + continue; + } + $strName = (string)$objSheet->getAttribute('name'); + if ($strName === 'Imprimeur') { + $tabRemove[] = $objSheet; + continue; + } + $objSheet->setAttribute('name', $strPucesSheetName); + } + foreach ($tabRemove as $objSheet) { + if ($objSheet->parentNode) { + $objSheet->parentNode->removeChild($objSheet); + } + } + $objZip->deleteName('xl/workbook.xml'); + $objZip->addFromString('xl/workbook.xml', $objDom->saveXML()); + + $strRels = $objZip->getFromName('xl/_rels/workbook.xml.rels'); + if ($strRels !== false) { + $objRels = fxBibProductionXmlLoad($strRels); + $tabRelRemove = []; + foreach ($objRels->getElementsByTagName('Relationship') as $objRel) { + $strTarget = str_replace('\\', '/', (string)$objRel->getAttribute('Target')); + if (substr($strTarget, -11) === 'sheet1.xml') { + $tabRelRemove[] = $objRel; + } + } + foreach ($tabRelRemove as $objRel) { + if ($objRel->parentNode) { + $objRel->parentNode->removeChild($objRel); + } + } + $objZip->deleteName('xl/_rels/workbook.xml.rels'); + $objZip->addFromString('xl/_rels/workbook.xml.rels', $objRels->saveXML()); + } + + $strTypes = $objZip->getFromName('[Content_Types].xml'); + if ($strTypes !== false) { + $objTypes = fxBibProductionXmlLoad($strTypes); + $tabTypeRemove = []; + foreach ($objTypes->getElementsByTagName('Override') as $objOverride) { + if ($objOverride->getAttribute('PartName') === '/xl/worksheets/sheet1.xml') { + $tabTypeRemove[] = $objOverride; + } + } + foreach ($tabTypeRemove as $objOverride) { + if ($objOverride->parentNode) { + $objOverride->parentNode->removeChild($objOverride); + } + } + $objZip->deleteName('[Content_Types].xml'); + $objZip->addFromString('[Content_Types].xml', $objTypes->saveXML()); + } + + $objZip->deleteName('xl/worksheets/sheet1.xml'); +} + +function fxBibProductionWorkbookRenameCommandeSheet(DOMXPath $objXpath, $strName) { + $strName = trim((string)$strName); + if ($strName === '') { + return; + } + foreach ($objXpath->query('//m:sheets/m:sheet') as $objSheet) { + if (!($objSheet instanceof DOMElement)) { + continue; + } + if ((string)$objSheet->getAttribute('name') === 'Commande MS1') { + $objSheet->setAttribute('name', $strName); + } + } +} + function fxBibProductionBuildWorkbook(array $tabSnapshot, $strDestination, array $tabLabels) { // MSIN-4516 — Gros événements : génération XML peut dépasser max_execution_time 60s. if (function_exists('set_time_limit')) { @@ -1814,30 +1991,31 @@ function fxBibProductionBuildWorkbook(array $tabSnapshot, $strDestination, array } try { - $strSupplierXml = $objZip->getFromName('xl/worksheets/sheet1.xml'); $strOrderXml = $objZip->getFromName('xl/worksheets/sheet2.xml'); - if ($strSupplierXml === false || $strOrderXml === false) { + if ($strOrderXml === false) { throw new Exception('MSIN-4469 worksheet missing'); } - $tabSideStyles = fxBibProductionEnsureSideStyles($objZip); $strKind = fxBibProductionNormalizeKind($tabSnapshot['kind'] ?? 'dossards'); - if ($strKind === 'puces') { - $strSupplierXml = fxBibProductionBuildPucesCoverXml($strSupplierXml, $tabSnapshot); - } else { + $strOrderXml = fxBibProductionBuildOrderXml($strOrderXml, $tabSnapshot, $tabLabels); + $objZip->deleteName('xl/worksheets/sheet2.xml'); + $objZip->addFromString('xl/worksheets/sheet2.xml', $strOrderXml); + + if ($strKind === 'dossards') { + $strSupplierXml = $objZip->getFromName('xl/worksheets/sheet1.xml'); + if ($strSupplierXml === false) { + throw new Exception('MSIN-4469 worksheet missing'); + } + $tabSideStyles = fxBibProductionEnsureSideStyles($objZip); $strSupplierXml = fxBibProductionBuildSupplierXml( $strSupplierXml, $tabSnapshot, $tabLabels, $tabSideStyles ); + $objZip->deleteName('xl/worksheets/sheet1.xml'); + $objZip->addFromString('xl/worksheets/sheet1.xml', $strSupplierXml); } - $strOrderXml = fxBibProductionBuildOrderXml($strOrderXml, $tabSnapshot, $tabLabels); - - $objZip->deleteName('xl/worksheets/sheet1.xml'); - $objZip->addFromString('xl/worksheets/sheet1.xml', $strSupplierXml); - $objZip->deleteName('xl/worksheets/sheet2.xml'); - $objZip->addFromString('xl/worksheets/sheet2.xml', $strOrderXml); $strWorkbookXml = $objZip->getFromName('xl/workbook.xml'); if ($strWorkbookXml !== false) { @@ -1849,9 +2027,24 @@ function fxBibProductionBuildWorkbook(array $tabSnapshot, $strDestination, array $objCalcPr->setAttribute('fullCalcOnLoad', '1'); $objCalcPr->setAttribute('forceFullCalc', '1'); } + if ($strKind === 'dossards') { + $strDossSheet = trim((string)($tabLabels['sheet_dossards'] ?? '')); + if ($strDossSheet === '') { + $strDossSheet = 'Commande dossards'; + } + fxBibProductionWorkbookRenameCommandeSheet($objWorkbookXpath, $strDossSheet); + } $objZip->deleteName('xl/workbook.xml'); $objZip->addFromString('xl/workbook.xml', $objWorkbookDom->saveXML()); } + + if ($strKind === 'puces') { + $strPucesSheet = trim((string)($tabLabels['sheet_puces'] ?? '')); + if ($strPucesSheet === '') { + $strPucesSheet = 'Commande puces'; + } + fxBibProductionWorkbookStripPrinterSheet($objZip, $strPucesSheet); + } } catch (Exception $objException) { $objZip->close(); @unlink($strDestination); @@ -1861,34 +2054,6 @@ function fxBibProductionBuildWorkbook(array $tabSnapshot, $strDestination, array $objZip->close(); } -/** - * MSIN-4577 — Onglet Imprimeur du fichier puces : pas de lignes Face/Endos, - * seulement le nom d’événement (le contenu utile est l’onglet plages). - */ -function fxBibProductionBuildPucesCoverXml($strXml, array $tabSnapshot) { - $objDom = fxBibProductionXmlLoad($strXml); - $objXpath = new DOMXPath($objDom); - $objXpath->registerNamespace('m', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - $objSheetData = $objXpath->query('//m:sheetData')->item(0); - $objRow1 = fxBibProductionXmlFindRow($objXpath, 1); - if (!$objSheetData || !$objRow1) { - throw new Exception('MSIN-4577 puces cover missing'); - } - $objHeader = fxBibProductionXmlCloneRow($objRow1, 1); - while ($objSheetData->firstChild) { - $objSheetData->removeChild($objSheetData->firstChild); - } - fxBibProductionXmlSetInlineString( - $objDom, - $objHeader, - 'A', - 1, - (string)($tabSnapshot['event']['name'] ?? '') - ); - $objSheetData->appendChild($objHeader); - return $objDom->saveXML(); -} - /** * Crée la commande officielle et verrouille immédiatement les séquences via * bpo_active_key. Une requête concurrente retrouve la commande déjà active. @@ -1926,11 +2091,17 @@ function fxBibProductionWriteOrderWorkbook($intOrderId, $intEveId, $strFileName, $tabSnapshot, $strAbsoluteFile, [ - 'bib' => fxBibTexte('bib_v5_production_col_bib', 0), - 'race' => fxBibTexte('bib_v5_production_col_race', 0), - 'total' => fxBibTexte('bib_v5_production_total', 0), - 'title' => fxBibTexte('bib_v5_production_excel_title', 0), - 'printer_lines' => fxBibTexte('bib_v5_production_col_printer_lines', 0), + 'bib' => fxBibTexte('bib_v5_production_col_bib', 0), + 'race' => fxBibTexte('bib_v5_production_col_race', 0), + 'total' => fxBibTexte('bib_v5_production_total', 0), + 'title' => fxBibTexte('bib_v5_production_excel_title', 0), + 'printer_lines' => fxBibTexte('bib_v5_production_col_printer_lines', 0), + 'sheet_dossards' => fxBibTexte('bib_v5_cmd_sheet_dossards', 0), + 'sheet_puces' => fxBibTexte('bib_v5_cmd_sheet_puces', 0), + 'header_puce' => fxBibTexte('bib_v5_cmd_excel_header_puce', 0), + 'qty_puce' => fxBibTexte('bib_v5_cmd_excel_qty_puce', 0), + 'note_dossards' => fxBibTexte('bib_v5_cmd_excel_note_dossards', 0), + 'note_puces' => fxBibTexte('bib_v5_cmd_excel_note_puces', 0), ] ); diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 748a1e1c..68098a2e 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -4073,8 +4073,8 @@ function fxBibStaticFallback($clef) { 'bib_v5_cmd_files_intro' => ['fr' => 'Un fichier par destinataire. Générer remplit la réalité du jalon, pas l’échéance.', 'en' => 'One file per recipient. Generating fills the actual date, not the deadline.'], 'bib_v5_cmd_file_dossards' => ['fr' => 'Fichier imprimeur', 'en' => 'Printer file'], 'bib_v5_cmd_file_puces' => ['fr' => 'Fichier puces MS1', 'en' => 'MS1 chip file'], - 'bib_v5_cmd_file_dossards_help' => ['fr' => 'Face / Endos / Info. Séquences « commande dossards ». Verrouille ces séquences.', 'en' => 'Front / Back / Info. “Order bibs” sequences. Locks those ranges.'], - 'bib_v5_cmd_file_puces_help' => ['fr' => 'Plages + qté. Même numéro que le dossard. Ne verrouille pas.', 'en' => 'Ranges + qty. Same number as the bib. Does not lock.'], + 'bib_v5_cmd_file_dossards_help' => ['fr' => 'Onglets Imprimeur (Face / Endos / Info) et Commande dossards. Verrouille ces séquences.', 'en' => 'Printer tab (Front / Back / Info) and bib order tab. Locks those ranges.'], + 'bib_v5_cmd_file_puces_help' => ['fr' => 'Plages + qté puces. Un seul onglet, sans imprimeur ni dossard. Ne verrouille pas.', 'en' => 'Chip ranges + qty. One tab, no printer sheet and no bib wording. Does not lock.'], 'bib_v5_cmd_generate_dossards' => ['fr' => 'Générer le fichier imprimeur', 'en' => 'Generate printer file'], 'bib_v5_cmd_generate_puces' => ['fr' => 'Générer le fichier puces', 'en' => 'Generate chip file'], 'bib_v5_cmd_replace_puces' => ['fr' => 'Générer de nouveau', 'en' => 'Generate again'], @@ -4094,6 +4094,12 @@ function fxBibStaticFallback($clef) { 'bib_v5_cmd_saved' => ['fr' => 'Enregistré.', 'en' => 'Saved.'], 'bib_v5_cmd_sql_missing' => ['fr' => 'Structure absente — exécuter sql/MSIN-4577-commande-dossards-puces.sql en dev préprod.', 'en' => 'Missing structure — run sql/MSIN-4577-commande-dossards-puces.sql on dev preprod.'], 'bib_v5_cmd_unauthorized' => ['fr' => 'Cette page est réservée à la préparation de commande.', 'en' => 'This page is for order preparation only.'], + 'bib_v5_cmd_sheet_dossards' => ['fr' => 'Commande dossards', 'en' => 'Bib order'], + 'bib_v5_cmd_sheet_puces' => ['fr' => 'Commande puces', 'en' => 'Chip order'], + 'bib_v5_cmd_excel_header_puce' => ['fr' => 'PUCE', 'en' => 'CHIP'], + 'bib_v5_cmd_excel_qty_puce' => ['fr' => 'QUANTITÉ Puce', 'en' => 'CHIP QTY'], + 'bib_v5_cmd_excel_note_dossards' => ['fr' => 'Confirmer le nombre de dossards (12 jours ouvrables avant la date de réception souhaitée).', 'en' => 'Confirm the bib quantity (12 business days before the desired receipt date).'], + 'bib_v5_cmd_excel_note_puces' => ['fr' => 'Confirmer le nombre de puces (12 jours ouvrables avant la date de réception souhaitée).', 'en' => 'Confirm the chip quantity (12 business days before the desired receipt date).'], 'bib_v5_production_field_no_bib' => ['fr' => 'N° dossard', 'en' => 'Bib number'], 'bib_v5_production_field_par_prenom_nom' => ['fr' => 'Prénom + nom', 'en' => 'First + last name'], 'bib_v5_production_field_epr_nom' => ['fr' => 'Épreuve', 'en' => 'Race'], diff --git a/php/inc_settings.php b/php/inc_settings.php index ef9b86c5..0c582256 100644 --- a/php/inc_settings.php +++ b/php/inc_settings.php @@ -7,7 +7,7 @@ * Constantes * * **************/ -define('_VERSION_CODE', '4.73.024'); // MSIN-4577 — page commande dossards / puces +define('_VERSION_CODE', '4.73.025'); // MSIN-4577 — Excel imprimeur sans puces / puces sans dossard define('_DATE_CODE', '2026-08-19'); //MSIN-4290 define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe'); diff --git a/sql/MSIN-4577-commande-dossards-puces.sql b/sql/MSIN-4577-commande-dossards-puces.sql index 72d0384c..32dca746 100644 --- a/sql/MSIN-4577-commande-dossards-puces.sql +++ b/sql/MSIN-4577-commande-dossards-puces.sql @@ -149,10 +149,10 @@ FROM ( UNION ALL SELECT 'bib_v5_cmd_file_dossards', 'en', 'Printer file', '' UNION ALL SELECT 'bib_v5_cmd_file_puces', 'fr', 'Fichier puces MS1', '' UNION ALL SELECT 'bib_v5_cmd_file_puces', 'en', 'MS1 chip file', '' - UNION ALL SELECT 'bib_v5_cmd_file_dossards_help', 'fr', 'Face / Endos / Info. Séquences « commande dossards ». Verrouille ces séquences.', '' - UNION ALL SELECT 'bib_v5_cmd_file_dossards_help', 'en', 'Front / Back / Info. “Order bibs” sequences. Locks those ranges.', '' - UNION ALL SELECT 'bib_v5_cmd_file_puces_help', 'fr', 'Plages + qté. Même numéro que le dossard. Ne verrouille pas.', '' - UNION ALL SELECT 'bib_v5_cmd_file_puces_help', 'en', 'Ranges + qty. Same number as the bib. Does not lock.', '' + UNION ALL SELECT 'bib_v5_cmd_file_dossards_help', 'fr', 'Onglets Imprimeur (Face / Endos / Info) et Commande dossards. Verrouille ces séquences.', '' + UNION ALL SELECT 'bib_v5_cmd_file_dossards_help', 'en', 'Printer tab (Front / Back / Info) and bib order tab. Locks those ranges.', '' + UNION ALL SELECT 'bib_v5_cmd_file_puces_help', 'fr', 'Plages + qté puces. Un seul onglet, sans imprimeur ni dossard. Ne verrouille pas.', '' + UNION ALL SELECT 'bib_v5_cmd_file_puces_help', 'en', 'Chip ranges + qty. One tab, no printer sheet and no bib wording. Does not lock.', '' UNION ALL SELECT 'bib_v5_cmd_generate_dossards', 'fr', 'Générer le fichier imprimeur', '' UNION ALL SELECT 'bib_v5_cmd_generate_dossards', 'en', 'Generate printer file', '' UNION ALL SELECT 'bib_v5_cmd_generate_puces', 'fr', 'Générer le fichier puces', '' @@ -191,6 +191,18 @@ FROM ( UNION ALL SELECT 'bib_v5_cmd_sql_missing', 'en', 'Missing structure — run sql/MSIN-4577-commande-dossards-puces.sql on dev preprod.', '' UNION ALL SELECT 'bib_v5_cmd_unauthorized', 'fr', 'Cette page est réservée à la préparation de commande.', '' UNION ALL SELECT 'bib_v5_cmd_unauthorized', 'en', 'This page is for order preparation only.', '' + UNION ALL SELECT 'bib_v5_cmd_sheet_dossards', 'fr', 'Commande dossards', '' + UNION ALL SELECT 'bib_v5_cmd_sheet_dossards', 'en', 'Bib order', '' + UNION ALL SELECT 'bib_v5_cmd_sheet_puces', 'fr', 'Commande puces', '' + UNION ALL SELECT 'bib_v5_cmd_sheet_puces', 'en', 'Chip order', '' + UNION ALL SELECT 'bib_v5_cmd_excel_header_puce', 'fr', 'PUCE', '' + UNION ALL SELECT 'bib_v5_cmd_excel_header_puce', 'en', 'CHIP', '' + UNION ALL SELECT 'bib_v5_cmd_excel_qty_puce', 'fr', 'QUANTITÉ Puce', '' + UNION ALL SELECT 'bib_v5_cmd_excel_qty_puce', 'en', 'CHIP QTY', '' + UNION ALL SELECT 'bib_v5_cmd_excel_note_dossards', 'fr', 'Confirmer le nombre de dossards (12 jours ouvrables avant la date de réception souhaitée).', '' + UNION ALL SELECT 'bib_v5_cmd_excel_note_dossards', 'en', 'Confirm the bib quantity (12 business days before the desired receipt date).', '' + UNION ALL SELECT 'bib_v5_cmd_excel_note_puces', 'fr', 'Confirmer le nombre de puces (12 jours ouvrables avant la date de réception souhaitée).', '' + UNION ALL SELECT 'bib_v5_cmd_excel_note_puces', 'en', 'Confirm the chip quantity (12 business days before the desired receipt date).', '' ) src WHERE NOT EXISTS ( SELECT 1 FROM info current_info @@ -198,3 +210,12 @@ WHERE NOT EXISTS ( AND current_info.info_langue = src.info_langue AND current_info.info_prg = 'compte.php' ); + +UPDATE info SET info_texte = 'Onglets Imprimeur (Face / Endos / Info) et Commande dossards. Verrouille ces séquences.' +WHERE info_clef = 'bib_v5_cmd_file_dossards_help' AND info_langue = 'fr' AND info_prg = 'compte.php'; +UPDATE info SET info_texte = 'Printer tab (Front / Back / Info) and bib order tab. Locks those ranges.' +WHERE info_clef = 'bib_v5_cmd_file_dossards_help' AND info_langue = 'en' AND info_prg = 'compte.php'; +UPDATE info SET info_texte = 'Plages + qté puces. Un seul onglet, sans imprimeur ni dossard. Ne verrouille pas.' +WHERE info_clef = 'bib_v5_cmd_file_puces_help' AND info_langue = 'fr' AND info_prg = 'compte.php'; +UPDATE info SET info_texte = 'Chip ranges + qty. One tab, no printer sheet and no bib wording. Does not lock.' +WHERE info_clef = 'bib_v5_cmd_file_puces_help' AND info_langue = 'en' AND info_prg = 'compte.php';